Webhooks
Webhooks provide the ability to receive real-time data updates about your contact & campaign activity.
Choose to receive data based on certain actions (subscribes, unsubscribes, reads, etc..) and have all applicable data sent to a URL of your choice. You can then use your own custom script to read, save, and do whatever you want with that data. This is a powerful option that allows you to keep all of your data in sync and opens up the possible integration options like never before.
For information on APIs to create, update, and modify webhooks, see: Webhook API Documentation
Choose when a webhook should run
With every webhook you create you can choose when it should actually fire. Perhaps you only
want to receive data when a contact is subscribed from the api? You could simply choose by the api
as the only initiation option for your webhook. You can choose multiple initiation options if you wish.
We guarantee “at least once” delivery for webhooks. In some rare cases, you may receive a webhook event more than once, so it’s important to create an idempotent system. see link for example.
Webhooks are never retried.
Processing webhook data
Any programming language can read webhook data, which comes across as "post" data to any URL.
For example, use the $_POST variable in PHP. If you need to access webhook data behind a firewall,
we have tested and find UltraHook (third-party utility) very easy to set
up and use.
Please read further about how to work with webhook data.
Automatic Webhook Deactivation
Webhooks will be automatically set to a state of inactive if they return an HTTP 410 (gone) response.
Deactivated webhooks will still show up in the UI, but they will not send. To reactivate a webhook, delete it and recreate it.
Initiation options
Webhook data you can receive
You are able to pick the specific actions that you wish to receive data for. Each field option is sent as a POST parameter to your URL.
An acccount is added
An Account is updated
A contact is added to an account
This webhook will run when a new contact is added, whether or not the contact is subscribed to a list
A contact on an account is updated
A task is added to a contact
A new list is created
A new contact is subscribed
This hook will not run during mass inserts such as contact imports.
An unsubscription occurs
A contact's details are updated
A new contact note is created
A campaign starts sending
Campaigns triggered by Events, such as Autoresponder Campaigns and Automation driven Campaigns, will not trigger webhooks.
A campaign is opened by a contact
A campaign link was clicked by a contact
A contact replies to a campaign
A contact forwards a campaign (through our forward link)
This won't work if the contact uses their email client's Forward option.
A contact shares a campaign to Facebook or Twitter
A new bounce occurs after sending a campaign
A new deal is created
An existing deal is updated
A new deal note is created
A new deal pipeline is created
A new deal stage is created
A new deal task is created
A new deal task type is created
A new SMS message is sent
A SMS message is replied to
A contact unsubscribes via SMS
Custom Object Webhooks
|
|
| eventType | Type of event received, either create, update, or delete |
| id | Custom Object record id. |
| schemaId | Custom Object schema ID. |
| externalId | Custom Object record externalId. Only present in payload if it is present in the object. |
| fields | List of fields in this custom object. These are defined in the custom object schema. This is an
associative array in the format fieldName: fieldValue. For example:
"fields":[ {"id":"some-field","value":"12345", "oldValue":"45678"} ]
oldValue is only present on update webhooks. In case of a delete event, this is an empty array. |
| relationships | List of relationships from this custom object to other ActiveCampaign objects. This is an associative
array in the format relationshipName: list of ids. For example:
"relationships: {"primary-contact":["9"]}In case of a delete event, this is an empty array. |
| createdTimestamp | Timestamp of custom object creation in the format 2023-11-13T21:45:11.935Z |
| updatedTimestamp | Timestamp of last update to the custom object in the format 2023-11-13T21:45:11.935Z |