Webhooks

Custobar can call a webhook when a certain event occurs within Custobar. The webhooks are configured in the Custobar settings.

The webhooks must be HTTPS endpoints.

Webhook: Marketing permission updated

Called whenever a marketing permission changes for a customer or a set of customers the following POST request, with content type application/json is made. By default, all the current permissions are returned together with the applicable target fields, e.g. email and phone_number.

If the customer does not have permission set, null will be returned for fields starting with can_.

Note that the generated customers can be identified with the field registered_user.

[
{
"external_id": "ID_1",
"registered_user": true,
"phone_number": "PHONE_NUMBER",
"email": "EMAIL",
"mailing_lists": ["Alerts", "Adriatic Sea"],
"can_email": true,
"can_profile": false,
"can_post": true,
"can_sms": true
},
{
"external_id": "ID_2",
"registered_user": false,
"phone_number": "PHONE_NUMBER",
"email": "EMAIL",
"mailing_lists": [],
"can_email": true,
"can_profile": false,
"can_post": true,
"can_sms": true
}
]