I have a date custom field that I would like to update through the API (I am using ActiveCampaign.class.php).
This is the webhook I wrote in php, but I get a 500 errors when I test it and the date field doesn’t get updated:
require_once("includes/ActiveCampaign.class.php"); $ac = new ActiveCampaign("MY_URL", "MY_API_KEY"); $email = $contact['email']; $data = date("d-m-Y"); $contact = array( "email" = $email, "field[%TEST_%,0]" = "OK", "field[%DATE_TEST%,0]" = $data ); $contact_sync = $ac->api("contact/sync", $contact);
Of course MY_URL and MY_API are filled with the correct data.
The webhook works as expected for the other custom fields but not for the date field.