activecampaign-api-php icon indicating copy to clipboard operation
activecampaign-api-php copied to clipboard

contact/sync width custom checkbox field.

Open duskohu opened this issue 4 years ago • 0 comments

Hi, I trying create or update contact with custom checkbox field. I don't know what is wrong. Can you suggest me?

        $list_id = 1;
        $ac = new \ActiveCampaign('...','.......');

        $contact = array(
            "email" => "[email protected]",
            "p[{$list_id}]" => $list_id,
            "status[{$list_id}]" => 1, 
        );

        $contact['field'] = array(
            '%NEWSLETTER%,0' => 1 // custom checkbox field name Personalization tag
        );

        $contact_sync = $ac->api("contact/sync", $contact);

duskohu avatar Jun 11 '21 10:06 duskohu