Use the Webhook action to send contact data to another app when a contact reaches a step in your automation. Choose JSON or form data to match what the receiving app accepts. You can also add an authentication header, custom headers, query parameters, and related records.
Take note
- The receiving app must accept HTTPS POST requests on port 443
- New webhook actions use JSON by default and include contact custom fields
- Existing URL-only actions keep their form format until you edit and save them
- This update only changes the automation action. Standard platform webhooks under Settings > Developer keep their existing configuration
Add the Webhook action
Set up the action where you want your automation to send data.
- Click Automations on the left menu. Click Edit for the automation you want to change.
- If the automation is active, pause it before making changes.
- Click the plus sign where you want to add the action.
- In Add an action, click Workflow, then Webhook.
- Enter the receiving app's URL.
- Under Output type, choose JSON or x-www-form-urlencoded.
- Add authentication, headers, or query parameters if the receiving app needs them.
- Under Include metadata, select the related data to send.
- Click Save.
- Test the request with a test contact and your receiving app. Resume the automation when the request works as expected.
Choose the output type
The output type controls the request body sent to your URL. It does not control the response from the receiving app.
- JSON sends a JSON body. New actions use this format by default
- x-www-form-urlencoded sends form fields. Choose this format if your receiving app expects form data
To change an action from form data to JSON, click JSON. Read the warning, then click Switch to JSON. This changes how the receiving app must read the request.
Add authentication and custom headers
Use Authentication for a secret that the receiving app expects in a request header. Enter the header's Name and Value. For example, use Authorization as the name and Bearer YOUR_TOKEN as the value if your app requires a bearer token.
The saved authentication value is hidden when you reopen the action. Leave the value blank to keep the saved secret when the URL stays the same. If you change the URL, enter the secret again. To remove authentication, clear the name and value, then save.
The value is sent as the header value you enter. This field does not create a payload signature. After importing a shared automation, enter your own authentication value.
Use Custom headers for other request details. Enter a Header name and Header value. Click Add header for each extra row. You can add up to ten custom header rows.
Custom header values remain visible when you reopen the action. Put secrets in Authentication.
Header names cannot contain spaces. ActiveCampaign sets Content-Type, Content-Length, Host, and Transfer-Encoding, so you cannot use those names. The authentication name must not match a custom header name.
Add query parameters
Query parameters add values to the receiving URL. Under Custom query params, enter a Parameter and Value. Click Add query param to add another row.
You can use personalization tags in query parameter values. For example, enter email as the parameter and %EMAIL% as the value. ActiveCampaign fills in the value for each contact and encodes it for the URL.
Saved query parameters are added after any query already in your URL. A value that resolves to an empty string is still sent. Use Authentication for secrets rather than query parameters.
You can also keep personalization tags in the URL itself. For account data, the tag uses account details when they exist. For deal tags, it uses the triggering deal when available. Otherwise, it uses the contact's most recently created deal. These tag rules differ from the Deals metadata option, which sends associated deal records.
Choose related data
The request always includes basic contact data and the automation ID. Under Include metadata, select each group you need:
- Custom fields adds the contact's custom field values
- Lists adds list IDs, names, and contact subscription statuses
- Tags adds the contact's tag names
- Accounts adds associated account IDs and names
- Deals adds associated deals with their IDs, titles, values, currencies, statuses, and stages
- Custom objects adds related custom object records that your account can access
For new actions, Custom fields is selected by default. The other groups are off. These controls select whole groups of data. They do not provide a free-form request body editor.
Read the JSON payload
JSON requests use contact for basic contact data and seriesid for the automation ID. Selected groups appear beside them as custom_fields, lists, tags, accounts, deals, and custom_objects.
Basic contact data includes the contact ID, email, first name, last name, phone, and account name fields. The request also includes ip4 when it is available.
Here is a shortened example with custom fields and tags selected:
{
"contact": {
"id": "123",
"email": "alex@example.com",
"first_name": "Alex",
"last_name": "Morgan",
"phone": "",
"orgname": "Example Co",
"customer_acct_name": "Example Co"
},
"seriesid": "456",
"custom_fields": {
"preferred_color": "Blue",
"job_title": null
},
"tags": ["Customer"]
}
Your values and IDs may differ. Custom field keys use lowercase personalization tag names. Unselected groups are omitted. A selected group with no records is an empty array. An empty custom_fields map is an empty object. Empty custom field strings become null in JSON.
Each custom object record has id, schema_id, and fields. If custom object data cannot be loaded, custom_objects is omitted. An omitted key does not prove the contact has no records.
Form data uses a different layout. Custom fields remain under contact[fields]. Tags are a comma-separated value under contact[tags]. Selected lists, accounts, deals, and custom objects use top-level groups. Empty groups are omitted in form data.
Update an existing webhook action
Untouched URL-only actions keep their existing form body and contact data. Opening an older action selects x-www-form-urlencoded and leaves the metadata groups unchecked.
Before you save an older action, review Include metadata and select the groups your receiving app needs. Keeping form encoding does not preserve every old payload field after a save. Test the request after changing its format or data selections.
If you only see a URL field, the configurable options are not enabled for your account. You can continue using the URL-only action.
Learn more about using ActiveCampaign webhooks.