For the complete documentation index, see llms.txt. This page is also available as Markdown.

Query consent events

You can query consent events for a user by calling the GET /consents/events endpoint.

You must specify either the organization user ID (organization_user_id query-string parameter) or the Didomi user ID (user_id query-string parameter) of the end-user for which you are querying events.

By default, consent events are registered under GDPR regulation. To query consent events from another regulation, you must specify the regulation with the regulation query-string parameter

Click here to review all regulations supported by Didomi.

(See all regulations supported by Didomi).

Example

GET /consents/events
  ?organization_id={organization_id}
  &organization_user_id={organization_user_id}
  &regulation=cpra

RESPONSE:
{
  "data": [
    {
      "id": "00b89328-e3d5-4068-b346-8f4fcb4618df",
      
      "user": {
        "id": "a3722cd3-f2e4-4451-a564-83f5e8921449",
        "metadata": {
           ...custom user metadata
        }
      },
      
      "consents": {
        "purposes": [
          {
            "id": "purpose_id",
            "enabled": true
          }
        ]
      }
    }
  ]
}

Query pending events

By default, the GET /consents/events endpoint only returns confirmed events. To get pending events, you must specify a status filter in the query-string parameter.

For instance, to get all confirmed and pending events, you would do:

Query specific event

You can also query for a specific event by ID by calling GET /consents/events/:id.

Last updated