Webhooks

Webhooks allow you to subscribe to events happening on the Didomi platform to implement custom workflows when your users change their consent preferences. When users make choices on your websites, mobile apps, or preferences center, you will receive a notification allowing you to react to user choices.

When an event is triggered, we'll send a HTTP POST payload to the configured webhook endpoint. Webhooks are configured at the organization level and automatically apply to all consent events triggered within your organization, on all websites, mobile apps, or preferences center.

Configuration

Webhooks can be configured by reaching out to our support team.

You will need to specify the HTTP endpoint that Didomi will push to. You can optionally specify credentials and an authentication flow to use.

If your endpoint only supports whitelisted IPs, you'll need to whitelist the IP 35.159.1.63 to allow Didomi to push consent events.

To ensure that the consent events are received, when your endpoint is down, we retry at least five times during five minutes before moving on.

Payload

Events sent to your HTTP endpoints are sent as JSON-encoded objects with the following information:

Field

Description

type

Event type

The type of event.

string

Parameters

Entities affected by the event.

object

Events

Type

Description

Parameters

event.created

A new consent event has been created

entity

event.updated

An existing consent event has been updated

source, old_entity, new_entity

event.deleted

An existing consent event has been deleted

entity

user.created

A new user has been created

entity

user.updated

An existing user has been updated

source, old_entity, new_entity

user.deleted

An existing user has been deleted

entity

The payload is a JSON string in the body of the HTTP request. Examples:

{
"type": "user.updated",
"parameters": {
"source": {
"id": "unique_event_id",
"created_at": "2019-08-07T10:45:11Z",
...
},
"old_entity": {
"id": "didomi_user_id",
"organization_user_id": "organization_user_id",
...
},
"new_entity": {
"id": "didomi_user_id",
"organization_user_id": "organization_user_id",
...
}
}
}
{
"type": "event.deleted",
"parameters": {
"entity": {
"id": "deleted_event_id",
"created_at": "2019-08-07T10:45:11Z",
...
},
}
}