--- title: "Setting the Tracking Type on a Prepared Message" slug: "engage-api-setting-the-tracking-type-on-a-prepared-message" description: "Learn how to set the tracking type for prepared messages using the Engage API, ensuring compliance with tracking consent for effective email management." tags: ["Tracking Consent", "Engage API", "Prepared Message"] status: "update" updated: 2026-10-30T15:04:03Z published: 2026-10-30T15:04:03Z canonical: "docs.mapp.com/engage-api-setting-the-tracking-type-on-a-prepared-message" --- > ## 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 the Tracking Type on a Prepared Message This use case shows how to set the tracking type of a prepared message through the Engage API. The tracking type decides how each recipient's tracking consent is applied to that message. It is sent as the `trackingOverride` field on the `/preparedmessage/update` call. For what the options mean and what the anonymized option does and does not deliver, 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 prepared message you want to update must already exist. Consent-aware outgoing tracking must be active for your account. This is part of the standard Tracking Consent setup and is not specific to this feature. ## The trackingOverride field The field takes one of three values. Any other value is rejected. | Value | Option in the interface | Behaviour | | --- | --- | --- | | `1` | Normal Tracking | No override. Each recipient's tracking consent applies. This is the default. | | `2` | Force Full Tracking | Open and click tracking are enforced for all recipients with their real contact identifier, regardless of individual consent. | | `3` | Force Anonymized When Denied or Withdrawn | Recipients who granted consent are tracked normally. Recipients who denied or withdrew consent receive tracking URLs carrying an anonymous placeholder instead of their contact identifier, and their opens and clicks count towards aggregate statistics only. | Whatever value you send, Engage keeps the five standard UTM parameters (`utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`) on the links for every recipient. They must not contain personal data. See [UTM and Other Link Parameters](https://docs.mapp.com/docs/engage-email-tracking-consent#utm-and-other-link-parameters) in Email Tracking Consent. > [!NOTE] > Note > > On update, omitting `trackingOverride` or sending `null` preserves the value already stored on the message. To clear an active override, send `1` explicitly. Omitting the field does not reset it. > [!WARNING] > Warning > > The tracking type only takes effect when consent-aware outgoing tracking is active for your account. If it is not, consent handling is skipped entirely and the message is tracked with the real contact identifier, whichever value you send. The API does not return an error in that case. --- ## Procedure The update call carries the whole prepared message in its body, not just the fields you want to change. Read the current record first, then send it back with `trackingOverride` set to the value you want. Only `trackingOverride` is documented as preserving its stored value when omitted; for the remaining fields, send back what you read. ### 1. Read the current record ```json GET 'https://your-engage-domain.com/api/rest/preparedmessage/get?messageId=7579&contactId=45802709' ``` The response contains the identifying fields, the nested `message` object with the subject and body, and the current `trackingOverride`. ### 2. Send the record back with the new tracking type Take the response from step 1, change `trackingOverride`, and post it back unchanged otherwise. The example below selects anonymized tracking for recipients who denied or withdrew consent. The `message` object is shortened here for readability; send it exactly as you received it. ```json POST 'https://your-engage-domain.com/api/rest/preparedmessage/update' \ {  "contactId": 45802709,  "messageId": 7579,  "name": "SpringNewsletter2026",  "groupId": 3302,  "groupName": "Newsletter",  "selectionId": null,  "selectionName": null,  "channelId": 327699,  "channelName": "DMC Email",  "externalId": null,  "messageCategoryId": null,  "messageCategoryName": null,  "trackingOverride": 3,  "message": {    "subject": "Our spring highlights",    "emailBodyHtml": "…"  } } ``` > [!WARNING] > Warning > > Do not send a body that contains only the identifiers and `trackingOverride`. The documentation does not state which fields the call preserves, so a shortened body risks overwriting the subject, the message body or other settings of the prepared message. To read the value back afterwards, call `/preparedmessage/get` again. It returns `trackingOverride` alongside the other message fields. --- ## Conclusion You should receive a **204** response and no further information, which indicates the prepared message has been updated. If there was a problem, you might receive a **400** response. ## Related Topics [/preparedmessage/update](/v1-api/apidocs/update-a-prepared-message) [/preparedmessage/get](/v1-api/apidocs/get-a-prepared-message) [Setting a Contact's Tracking Consent](/v1-api/apidocs/engage-api-setting-a-contact-s-tracking-consent) [Email Tracking Consent](https://docs.mapp.com/docs/engage-email-tracking-consent)