--- title: "Setting a Contact's Tracking Consent" slug: "engage-api-setting-a-contact-s-tracking-consent" status: "update" updated: 2026-10-09T15:47:15Z published: 2026-10-09T15:47:15Z canonical: "docs.mapp.com/engage-api-setting-a-contact-s-tracking-consent" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Setting a Contact's Tracking Consent This use case shows how to set a contact's email tracking consent through the Engage API. The consent state is stored in custom attributes on the contact profile and is sent using the existing `/contact/update` call — the same way as any other attribute. For what the feature does and what each value means, see Email Tracking Consent. ## Prerequisites Before you begin, make sure you have valid authorization credentials. See [Getting Started with Engage API](/v1-api/apidocs/getting-started-with-engage-api) for more information. The contact you want to update must already exist; if it does not, create it first. ## The tracking consent attributes Three custom attributes hold the consent information: | Attribute | Description | | --- | --- | | tracking_consent | The consent state. One of: granted, denied, withdrawn, unknown. A value of unknown means no preference is stored, in which case tracking remains on by default. | | tracking_consent_source | Where or how the consent was collected (for example, a preference centre or a registration form). The value is defined by you. | | tracking_consent_source_id | An identifier for the specific source or consent record (for example, a form or version identifier). The value is defined by you. | > [!NOTE] > Note > > These are custom attributes, so the API does not enforce them or validate their values. To stay compliant, set at least tracking_consent and tracking_consent_source; tracking_consent_source_id is recommended. Mapp stores exactly what you send and does not validate it — the accuracy of the data is your responsibility. ## Procedure Send the attributes in the `attributes` array of a `/contact/update` POST request, exactly as you would for any other attribute. The example below sets a denied consent for a contact identified by email. ```json POST 'https://your-engage-domain.com/api/rest/contact/update?identifierType=EMAIL&unifiedIdentifierName=j.mcexample%40example.com' \ {  "emailAddress": "j.mcexample@example.com",  "attributes":  [    {"name": "tracking_consent", "value": "denied"},    {"name": "tracking_consent_source", "value": "preference_center"},    {"name": "tracking_consent_source_id", "value": "pc-2026-07-01"}  ] } ``` ## Conclusion You should receive a **204** response and no further information, which indicates the profile has been updated. If there was a problem, you might receive a **400** response. ## Related Topics [/contact/update](/apidocs/update-a-contact) [Updating a Contact's Information](/v1-api/apidocs/updating-a-contacts-information) [Getting Started with Engage API](/v1-api/apidocs/getting-started-with-engage-api) [Email Tracking Consent](https://docs.mapp.com/docs/engage-email-tracking-consent)