> For the complete documentation index, see [llms.txt](https://developers.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.didomi.io/api-and-platform/consents/events/consent-event-schema.md).

# Consent event schema

{% hint style="info" %}
Organizations subscribed to Didomi after 18 January 2022 is utilizing API v2 by default.
{% endhint %}

Since **18 January 2022**, Didomi API supports validation of end-user choices through the Didomi SDK or through your organization's custom UI. End-user choices are now validated, which means that only existing or previously existing purposes, preferences and preferences value IDs in your organization will be accepted by the API. It ensures that:

* The right consent is always collected and mistakes are prevents
* Events/consents are following a proper and structured format
* Your organization controls what can be sent to the API

Preferences are now flat, unique and can contain multiple values. They are more readable, easy to access, and collecting choices in your integrations should be simplified.

{% hint style="warning" %}
**Note**: The `$include_full_tree=true` parameter can alter the shape of the schema. For your convenience, we provide separate data dictionaries and schemas for when the parameter changes the shape of the schema
{% endhint %}

<details>

<summary>Consent event schema and data dictionary API v2 and v1 (Legacy) with <code>$include_full_tree=true</code></summary>

```jsonc
{
    /**
     * Unique event ID. Automatically generated by the API if not provided on event creation
     */
    "id": "550e8400-e29b-41d4-a716-446655440000",

    /**
     * Organization ID
     */
    "organization_id": "string",

    /**
     * Creation date of the event. Automatically generated by the API if not provided on event creation
     */
    "created_at": "ISO-8601",

    /**
     * Update date of the event
     */
    "updated_at": "ISO-8601",

    /**
     * Free-form metadata object
     */
    "metadata": {},

    /**
     * End-user information
     */
    "user": {

        /**
         * Didomi user ID
         */
        "id": "string",

        /**
         * Unique user ID assigned by your organization that is used to link a Didomi end-user to your internal systems as well as resolve cross-platform IDs.
         */
        "organization_user_id": "string",

        /**
         * Type of the external user ID defined by the organization
         */
        "organization_user_id_type": "string",

        /**
         * Free-form metadata object
         */
        "metadata": {},

        /**
         * Two-letter ISO code of the end-user's country
         */
        "country": "DE",

        /**
         * Two-letter ISO country code of the last submitted consent event for the user
         */
        "last_seen_country": "DE",

        /**
         * External email defined by the organization
         */
        "email": "user@example.com",

        /**
         * External phone number defined by the organization
         */
        "phone": "+12345678901"
    },

    /**
     * Source information for consent events. Tracks where and how the consent event was generated.
     */
    "source": {
        /**
         * Type of source (e.g., web, mobile, api)
         */
        "type": "sdk-web",

        /**
         * Source key identifier
         */
        "key": "string",

        /**
         * Provider information
         */
        "provider": "string",

        /**
         * Target information
         */
        "target": "string",

        /**
         * Deployment ID associated with the source
         */
        "deployment_id": "string"
    },

    /**
     * Consent status of the end-user
     */
    "consents": {
        /**
         * Channels for which the end-user made choices
         * Note: This is a legacy property.
         */
        "channels": [
            {

                /**
                 * Unique channel ID
                 */
                "id": "string",

                /**
                 * Whether the end-user has enabled this channel or not 
                 * Note: A null value indicates that the user has not made a specific choice for the channel
                 */
                "enabled": false,

                /**
                 * Free-form metadata object
                 */
                "metadata": {}
            }
        ],

        /**
         * Purposes (for both CMP and Preference Management Platform)
         */
        "purposes": [
            {
                /**
                 * Unique identifier for the data processing purpose
                 */
                "id": "string",

                /**
                 * End-user's consent choice for this purpose.
                 * true: consent given (user opted in)
                 * false: consent denied (user opted out)
                 * undefined: not specified
                 */
                "enabled": true,

                /**
                 * End-user's objection status for legitimate interest processing.
                 * true: no objection (legitimate interest processing allowed)
                 * false: objection raised (legitimate interest processing blocked)
                 * undefined: not specified (legitimate interest not applicable)
                 */
                "enabled_li": null,

                /**
                 * Custom metadata for organization-specific data storage
                 */
                "metadata": {},

                /**
                 * Indicates whether consent propagation was applied to this purpose.
                 * true: propagation was applied to this purpose
                 * undefined: propagation was not applied (either not allowed or not applicable)
                 */
                "propagation": true,

                /**
                 * Indicates whether this purpose exists in the configuration tree 
                 * true: exists in configuration tree
                 * false: added from user consent data
                 * Note: Always present when using $include_full_tree=true.
                 */
                "from_tree": true,

                /**
                 * Localized names for the purpose from the configuration tree. 
                 * Only present if the configuration tree has name content for this purpose.
                 */
                "name": {},

                /**
                 * Localized descriptions explaining the purpose from the configuration tree. 
                 * Only present if the configuration tree has description content for this purpose.
                 */
                "description": {},

                /**
                 * Preferences for which the end-user has made choices 
                 */
                "values": {
                    /**
                     * Preference selection containing the end-user's choice
                     * Note: Key is the configured ID of the preference
                     */
                    "PREFERENCE_ID": {
                        /**
                         * Preference values that the end-user has made choices for
                         */
                        "value": "value_a,value_b",

                        /**
                         * Indicates whether this preference exists in the configuration tree 
                         * true: exists in configuration tree
                         * false: added from user consent data
                         * Note: Always present when using $include_full_tree=true.
                         */
                        "from_tree": true,

                        /**
                         * Parent preference ID that this preference belongs to. 
                         * Can be null for top-level preferences or undefined if not specified.
                         */
                        "parent_id": null,

                        /**
                         * Name of the preference in the configuration tree
                         */
                        "name": {},

                        /**
                         * Description of the preference in the configuration tree
                         */
                        "description": {}
                    }
                }
            }
        ],

        /**
         * Vendors for which the end-user has made choices 
         */
        "vendors": {
            /**
             * List of vendors where end-user has explicitly given consent for data processing
             */
            "enabled": [],

            /**
             * List of vendors where end-user has explicitly denied consent for data processing
             */
            "disabled": [],

            /**
             * List of vendors where end-user allows legitimate interest processing
             */
            "enabled_li": [],

            /**
             * List of vendors where end-user objects to legitimate interest processing
             */
            "disabled_li": []
        },

        /**
         * TCF consent string for the end-user (if it was available or generated at the time of consent collection)
         */
        "tcfcs": "string",
        
        /**
         * Global Privacy Platform (GPP) consent string for the end-user (if it was available at the time of consent collection)
         * Optional. A non-empty string, or null.
         */
        "gpp_string": "GPP_STRING_HERE",
      
        /**
         * Timestamp of when consents were last updated
         */
        "updated_at": "ISO-8601",

        /**
         * Configuration tree metadata.
         * Note: Always present when $include_full_tree=true.
         */
        "config_tree": {
            /**
             * Unique ID of the configuration tree
             */
            "id": "string",

            /**
             * Date the configuration tree was created
             */
            "created_at": "ISO-8601",

            /**
             * Update date for the configuration tree
             */
            "updated_at": "ISO-8601"
        }
    },

    /**
     * Delegate information for consent events. Represents third parties acting on behalf of the user.
     * Note: Returns null if event not created by a delegate.
     */
    "delegate": {
        /**
         * Unique ID of the delegate
         */
        "id": "string",

        /**
         * Name of the delegate
         */
        "name": "string",

        /**
         * Free-form metadata object for the delegate
         */
        "metadata": {}
    },

    /**
     * Device identifier provided by SDK clients
     */
    "device_id": "string",

    /**
     * IDs of proofs associated with this event
     */
    "proofs_id": ["string1", "string2"],

    /**
     * Validation information (if the event was validated). 
     * null if there is no validation
     */
    "validation": {
        /**
         * Validation type used for this event. Allowed values: email | signature
         */
        "type": "email",

        /**
         * URL for approving the event (if applicable)
         */
        "approve_url": "URL"
    },

    /**
     * Status of the event:  
     * "confirmed": indicates that the event has been validated or was not subject to validation 
     * "pending_approval": indicates that the event is pending validation
     */
    "status": "pending_approval",

    /**
     * Regulation for which the consent is collected
     */
    "domain": "example.com",

    /**
     *
     */
    "regulation": "gdpr",
    /**
     * IAB framework information associated with the consent
     */
    "iab": {
        /**
         * IAB Transparency and Consent Framework (TCF) details. Optional.
         */
        "tcf": {
            /**
             * TCF specification version. Optional.
             */
            "version": 2,
            /**
             * IAB-registered ID of the CMP that collected the consent.
             * Required when "tcf" is provided.
             */
            "cmp_id": 300,
            /**
             * Version of the CMP that collected the consent. Optional.
             */
            "cmp_version": 1,
            /**
             * Number of the screen of the CMP UI on which the end-user gave consent. Optional.
             */
            "consent_screen": 1,
            /**
             * Language in which the consent was collected, as two uppercase letters (e.g. EN, FR). Optional.
             */
            "consent_language": "EN",
            /**
             * Version of the IAB Global Vendor List used when the consent was collected.
             * Optional. Must be 81 or higher.
             */
            "vendor_list_version": 150,
            /**
             * Two-letter country code of the publisher. Optional.
             */
            "publisher_cc": "FR",
            /**
             * Whether non-standard texts were used to describe purposes and features. Optional.
             */
            "use_non_standard_texts": false,
            /**
             * Whether Purpose 1 (store and/or access information on a device) is treated as not disclosed. Optional.
             */
            "purpose_one_treatment": false,
            /**
             * Restrictions that the publisher applies to how vendors may process data for a purpose. Optional.
             */
            "publisher_restrictions": [
                {
                    /**
                     * Identifier of the restriction. Optional.
                     * Letters, digits, hyphens and underscores only.
                     */
                    "id": "restriction-1",
                    /**
                     * ID of the purpose the restriction applies to. Required.
                     */
                    "purposeId": "2",
                    /**
                     * Vendors the restriction applies to. Required.
                     */
                    "vendors": {
                        /**
                         * Scope of the restriction. Required.
                         * Allowed values: all | list
                         */
                        "type": "list",
                        /**
                         * List of vendor IDs (numbers or strings).
                         * Required when "type" is "list", otherwise optional.
                         */
                        "ids": [755, "4"]
                    },
                    /**
                     * Type of restriction applied. Required.
                     * Allowed values: allow | disallow | req-consent | req-li
                     */
                    "restrictionType": "req-consent"
                }
            ],
            /**
             * Vendors that were disclosed to the end-user. Optional.
             */
            "disclosed_vendors": {
                /**
                 * List of disclosed vendor IDs. Optional.
                 */
                "vendors": ["755", "4"],
                /**
                 * Whether vendors for which the end-user gave consent are also included in the disclosed vendors. Optional.
                 */
                "include_consent_vendors": true
            }
        }
    }
}
```

<table><thead><tr><th width="174.2000732421875">Key</th><th width="134.4000244140625">Data type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>String</td><td>Unique event ID. Automatically generated by the API if not provided on event creation</td></tr><tr><td><code>organization_id</code></td><td>String</td><td>Organization ID</td></tr><tr><td><code>created_at</code></td><td>ISO 8601 Date</td><td>Creation date of the event. Automatically generated by the API if not provided on event creation</td></tr><tr><td><code>updated_at</code></td><td>ISO 8601 Date | null</td><td>Update date of the event</td></tr><tr><td><code>metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>user</code></td><td>Object</td><td>End-user information</td></tr><tr><td><code>user.id</code></td><td>String</td><td>Didomi user ID</td></tr><tr><td><code>user.organization_user_id</code></td><td>String</td><td>Unique user ID assigned by your organization that is used to link a Didomi end-user to your internal systems as well as resolve cross-platform IDs.</td></tr><tr><td><code>user.organization_user_id_type</code></td><td>String</td><td>Type of the external user ID defined by the organization</td></tr><tr><td><code>user.metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>user.country</code></td><td>String | null</td><td>Two-letter ISO code of the end-user's country</td></tr><tr><td><code>user.last_seen_country</code></td><td>String | null</td><td>Two-letter ISO country code of the last submitted consent event for the user</td></tr><tr><td><code>user.email</code></td><td>String | null</td><td>External email defined by the organization</td></tr><tr><td><code>user.phone</code></td><td>String | null</td><td>External phone number defined by the organization</td></tr><tr><td><code>source</code></td><td>Object</td><td>Source information for consent events. Tracks where and how the consent event was generated.</td></tr><tr><td><code>source.type</code></td><td>String</td><td>Type of source (e.g., web, mobile, api). The value of this field can be dependent on the SDK, for example: <code>sdk-web</code>, <code>sdk-mobile</code>, <code>sdk-ctv</code></td></tr><tr><td><code>source.key</code></td><td>String</td><td>Source key identifier</td></tr><tr><td><code>source.provider</code></td><td>String</td><td>Provider information</td></tr><tr><td><code>source.target</code></td><td>String</td><td>Target information</td></tr><tr><td><code>source.deployment_id</code></td><td>String</td><td>Deployment ID associated with the source</td></tr><tr><td><code>consents</code></td><td>Object</td><td>Consent status of the end-user</td></tr><tr><td><code>consents.channels</code></td><td>Array of Objects</td><td><p>Channels for which the end-user made choices</p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: This is a legacy property.</mark></p></td></tr><tr><td><code>consents.channels.id</code></td><td>String</td><td>Unique channel ID</td></tr><tr><td><code>consents.channels.enabled</code></td><td>Boolean | null</td><td><p>Whether the end-user has enabled this channel or not </p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: A <code>null</code> value indicates that the user has not made a specific choice for the channel</mark></p></td></tr><tr><td><code>consents.channels.metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>consents.purposes</code></td><td>Array of Objects</td><td>Purposes (for both CMP and Preference Management Platform)</td></tr><tr><td><code>consents.purposes.id</code></td><td>String</td><td>Unique identifier for the data processing purpose</td></tr><tr><td><code>consents.purposes.enabled</code></td><td>Boolean | null</td><td><p>End-user's consent choice for this purpose.</p><ul><li><code>true</code>: consent given (user opted in)</li><li><code>false</code>: consent denied (user opted out)</li><li><code>undefined</code>: not specified</li></ul></td></tr><tr><td><code>consents.purposes.enabled_li</code></td><td>Boolean | null</td><td><p>End-user's objection status for legitimate interest processing.</p><ul><li><code>true</code>: no objection (legitimate interest processing allowed)</li><li><code>false</code>: objection raised (legitimate interest processing blocked)</li><li><code>undefined</code>: not specified (legitimate interest not applicable)</li></ul></td></tr><tr><td><code>consents.purposes.metadata</code></td><td>Object</td><td>Custom metadata for organization-specific data storage</td></tr><tr><td><code>consents.purposes.propagation</code></td><td>Boolean</td><td><p>Indicates whether consent propagation was applied to this purpose.</p><ul><li><code>true</code>: propagation was applied to this purpose</li><li><code>undefined</code>: propagation was not applied (either not allowed or not applicable)</li></ul></td></tr><tr><td><code>consents.purposes.from_tree</code></td><td>Boolean</td><td><p>Indicates whether this purpose exists in the configuration tree </p><ul><li><code>true</code>: exists in configuration tree</li><li><code>false</code>: added from user consent data</li></ul><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: Always present when using <code>$include_full_tree=true</code>.</mark></p></td></tr><tr><td><code>consents.purposes.name</code></td><td>Object</td><td>Localized names for the purpose from the configuration tree. Only present if the configuration tree has name content for this purpose.</td></tr><tr><td><code>consents.purposes.description</code></td><td>Object</td><td>Localized descriptions explaining the purpose from the configuration tree. Only present if the configuration tree has description content for this purpose.</td></tr><tr><td><code>consents.purposes.values</code></td><td>Object</td><td>Preferences for which the end-user has made choices </td></tr><tr><td><code>consents.purposes.values.[PREFERENCE_ID]</code></td><td>Object</td><td><p>Preference selection containing the end-user's choice</p><p><br><mark style="background-color:$warning;"><strong>Note</strong>: Key is the configured ID of the preference</mark></p></td></tr><tr><td><code>consents.purposes.values.[PREFERENCE_ID].value</code></td><td>String</td><td>Preference values that the end-user has made choices for</td></tr><tr><td><code>consents.purposes.values.[PREFERENCE_ID].from_tree</code></td><td>Boolean</td><td><p>Indicates whether this preference exists in the configuration tree </p><ul><li><code>true</code>: exists in configuration tree</li><li><code>false</code>: added from user consent data</li></ul><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: Always present when using <code>$include_full_tree=true</code>.</mark></p></td></tr><tr><td><code>consents.purposes.values.[PREFERENCE_ID].parent_id</code></td><td>String | null</td><td>Parent preference ID that this preference belongs to. Can be <code>null</code> for top-level preferences or <code>undefined</code> if not specified.</td></tr><tr><td><code>consents.purposes.values.[PREFERENCE_ID].name</code></td><td>Object</td><td>Name of the preference in the configuration tree</td></tr><tr><td><code>consents.purposes.values.[PREFERENCE_ID].description</code></td><td>Object</td><td>Description of the preference in the configuration tree</td></tr><tr><td><code>consents.vendors</code></td><td>Object</td><td>Vendors for which the end-user has made choices </td></tr><tr><td><code>consents.vendors.enabled</code></td><td>Array of Strings</td><td>List of vendors where end-user has explicitly given consent for data processing</td></tr><tr><td><code>consents.vendors.disabled</code></td><td>Array of Strings</td><td>List of vendors where end-user has explicitly denied consent for data processing</td></tr><tr><td><code>consents.vendors.enabled_li</code></td><td>Array of Strings</td><td>List of vendors where end-user allows legitimate interest processing</td></tr><tr><td><code>consents.vendors.disabled_li</code></td><td>Array of Strings</td><td>List of vendors where end-user objects to legitimate interest processing</td></tr><tr><td><code>consents.tcfcs</code></td><td>String | null</td><td>TCF consent string for the end-user (if it was available or generated at the time of consent collection)</td></tr><tr><td><code>consents.gpp_string</code></td><td>String | null</td><td>Global Privacy Platform (GPP) consent string for the end-user (if it was available at the time of consent collection)</td></tr><tr><td><code>consents.updated_at</code></td><td>ISO 8601 Date | null</td><td>Timestamp of when consents were last updated</td></tr><tr><td><code>consents.config_tree</code></td><td>Object</td><td><p>Configuration tree metadata.</p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: Always present when <code>$include_full_tree=true</code>.</mark></p></td></tr><tr><td><code>consents.config_tree.id</code></td><td>String</td><td>Unique ID of the configuration tree</td></tr><tr><td><code>consents.config_tree.created_at</code></td><td>ISO 8601 Date </td><td>Date the configuration tree was created</td></tr><tr><td><code>consents.config_tree.updated_at</code></td><td>ISO 8601 Date </td><td>Update date for the configuration tree</td></tr><tr><td><code>delegate</code></td><td>Object | null</td><td><p>Delegate information for consent events. Represents third parties acting on behalf of the user.</p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: Returns <code>null</code> if event not created by a delegate.</mark></p></td></tr><tr><td><code>delegate.id</code></td><td>String</td><td>Unique ID of the delegate</td></tr><tr><td><code>delegate.name</code></td><td>String</td><td>Name of the delegate</td></tr><tr><td><code>delegate.metadata</code></td><td>Object</td><td>Free-form metadata object for the delegate</td></tr><tr><td><code>device_id</code></td><td>String | null</td><td>Device identifier provided by SDK clients</td></tr><tr><td><code>proofs_id</code></td><td>Array</td><td>IDs of proofs associated with this event</td></tr><tr><td><code>validation</code></td><td>Object | null</td><td>Validation information (if the event was validated). <code>null</code> if there is no validation</td></tr><tr><td><code>validation.type</code></td><td>String enum</td><td>Validation type used for this event. Allowed values: <code>email</code> | <code>signature</code></td></tr><tr><td><code>validation.approve_url</code></td><td>String</td><td>URL for approving the event (if applicable)</td></tr><tr><td><code>status</code></td><td>String</td><td><p>Status of the event:  </p><ul><li><code>"confirmed"</code>: indicates that the event has been validated or was not subject to validation </li><li><code>"pending_approval"</code>: indicates that the event is pending validation</li></ul></td></tr><tr><td><code>domain</code></td><td>String | null</td><td>Domain of the preference center<br><br><mark style="background-color:$warning;"><strong>Note</strong>: Used to know which preference center is this consent linked to. For example, to send a authenticated link to the preference center on user creation</mark></td></tr><tr><td><code>regulation</code></td><td>String</td><td>Regulation for which the consent is collected</td></tr><tr><td><code>iab</code></td><td>Object</td><td>IAB framework information applied when the end-user’s choices were collected</td></tr><tr><td><code>iab.tcf</code></td><td>Object</td><td>IAB Transparency and Consent Framework (TCF) details</td></tr><tr><td><code>iab.tcf.version</code></td><td>Number</td><td>TCF specification version</td></tr><tr><td><code>iab.tcf.cmp_id</code></td><td>Number</td><td>IAB-registered ID of the CMP that collected the consent</td></tr><tr><td><code>iab.tcf.cmp_version</code></td><td>Number</td><td>Version of the CMP that collected the consent</td></tr><tr><td><code>iab.tcf.consent_screen</code></td><td>Number</td><td>Number of the screen of the CMP UI on which the end-user gave consent</td></tr><tr><td><code>iab.tcf.consent_language</code></td><td>String</td><td>Language in which the consent was collected, as two uppercase letters (for example <code>EN</code>)</td></tr><tr><td><code>iab.tcf.vendor_list_version</code></td><td>Number</td><td>Version of the IAB Global Vendor List used when the consent was collected. Must be 81 or higher</td></tr><tr><td><code>iab.tcf.publisher_cc</code></td><td>String</td><td>Two-letter country code of the publisher</td></tr><tr><td><code>iab.tcf.use_non_standard_texts</code></td><td>Boolean</td><td>Whether non-standard texts were used to describe purposes and features</td></tr><tr><td><code>iab.tcf.purpose_one_treatment</code></td><td>Boolean</td><td>Whether Purpose 1 (store and/or access information on a device) is treated as not disclosed</td></tr><tr><td><code>iab.tcf.publisher_restrictions</code></td><td>Array of Objects</td><td>Restrictions the publisher applies to how vendors may process data for a purpose</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].id</code></td><td>String</td><td>Identifier of the restriction. Letters, digits, hyphens and underscores only.</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].purposeId</code></td><td>String</td><td>ID of the purpose the restriction applies to</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors</code></td><td>Object</td><td>Vendors the restriction applies to</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors.type</code></td><td>String</td><td>Scope of the restriction. Allowed values: <code>all</code> | <code>list</code></td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors.ids</code></td><td>Array of Numbers or Strings</td><td>List of vendor IDs the restriction applies to. Required when <code>consents.iab.tcf.publisher_restrictions[].vendors.type</code> is <code>list</code> . Optional otherwise</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].restrictionType</code></td><td>String</td><td>Type of restriction applied. Allowed values: <code>allow</code> | <code>disallow</code> | <code>req-consent</code> | <code>req-li</code></td></tr><tr><td><code>iab.tcf.disclosed_vendors</code></td><td>Object</td><td>Vendors that were disclosed to the end-user</td></tr><tr><td><code>iab.tcf.disclosed_vendors.vendors</code></td><td>Array of Strings</td><td>List of disclosed vendor IDs</td></tr><tr><td><code>iab.tcf.disclosed_vendors.include_consent_vendors</code></td><td>Boolean</td><td>Whether vendors for which the end-user gave consent are also included in the disclosed vendors</td></tr></tbody></table>

</details>

<details>

<summary>Consent event schema and data dictionary API v2 without <code>$include_full_tree=true</code></summary>

```jsonc
{
    /**
     * Unique event ID. Automatically generated by the API if not provided on event creation
     */
    "id": "550e8400-e29b-41d4-a716-446655440000",
    /**
     * Organization ID
     */
    "organization_id": "string",
    /**
     * Creation date of the event. 
     * Automatically generated by the API if not provided on event creation
     */
    "created_at": "ISO-8601",
    /**
     * Update date of the event
     */
    "updated_at": "ISO-8601",
    /**
     * Free-form metadata object
     */
    "metadata": {},
    /**
     * End-user information
     */
    "user": {
        /**
         * Didomi user ID
         */
        "id": "string",
        /**
         * Unique user ID assigned by your organization that is used to link a Didomi end-user to your internal systems as well as resolve cross-platform IDs.
         */
        "organization_user_id": "string",
        /**
         * Type of the external user ID defined by the organization
         */
        "organization_user_id_type": "string",
        /**
         * Free-form metadata object
         */
        "metadata": {},
        /**
         * Two-letter ISO code of the end-user's country
         */
        "country": "US",
        /**
         * Two-letter ISO country code of the last submitted consent event for the user
         */
        "last_seen_country": "US",
        /**
         * External email defined by the organization
         */
        "email": "user@example.com",
        /**
         * External phone number defined by the organization
         */
        "phone": "+12345678901"
    },

    /**
     * Source information for consent events. 
     * Tracks where and how the consent event was generated.
     */
    "source": {
        /**
         * Type of source (e.g., web, mobile, api)
         */
        "type": "sdk-web",
        /**
         * Source key identifier
         */
        "key": "string",
        /**
         * Provider information
         */
        "provider": "string",
        /**
         * Target information
         */
        "target": "string",
        /**
         * Deployment ID associated with the source
         */
        "deployment_id": "string"
    },
    /**
     * Consent status of the end-user
     */
    "consents": {
        /**
         * Channels for which the end-user made choices
         * Note: This is a legacy property.
         */
        "channels": [
            {
                /**
                 * Unique channel ID
                 */
                "id": "string",
                /**
                 * Whether the end-user has enabled this channel or not 
                 * Note: A null value indicates that the user has not made a specific choice for the channel
                 */
                "enabled": false,
                /**
                 * Free-form metadata object
                 */
                "metadata": {}
            }
        ],
        /**
         * Purposes (for both CMP and Preference Management Platform)
         */
        "purposes": [
            {
                /**
                 * Unique identifier for the data processing purpose
                 */
                "id": "string",
                /**
                 * End-user's consent choice for this purpose.
                 * true: consent given (user opted in)
                 * false: consent denied (user opted out)
                 * undefined: not specified
                 */
                "enabled": true,
                /**
                 * End-user's objection status for legitimate interest processing.
                 * true: no objection (legitimate interest processing allowed)
                 * false: objection raised (legitimate interest processing blocked)
                 * undefined: not specified (legitimate interest not applicable)
                 */
                "enabled_li": null,
                /**
                 * Custom metadata for organization-specific data storage
                 */
                "metadata": {},
                /**
                 * Preferences for which the end-user has made choices 
                 */
                "values": {
                    /**
                     * Preference selection containing the end-user's choice
                     * Note: Key is the configured ID of the preference
                     */
                    "PREFERENCE_ID": {
                        /**
                         * Preference values that the end-user has made choices for
                         */
                        "value": "value_a,value_b",
                        /**
                         * Indicates whether this value was set through consent propagation.
                         * true: value was propagated from config tree
                         * false: value was explicitly set by user
                         */
                        "from_propagation": false
                    }
                },
                /**
                 * Indicates whether consent propagation was applied to this purpose.
                 * true: propagation was applied to this purpose
                 * undefined: propagation was not applied (either not allowed or not applicable)
                 */
                "propagation": true
            }
        ],
        /**
         * Vendors for which the end-user has made choices 
         */
        "vendors": {
            /**
             * List of vendors where end-user has explicitly given consent for data processing
             */
            "enabled": ["string1"],
            /**
             * List of vendors where end-user has explicitly denied consent for data processing
             */
            "disabled": [],
            /**
             * List of vendors where end-user allows legitimate interest processing
             */
            "enabled_li": [],
            /**
             * List of vendors where end-user objects to legitimate interest processing
             */
            "disabled_li": []
        },
        /**
         * TCF consent string for the end-user (if it was available or generated at the time of consent collection)
         */
        "tcfcs": null,
        /**
         * Global Privacy Platform (GPP) consent string for the end-user (if it was available at the time of consent collection)
         * Optional. Can be null.
         */
        "gpp_string": "GPP_STRING_HERE",
        /**
         * Timestamp of when consents were last updated
         */                 
        "updated_at": "ISO-8601"
    },
    /**
     * Delegate information for consent events. Represents third parties acting on behalf of the user.
     * Note: Returns null if event not created by a delegate.
     */
    "delegate": {
        /**
         * Unique ID of the delegate
         */
        "id": "string",
        /**
         * Name of the delegate
         */
        "name": "Customer Support Agent",
        /**
         * Free-form metadata object for the delegate
         */
        "metadata": {}
    },
    /**
     * Device identifier provided by SDK clients
     */
    "device_id": "string",
    /**
     * IDs of proofs associated with this event
     */
    "proofs_id": ["proof_001", "proof_002"],
    /**
     * Validation information (if the event was validated). 
     * null if there is no validation
     */
    "validation": {
        /**
         * Validation type used for this event. Allowed values: email | signature
         */
        "type": "email",
        /**
         * URL for approving the event (if applicable)
         */
        "approve_url": "https://example.com/approve/event/550e8400-e29b-41d4-a716-446655440000"
    },
    /**
     * Status of the event:  
     * "confirmed": indicates that the event has been validated or was not subject to validation 
     * "pending_approval": indicates that the event is pending validation
     */
    "status": "pending_approval",
    /**
     * Domain of the preference center
     * Note: Used to know which preference center is this consent linked to. For example, to send a authenticated link to the preference center on user creation
     */
    "domain": "example.com",
    /**
     * Regulation for which the consent is collected
     */
    "regulation": "gdpr",
    /**
     * IAB framework information associated with the consent
     */
    "iab": {
        /**
         * IAB Transparency and Consent Framework (TCF) details. Optional.
         */
        "tcf": {
            /**
             * TCF specification version. Optional.
             */
            "version": 2,
            /**
             * IAB-registered ID of the CMP that collected the consent.
             * Required when "tcf" is provided.
             */
            "cmp_id": 300,
            /**
             * Version of the CMP that collected the consent. Optional.
             */
            "cmp_version": 1,
            /**
             * Number of the screen of the CMP UI on which the end-user gave consent. Optional.
             */
            "consent_screen": 1,
            /**
             * Language in which the consent was collected, as two uppercase letters (e.g. EN, FR). Optional.
             */
            "consent_language": "EN",
            /**
             * Version of the IAB Global Vendor List used when the consent was collected.
             * Optional. Must be 81 or higher.
             */
            "vendor_list_version": 150,
            /**
             * Two-letter country code of the publisher. Optional.
             */
            "publisher_cc": "FR",
            /**
             * Whether non-standard texts were used to describe purposes and features. Optional.
             */
            "use_non_standard_texts": false,
            /**
             * Whether Purpose 1 (store and/or access information on a device) is treated as not disclosed. Optional.
             */
            "purpose_one_treatment": false,
            /**
             * Restrictions that the publisher applies to how vendors may process data for a purpose. Optional.
             */
            "publisher_restrictions": [
                {
                    /**
                     * Identifier of the restriction. Optional.
                     * Letters, digits, hyphens and underscores only.
                     */
                    "id": "restriction-1",
                    /**
                     * ID of the purpose the restriction applies to. Required.
                     */
                    "purposeId": "2",
                    /**
                     * Vendors the restriction applies to. Required.
                     */
                    "vendors": {
                        /**
                         * Scope of the restriction. Required.
                         * Allowed values: all | list
                         */
                        "type": "list",
                        /**
                         * List of vendor IDs (numbers or strings).
                         * Required when "type" is "list", otherwise optional.
                         */
                        "ids": [755, "4"]
                    },
                    /**
                     * Type of restriction applied. Required.
                     * Allowed values: allow | disallow | req-consent | req-li
                     */
                    "restrictionType": "req-consent"
                }
            ],
            /**
             * Vendors that were disclosed to the end-user. Optional.
             */
            "disclosed_vendors": {
                /**
                 * List of disclosed vendor IDs. Optional.
                 */
                "vendors": ["755", "4"],
                /**
                 * Whether vendors for which the end-user gave consent are also included in the disclosed vendors. Optional.
                 */
                "include_consent_vendors": true
            }
        }
    }
}
```

<table><thead><tr><th width="174.2000732421875">Key</th><th width="134.4000244140625">Data type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>String</td><td>Unique event ID. Automatically generated by the API if not provided on event creation</td></tr><tr><td><code>organization_id</code></td><td>String</td><td>Organization ID</td></tr><tr><td><code>created_at</code></td><td>ISO 8601 Date</td><td><p>Creation date of the event. Automatically generated by the API if not provided on event creation</p><p>Creation date of the event. Automatically generated by the API if not provided on event creation</p></td></tr><tr><td><code>updated_at</code></td><td>ISO 8601 Date | null</td><td>Update date of the event</td></tr><tr><td><code>metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>user</code></td><td>Object</td><td>End-user information</td></tr><tr><td><code>user.id</code></td><td>String</td><td>Didomi user ID</td></tr><tr><td><code>user.organization_user_id</code></td><td>String</td><td>Unique user ID assigned by your organization that is used to link a Didomi end-user to your internal systems as well as resolve cross-platform IDs.</td></tr><tr><td><code>user.organization_user_id_type</code></td><td>String</td><td>Type of the external user ID defined by the organization</td></tr><tr><td><code>user.metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>user.country</code></td><td>String | null</td><td>Two-letter ISO code of the end-user's country</td></tr><tr><td><code>user.last_seen_country</code></td><td>String | null</td><td>Two-letter ISO country code of the last submitted consent event for the user</td></tr><tr><td><code>user.email</code></td><td>String | null</td><td>External email defined by the organization</td></tr><tr><td><code>user.phone</code></td><td>String | null</td><td>External phone number defined by the organization</td></tr><tr><td><code>source</code></td><td>Object</td><td>Source information for consent events. Tracks where and how the consent event was generated.</td></tr><tr><td><code>source.type</code></td><td>String</td><td>Type of source (e.g., web, mobile, api). The value of this field can be dependent on the SDK, for example: <code>sdk-web</code>, <code>sdk-mobile</code>, <code>sdk-ctv</code></td></tr><tr><td><code>source.key</code></td><td>String</td><td>Source key identifier</td></tr><tr><td><code>source.provider</code></td><td>String</td><td>Provider information</td></tr><tr><td><code>source.target</code></td><td>String</td><td>Target information</td></tr><tr><td><code>source.deployment_id</code></td><td>String</td><td>Deployment ID associated with the source</td></tr><tr><td><code>consents</code></td><td>Object</td><td>Consent status of the end-user</td></tr><tr><td><code>consents.channels</code></td><td>Array of Objects</td><td><p>Channels for which the end-user made choices</p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: This is a legacy property.</mark></p></td></tr><tr><td><code>consents.channels.id</code></td><td>String</td><td>Unique channel ID</td></tr><tr><td><code>consents.channels.enabled</code></td><td>Boolean | null</td><td><p>Whether the end-user has enabled this channel or not </p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: A <code>null</code> value indicates that the user has not made a specific choice for the channel</mark></p></td></tr><tr><td><code>consents.channels.metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>consents.purposes</code></td><td>Array of Objects</td><td>Purposes (for both CMP and Preference Management Platform)</td></tr><tr><td><code>consents.purposes.id</code></td><td>String</td><td>Unique identifier for the data processing purpose</td></tr><tr><td><code>consents.purposes.enabled</code></td><td>Boolean | null</td><td><p>End-user's consent choice for this purpose.</p><ul><li><code>true</code>: consent given (user opted in)</li><li><code>false</code>: consent denied (user opted out)</li><li><code>undefined</code>: not specified</li></ul></td></tr><tr><td><code>consents.purposes.enabled_li</code></td><td>Boolean | null</td><td><p>End-user's objection status for legitimate interest processing.</p><ul><li><code>true</code>: no objection (legitimate interest processing allowed)</li><li><code>false</code>: objection raised (legitimate interest processing blocked)</li><li><code>undefined</code>: not specified (legitimate interest not applicable)</li></ul></td></tr><tr><td><code>consents.purposes.metadata</code></td><td>Object</td><td>Custom metadata for organization-specific data storage</td></tr><tr><td><code>consents.purposes.values</code></td><td>Object</td><td>Preferences for which the end-user has made choices </td></tr><tr><td><code>consents.purposes.values.{PREFERENCE_ID}</code></td><td>Object</td><td><p>Preference selection containing the end-user's choice</p><p><br><mark style="background-color:$warning;"><strong>Note</strong>: Key is the configured ID of the preference</mark></p></td></tr><tr><td><code>consents.purposes.values.{PREFERENCE_ID}.value</code></td><td>String</td><td>Preference values that the end-user has made choices for</td></tr><tr><td><code>consents.purposes.values.{PREFERENCE_ID}.from_propagation</code></td><td>Boolean</td><td><p>Indicates whether this value was set through consent propagation.</p><ul><li><code>true</code>: value was propagated from config tree</li><li><code>false</code>: value was explicitly set by user</li></ul></td></tr><tr><td><code>consents.purposes.propagation</code></td><td>Boolean</td><td><p>Indicates whether consent propagation was applied to this purpose.</p><ul><li><code>true</code>: propagation was applied to this purpose</li><li><code>undefined</code>: propagation was not applied (either not allowed or not applicable)</li></ul></td></tr><tr><td><code>consents.vendors</code></td><td>Object</td><td>Vendors for which the end-user has made choices </td></tr><tr><td><code>consents.vendors.enabled</code></td><td>Array of Strings</td><td>List of vendors where end-user has explicitly given consent for data processing</td></tr><tr><td><code>consents.vendors.disabled</code></td><td>Array of Strings</td><td>List of vendors where end-user has explicitly denied consent for data processing</td></tr><tr><td><code>consents.vendors.enabled_li</code></td><td>Array of Strings</td><td>List of vendors where end-user allows legitimate interest processing</td></tr><tr><td><code>consents.vendors.disabled_li</code></td><td>Array of Strings</td><td>List of vendors where end-user objects to legitimate interest processing</td></tr><tr><td><code>consents.tcfcs</code></td><td>String | null</td><td>TCF consent string for the end-user (if it was available or generated at the time of consent collection)</td></tr><tr><td><code>consents.gpp_string</code></td><td>String | null</td><td>Global Privacy Platform (GPP) consent string for the end-user, (if it was available at the time of consent collection) </td></tr><tr><td><code>consents.updated_at</code></td><td>ISO 8601 Date | null</td><td>Timestamp of when consents were last updated</td></tr><tr><td><code>delegate</code></td><td>Object | null</td><td><p>Delegate information for consent events. Represents third parties acting on behalf of the user.</p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: Returns <code>null</code> if event not created by a delegate.</mark></p></td></tr><tr><td><code>delegate.id</code></td><td>String</td><td>Unique ID of the delegate</td></tr><tr><td><code>delegate.name</code></td><td>String</td><td>Name of the delegate</td></tr><tr><td><code>delegate.metadata</code></td><td>Object</td><td>Free-form metadata object for the delegate</td></tr><tr><td><code>device_id</code></td><td>String | null</td><td>Device identifier provided by SDK clients</td></tr><tr><td><code>proofs_id</code></td><td>Array</td><td>IDs of proofs associated with this event</td></tr><tr><td><code>validation</code></td><td>Object | null</td><td>Validation information (if the event was validated). <code>null</code> if there is no validation</td></tr><tr><td><code>validation.type</code></td><td>String enum</td><td>Validation type used for this event. Allowed values: <code>email</code> | <code>signature</code></td></tr><tr><td><code>validation.approve_url</code></td><td>String</td><td>URL for approving the event (if applicable)</td></tr><tr><td><code>status</code></td><td>String</td><td><p>Status of the event:  </p><ul><li><code>"confirmed"</code>: indicates that the event has been validated or was not subject to validation </li><li><code>"pending_approval"</code>: indicates that the event is pending validation</li></ul></td></tr><tr><td><code>domain</code></td><td>String | null</td><td>Domain of the preference center<br><br><mark style="background-color:$warning;"><strong>Note</strong>: Used to know which preference center is this consent linked to. For example, to send a authenticated link to the preference center on user creation</mark></td></tr><tr><td><code>regulation</code></td><td>String</td><td>Regulation for which the consent is collected</td></tr><tr><td><code>iab</code></td><td>Object</td><td>IAB framework information applied when the end-user’s choices were collected</td></tr><tr><td><code>iab.tcf</code></td><td>Object</td><td>IAB Transparency and Consent Framework (TCF) details</td></tr><tr><td><code>iab.tcf.version</code></td><td>Number</td><td>TCF specification version</td></tr><tr><td><code>iab.tcf.cmp_id</code></td><td>Number</td><td>IAB-registered ID of the CMP that collected the consent</td></tr><tr><td><code>iab.tcf.cmp_version</code></td><td>Number</td><td>Version of the CMP that collected the consent</td></tr><tr><td><code>iab.tcf.consent_screen</code></td><td>Number</td><td>Number of the screen of the CMP UI on which the end-user gave consent</td></tr><tr><td><code>iab.tcf.consent_language</code></td><td>String</td><td>Language in which the consent was collected, as two uppercase letters (for example <code>EN</code>)</td></tr><tr><td><code>iab.tcf.vendor_list_version</code></td><td>Number</td><td>Version of the IAB Global Vendor List used when the consent was collected. Must be 81 or higher</td></tr><tr><td><code>iab.tcf.publisher_cc</code></td><td>String</td><td>Two-letter country code of the publisher</td></tr><tr><td><code>iab.tcf.use_non_standard_texts</code></td><td>Boolean</td><td>Whether non-standard texts were used to describe purposes and features</td></tr><tr><td><code>iab.tcf.purpose_one_treatment</code></td><td>Boolean</td><td>Whether Purpose 1 (store and/or access information on a device) is treated as not disclosed</td></tr><tr><td><code>iab.tcf.publisher_restrictions</code></td><td>Array of Objects</td><td>Restrictions the publisher applies to how vendors may process data for a purpose</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].id</code></td><td>String</td><td>Identifier of the restriction. Letters, digits, hyphens and underscores only</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].purposeId</code></td><td>String</td><td>ID of the purpose the restriction applies to</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors</code></td><td>Object</td><td>Vendors the restriction applies to</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors.type</code></td><td>String</td><td>Scope of the restriction. Allowed values: <code>all</code> | <code>list</code></td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors.ids</code></td><td>Array of Numbers or Strings</td><td>List of vendor IDs the restriction applies to. Required when <code>consents.iab.tcf.publisher_restrictions[].vendors.type</code> is <code>list</code> . Optional otherwise</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].restrictionType</code></td><td>String</td><td>Type of restriction applied. Allowed values: <code>allow</code> | <code>disallow</code> | <code>req-consent</code> | <code>req-li</code></td></tr><tr><td><code>iab.tcf.disclosed_vendors</code></td><td>Object</td><td>Vendors that were disclosed to the end-user</td></tr><tr><td><code>iab.tcf.disclosed_vendors.vendors</code></td><td>Array of Strings</td><td>List of disclosed vendor IDs</td></tr><tr><td><code>iab.tcf.disclosed_vendors.include_consent_vendors</code></td><td>Boolean</td><td>Whether vendors for which the end-user gave consent are also included in the disclosed vendors</td></tr></tbody></table>

</details>

<details>

<summary>Consent event schema and data dictionary API v1 (Legacy) without <code>$include_full_tree=true</code></summary>

```jsonc
{
  /**
   * Unique event ID. Automatically generated by the API if not provided on event creation
   */
  "id": "550e8400-e29b-41d4-a716-446655440000",
  /**
   * Organization ID
   */
  "organization_id": "string",
  /**
   * Creation date of the event.
   * Automatically generated by the API if not provided on event creation
   */
  "created_at": "ISO-8601",
  /**
   * Update date of the event
   */
  "updated_at": "ISO-8601",
  /**
   * Free-form metadata object
   */
  "metadata": {},
  /**
   * End-user information
   */
  "user": {
      /**
       * Didomi user ID
       */
      "id": "string",
      /**
       * Unique user ID assigned by your organization that is used to link a Didomi end-user to your internal systems as well as resolve cross-platform IDs.
       */
      "organization_user_id": "string",
      /**
       * Type of the external user ID defined by the organization
       */
      "organization_user_id_type": "string",
      /**
       * Free-form metadata object
       */
      "metadata": {},
      /**
       * Two-letter ISO code of the end-user's country
       */
      "country": "US",
      /**
       * Two-letter ISO country code of the last submitted consent event for the user
       */
      "last_seen_country": "US",
      /**
       * External email defined by the organization
       */
      "email": "user@example.com",
      /**
       * External phone number defined by the organization
       */
      "phone": "+12345678901"
  },
  /**
   * Source information for consent events.
   * Tracks where and how the consent event was generated.
   */
  "source": {
      /**
       * Type of source (e.g., web, mobile, api)
       */
      "type": "sdk-web",
      /**
       * Source key identifier
       */
      "key": "string",
      /**
       * Provider information
       */
      "provider": "string",
      /**
       * Target information
       */
      "target": "string",
      /**
       * Deployment ID associated with the source
       */
      "deployment_id": "string"
  },
  /**
   * Consent status of the end-user
   */
  "consents": {
      /**
       * Channels for which the end-user made choices
       * Note: This is a legacy property.
       */
      "channels": [
          {
              /**
               * Unique channel ID
               */
              "id": "string",
              /**
               * Whether the end-user has enabled this channel or not 
               * Note: A null value indicates that the user has not made a specific choice for the channel
               */
              "enabled": true,
              /**
               * Free-form metadata object
               */
              "metadata": {}
          }
      ],
      /**
       * Purposes (for both CMP and Preference Management Platform)
       */
      "purposes": [
          {
              /**
               * Unique identifier for the data processing purpose
               */
              "id": "string",
              /**
               * End-user's consent choice for this purpose.
               * true: consent given (user opted in)
               * false: consent denied (user opted out)
               * undefined: not specified
               */
              "enabled": true,
              /**
               * End-user's objection status for legitimate interest processing.
               * true: no objection (legitimate interest processing allowed)
               * false: objection raised (legitimate interest processing blocked)
               * undefined: not specified (legitimate interest not applicable)
               */
              "enabled_li": null,
              /**
               * Communication channels enabled at the purpose level
               */
              "channels": [
                  {
                      /**
                       * Unique channel ID
                       */
                      "id": "string",
                      /**
                       * Whether the end-user has enabled this channel or not 
                       * Note: A null value indicates that the user has not made a specific choice for the channel
                       */
                      "enabled": false
                  }
              ],
              /**
               * Nested preference structure providing granular consent control. Each preference can have its own enabled state, metadata, and channel overrides.
               */
              "preferences": [
                  {
                      /**
                       * Unique identifier for the preference within its parent purpose
                       */
                      "id": "string",
                      /**
                       * End-user's choice for this specific preference.
                       * true: explicitly enabled 
                       * false: explicitly disabled
                       * null: no preference set (inherits from parent purpose or defaults)
                       */
                      "enabled": true,
                      /**
                       * Custom metadata for preference-specific data storage
                       */
                      "metadata": {},
                      /**
                       * Communication channels enabled at the preference level
                       */
                      "channels": [
                          {
                              /**
                               * Unique channel ID
                               */
                              "id": "string",
                              /**
                               * Whether the end-user has enabled this channel or not 
                               * Note: A null value indicates that the user has not made a specific choice for the channel
                               */
                              "enabled": true
                          }
                      ]
                  }
              ],
              /**
               * Custom metadata for organization-specific data storage
               */
              "metadata": {}
          }
      ],
      /**
       * Vendors for which the end-user has made choices 
       */
      "vendors": {
          /**
           * List of vendors where end-user has explicitly given consent for data processing
           */
          "enabled": ["vendor_a"],
          /**
           * List of vendors where end-user has explicitly denied consent for data processing
           */
          "disabled": ["vendor_b"],
          /**
           * List of vendors where end-user allows legitimate interest processing
           */
          "enabled_li": [],
          /**
           * List of vendors where end-user objects to legitimate interest processing
           */
          "disabled_li": ["vendor_c"]
      },
      /**
       * TCF consent string for the end-user (if it was available or generated at the time of consent collection)
       */
      "tcfcs": "TCF_STRING_HERE",
      /**
       * Global Privacy Platform (GPP) consent string for the end-user (if it was available at the time of consent collection)
       * Optional. Can be null.
       */
      "gpp_string": "GPP_STRING_HERE",
      /**
       * Timestamp of when consents were last updated
       */
      "updated_at": "ISO-8601"
  },
  /**
   * Delegate information for consent events. Represents third parties acting on behalf of the user.
   * Note: Returns null if event not created by a delegate.
   */
  "delegate": {
      /**
       * Unique ID of the delegate
       */
      "id": "string",
      /**
       * Name of the delegate
       */
      "name": "Customer Support Agent",
      /**
       * Free-form metadata object for the delegate
       */
      "metadata": {}
  },
  /**
   * Device identifier provided by SDK clients
   */
  "device_id": "string",
  /**
   * IDs of proofs associated with this event
   */
  "proofs_id": ["proof_001", "proof_002"],
  /**
   * Validation information (if the event was validated).
   * null if there is no validation
   */
  "validation": {
      /**
       * Validation type used for this event. Allowed values: email | signature
       */
      "type": "email",
      /**
       * URL for approving the event (if applicable)
       */
      "approve_url": "https://example.com/approve/event/550e8400-e29b-41d4-a716-446655440000"
  },
  /**
   * Status of the event:
   * "confirmed": indicates that the event has been validated or was not subject to validation
   * "pending_approval": indicates that the event is pending validation
   */
  "status": "pending_approval",
  /**
   * Domain of the preference center
   * Note: Used to know which preference center is this consent linked to. For example, to send a authenticated link to the preference center on user creation
   */
  "domain": "example.com",
  /**
   * Regulation for which the consent is collected
   */
  "regulation": "gdpr",
  /**
   * IAB framework information associated with the consent
   */
  "iab": {
      /**
       * IAB Transparency and Consent Framework (TCF) details. Optional.
       */
      "tcf": {
          /**
           * TCF specification version. Optional.
           */
          "version": 2,
          /**
           * IAB-registered ID of the CMP that collected the consent.
           * Required when "tcf" is provided.
           */
          "cmp_id": 300,
          /**
           * Version of the CMP that collected the consent. Optional.
           */
          "cmp_version": 1,
          /**
           * Number of the screen of the CMP UI on which the end-user gave consent. Optional.
           */
          "consent_screen": 1,
          /**
           * Language in which the consent was collected, as two uppercase letters (e.g. EN, FR). Optional.
           */
          "consent_language": "EN",
          /**
           * Version of the IAB Global Vendor List used when the consent was collected.
           * Optional. Must be 81 or higher.
           */
          "vendor_list_version": 150,
          /**
           * Two-letter country code of the publisher. Optional.
           */
          "publisher_cc": "FR",
          /**
           * Whether non-standard texts were used to describe purposes and features. Optional.
           */
          "use_non_standard_texts": false,
          /**
           * Whether Purpose 1 (store and/or access information on a device) is treated as not disclosed. Optional.
           */
          "purpose_one_treatment": false,
          /**
           * Restrictions that the publisher applies to how vendors may process data for a purpose. Optional.
           */
          "publisher_restrictions": [
              {
                  /**
                   * Identifier of the restriction. Optional.
                   * Letters, digits, hyphens and underscores only.
                   */
                  "id": "restriction-1",
                  /**
                   * ID of the purpose the restriction applies to. Required.
                   */
                  "purposeId": "2",
                  /**
                   * Vendors the restriction applies to. Required.
                   */
                  "vendors": {
                      /**
                       * Scope of the restriction. Required.
                       * Allowed values: all | list
                       */
                      "type": "list",
                      /**
                       * List of vendor IDs (numbers or strings).
                       * Required when "type" is "list", otherwise optional.
                       */
                      "ids": [755, "4"]
                  },
                  /**
                   * Type of restriction applied. Required.
                   * Allowed values: allow | disallow | req-consent | req-li
                   */
                  "restrictionType": "req-consent"
              }
          ],
          /**
           * Vendors that were disclosed to the end-user. Optional.
           */
          "disclosed_vendors": {
              /**
               * List of disclosed vendor IDs. Optional.
               */
              "vendors": ["755", "4"],
              /**
               * Whether vendors for which the end-user gave consent are also included in the disclosed vendors. Optional.
               */
              "include_consent_vendors": true
          }
      }
  }
}
```

<table><thead><tr><th width="183.2667236328125">Key</th><th width="134.4000244140625">Data type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>String</td><td>Unique event ID. Automatically generated by the API if not provided on event creation</td></tr><tr><td><code>organization_id</code></td><td>String</td><td>Organization ID</td></tr><tr><td><code>created_at</code></td><td>ISO 8601 Date</td><td>Creation date of the event. Automatically generated by the API if not provided on event creation</td></tr><tr><td><code>updated_at</code></td><td>ISO 8601 Date | null</td><td>Update date of the event</td></tr><tr><td><code>metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>user</code></td><td>Object</td><td>End-user information</td></tr><tr><td><code>user.id</code></td><td>String</td><td>Didomi user ID</td></tr><tr><td><code>user.organization_user_id</code></td><td>String</td><td>Unique user ID assigned by your organization that is used to link a Didomi end-user to your internal systems as well as resolve cross-platform IDs.</td></tr><tr><td><code>user.organization_user_id_type</code></td><td>String</td><td>Type of the external user ID defined by the organization</td></tr><tr><td><code>user.metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>user.country</code></td><td>String | null</td><td>Two-letter ISO code of the end-user's country</td></tr><tr><td><code>user.last_seen_country</code></td><td>String | null</td><td>Two-letter ISO country code of the last submitted consent event for the user</td></tr><tr><td><code>user.email</code></td><td>String | null</td><td>External email defined by the organization</td></tr><tr><td><code>user.phone</code></td><td>String | null</td><td>External phone number defined by the organization</td></tr><tr><td><code>source</code></td><td>Object</td><td>Source information for consent events. Tracks where and how the consent event was generated.</td></tr><tr><td><code>source.type</code></td><td>String</td><td>Type of source (e.g., web, mobile, api). The value of this field can be dependent on the SDK, for example: <code>sdk-web</code>, <code>sdk-mobile</code>, <code>sdk-ctv</code></td></tr><tr><td><code>source.key</code></td><td>String</td><td>Source key identifier</td></tr><tr><td><code>source.provider</code></td><td>String</td><td>Provider information</td></tr><tr><td><code>source.target</code></td><td>String</td><td>Target information</td></tr><tr><td><code>source.deployment_id</code></td><td>String</td><td>Deployment ID associated with the source</td></tr><tr><td><code>consents</code></td><td>Object</td><td>Consent status of the end-user</td></tr><tr><td><code>consents.channels</code></td><td>Array of Objects</td><td><p>Channels for which the end-user made choices</p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: This is a legacy property.</mark></p></td></tr><tr><td><code>consents.channels.id</code></td><td>String</td><td>Unique channel ID</td></tr><tr><td><code>consents.channels.enabled</code></td><td>Boolean | null</td><td><p>Whether the end-user has enabled this channel or not </p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: A <code>null</code> value indicates that the user has not made a specific choice for the channel</mark></p></td></tr><tr><td><code>consents.channels.metadata</code></td><td>Object</td><td>Free-form metadata object</td></tr><tr><td><code>consents.purposes</code></td><td>Array of Objects</td><td>Purposes (for both CMP and Preference Management Platform)</td></tr><tr><td><code>consents.purposes.id</code></td><td>String</td><td>Unique identifier for the data processing purpose</td></tr><tr><td><code>consents.purposes.enabled</code></td><td>Boolean | null</td><td><p>End-user's consent choice for this purpose.</p><ul><li><code>true</code>: consent given (user opted in)</li><li><code>false</code>: consent denied (user opted out)</li><li><code>undefined</code>: not specified</li></ul></td></tr><tr><td><code>consents.purposes.enabled_li</code></td><td>Boolean | null</td><td><p>End-user's objection status for legitimate interest processing.</p><ul><li><code>true</code>: no objection (legitimate interest processing allowed)</li><li><code>false</code>: objection raised (legitimate interest processing blocked)</li><li><code>undefined</code>: not specified (legitimate interest not applicable)</li></ul></td></tr><tr><td><code>consents.purposes.channels</code></td><td>Array of Objects</td><td>Communication channels enabled at the purpose level</td></tr><tr><td><code>consents.purposes.channels.id</code></td><td>String</td><td>Unique channel ID</td></tr><tr><td><code>consents.purposes.channels.enabled</code></td><td>Boolean | null</td><td><p>Whether the end-user has enabled this channel or not </p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: A <code>null</code> value indicates that the user has not made a specific choice for the channel</mark></p></td></tr><tr><td><code>consents.purposes.preferences</code></td><td>Array of Objects</td><td>Nested preference structure providing granular consent control. Each preference can have its own enabled state, metadata, and channel overrides.</td></tr><tr><td><code>consents.purposes.preferences.id</code></td><td>String</td><td>Unique identifier for the preference within its parent purpose</td></tr><tr><td><code>consents.purposes.preferences.enabled</code></td><td>Boolean | null</td><td><p>End-user's choice for this specific preference.</p><ul><li><code>true</code>: explicitly enabled </li><li><code>false</code>: explicitly disabled</li><li><code>null</code>: no preference set (inherits from parent purpose or defaults)</li></ul></td></tr><tr><td><code>consents.purposes.preferences.metadata</code></td><td>Object</td><td>Custom metadata for preference-specific data storage</td></tr><tr><td><code>consents.purposes.preferences.channels</code></td><td>Array of Objects</td><td>Communication channels enabled at the preference level</td></tr><tr><td><code>consents.purposes.preferences.channels.id</code></td><td>String</td><td>Unique channel ID</td></tr><tr><td><code>consents.purposes.preferences.channels.enabled</code></td><td>Boolean | null</td><td><p>Whether the end-user has enabled this channel or not </p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: A <code>null</code> value indicates that the user has not made a specific choice for the channel</mark></p></td></tr><tr><td><code>consents.purposes.metadata</code></td><td>Object</td><td>Custom metadata for organization-specific data storage</td></tr><tr><td><code>consents.vendors</code></td><td>Object</td><td>Vendors for which the end-user has made choices </td></tr><tr><td><code>consents.vendors.enabled</code></td><td>Array of Strings</td><td>List of vendors where end-user has explicitly given consent for data processing</td></tr><tr><td><code>consents.vendors.disabled</code></td><td>Array of Strings</td><td>List of vendors where end-user has explicitly denied consent for data processing</td></tr><tr><td><code>consents.vendors.enabled_li</code></td><td>Array of Strings</td><td>List of vendors where end-user allows legitimate interest processing</td></tr><tr><td><code>consents.vendors.disabled_li</code></td><td>Array of Strings</td><td>List of vendors where end-user objects to legitimate interest processing</td></tr><tr><td><code>consents.tcfcs</code></td><td>String | null</td><td>TCF consent string for the end-user (if it was available or generated at the time of consent collection)</td></tr><tr><td><code>consents.gpp_string</code></td><td>String | null</td><td>Global Privacy Platform (GPP) consent string for the end-user (if it was available at the time of consent collection)</td></tr><tr><td><code>consents.updated_at</code></td><td>ISO 8601 Date | null</td><td>Timestamp of when consents were last updated</td></tr><tr><td><code>delegate</code></td><td>Object | null</td><td><p>Delegate information for consent events. Represents third parties acting on behalf of the user.</p><p></p><p><mark style="background-color:$warning;"><strong>Note</strong>: Returns <code>null</code> if event not created by a delegate.</mark></p></td></tr><tr><td><code>delegate.id</code></td><td>String</td><td>Unique ID of the delegate</td></tr><tr><td><code>delegate.name</code></td><td>String</td><td>Name of the delegate</td></tr><tr><td><code>delegate.metadata</code></td><td>Object</td><td>Free-form metadata object for the delegate</td></tr><tr><td><code>device_id</code></td><td>String | null</td><td>Device identifier provided by SDK clients</td></tr><tr><td><code>proofs_id</code></td><td>Array</td><td>IDs of proofs associated with this event</td></tr><tr><td><code>validation</code></td><td>Object | null</td><td>Validation information (if the event was validated). <code>null</code> if there is no validation</td></tr><tr><td><code>validation.type</code></td><td>String enum</td><td>Validation type used for this event. Allowed values: <code>email</code> | <code>signature</code></td></tr><tr><td><code>validation.approve_url</code></td><td>String</td><td>URL for approving the event (if applicable)</td></tr><tr><td><code>status</code></td><td>String</td><td><p>Status of the event:  </p><ul><li><code>"confirmed"</code>: indicates that the event has been validated or was not subject to validation </li><li><code>"pending_approval"</code>: indicates that the event is pending validation</li></ul></td></tr><tr><td><code>domain</code></td><td>String | null</td><td>Domain of the preference center<br><br><mark style="background-color:$warning;"><strong>Note</strong>: Used to know which preference center is this consent linked to. For example, to send a authenticated link to the preference center on user creation</mark></td></tr><tr><td><code>regulation</code></td><td>String</td><td>Regulation for which the consent is collected</td></tr><tr><td><code>iab</code></td><td>Object</td><td>IAB framework information associated with the consent</td></tr><tr><td><code>iab.tcf</code></td><td>Object</td><td>IAB Transparency and Consent Framework (TCF) details</td></tr><tr><td><code>iab.tcf.version</code></td><td>Number</td><td>TCF specification version</td></tr><tr><td><code>iab.tcf.cmp_id</code></td><td>Number</td><td>IAB-registered ID of the CMP that collected the consent</td></tr><tr><td><code>iab.tcf.cmp_version</code></td><td>Number</td><td>Version of the CMP that collected the consent</td></tr><tr><td><code>iab.tcf.consent_screen</code></td><td>Number</td><td>Number of the screen of the CMP UI on which the end-user gave consent</td></tr><tr><td><code>iab.tcf.consent_language</code></td><td>String</td><td>Language in which the consent was collected, as two uppercase letters (for example <code>EN</code>)</td></tr><tr><td><code>iab.tcf.vendor_list_version</code></td><td>Number</td><td>Version of the IAB Global Vendor List used when the consent was collected</td></tr><tr><td><code>iab.tcf.publisher_cc</code></td><td>String</td><td>Two-letter country code of the publisher</td></tr><tr><td><code>iab.tcf.use_non_standard_texts</code></td><td>Boolean</td><td>Whether non-standard texts were used to describe purposes and features</td></tr><tr><td><code>iab.tcf.purpose_one_treatment</code></td><td>Boolean</td><td>Whether Purpose 1 (store and/or access information on a device) is treated as not disclosed</td></tr><tr><td><code>iab.tcf.publisher_restrictions</code></td><td>Array of Objects</td><td>Restrictions the publisher applies to how vendors may process data for a purpose</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].id</code></td><td>String</td><td>Identifier of the restriction. Letters, digits, hyphens and underscores only</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].purposeId</code></td><td>String</td><td>ID of the purpose the restriction applies to</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors</code></td><td>Object</td><td>Vendors the restriction applies to</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors.type</code></td><td>String</td><td>Scope of the restriction. Allowed values: <code>all</code> | <code>list</code></td></tr><tr><td><code>iab.tcf.publisher_restrictions[].vendors.ids</code></td><td>Array of Numbers or Strings</td><td>List of vendor IDs the restriction applies to. Required when <code>consents.iab.tcf.publisher_restrictions[].vendors.type</code> is <code>list</code> . Optional otherwise</td></tr><tr><td><code>iab.tcf.publisher_restrictions[].restrictionType</code></td><td>String</td><td>Type of restriction applied. Allowed values: <code>allow</code> | <code>disallow</code> | <code>req-consent</code> | <code>req-li</code></td></tr><tr><td><code>iab.tcf.disclosed_vendors</code></td><td>Object</td><td>Vendors that were disclosed to the end-user</td></tr><tr><td><code>iab.tcf.disclosed_vendors.vendors</code></td><td>Array of Strings</td><td>List of disclosed vendor IDs</td></tr><tr><td><code>iab.tcf.disclosed_vendors.include_consent_vendors</code></td><td>Boolean</td><td>Whether vendors for which the end-user gave consent are also included in the disclosed vendors.</td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.didomi.io/api-and-platform/consents/events/consent-event-schema.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
