Skip to main content

Webhook

Stefan Schindler avatar
Written by Stefan Schindler
Updated over a year ago

When a Webhook URL is configured, this URL is called for:

  • active actions (and changes of address and core data)

  • updates of a person (tags added/removed, custom fields)

  • removal of a person

The Webhook needs to answer with HTTP 200, otherwise the request is marked as failed.

The data is sent as application/x-www-form-urlencoded and contains the following data:

  • type (action, updated or deleted)

  • person including all core fields, tags and custom fields

    • if the type is deleted, only the id and the email of the person are sent

  • ChangeSource:

    • API, if called via the *POST* /people route

    • CamBuildr otherwise

  • ChangeUser:

    • Public if not authenticated

    • the <User-ID> if authenticated

  • if the webhook was called because of an action, also the action that was performed.

Here is the example Payload for a Webhook call with an action:

{
"person":
{
"id": 1,
"email": "[email protected]",
"customer_id": 1",
"name": "Max",
"surname": "Mustermann",
"gender": "m",
"birthdate": "1980-10-20T00:00:00.000000Z",
"unsubscribed": "0",
"blocked": "0",
"identifier": "<md5>",
"hash": "<md5>",
"tags":
[
{"name": "tag1"},
{"name": "tag2"},
...
],
"zip_code": "1010",
"street": "...",
"city": "Wien",
"country": "Österreich",
"country_alpha2": "AT",
"updated_at": "<timestamp>",
"created_at": "<timestamp>",
"last_action": "<timestamp>",
"first_action": "<timestamp>",
"custom_field_1": "custom_field_value"
...
},
"type": "action",
"ChangeSource": "API",
"ChangeUser": "Public",
"action": {
"name": "<name of the action>",
"context": "<context of the action>",
"source": "<source of the action>",
"vendor": "<vendor of the action>",
}
}

-

Did this answer your question?