POST /contacts/v1/contacts/id:{contactId}/Preferences

Adds consent management information to contact records by contact ID for data protection and privacy concerns.

URL Parameters 

NameTypeDescription
contactIdstringRequiredUnique ID for the contact.

JSON Parameters 

NameTypeDescription
valueobjectRequiredArray of contact IDs and other properties to add.
value.contactIDlongRequiredUnique ID for the contact.
value.hasOptedOutTrackingbooleanIndicates whether a contact opted out of tracking information.

Responses 

StatusNameTypeDescription
200  Added contact preferences by contact ID.
 valueobjectContains the contact ID and other properties to add.
 value.contactIDlongUnique ID for the contact.
 value.hasOptedOutTrackingbooleanIndicates whether a contact opted out of tracking information.
 rowsInsertedintegerNumber of preferences inserted.
 rowsUpdatedintegerNumber of preferences updated.
 rowsDeletedintegerNumber of preferences deleted.
 requestServiceMessageIDguidService message ID for the request.
 responseDateTimeintegerDate and time of the retry response in UTC.
 resultMessagesarrayArray of messages about the request. Includes details, such as resulttype and resultcode, about a bad request.
 serviceMessageIDguidService message ID for the response.

Usage 

To issue a request, you must have the Assets | Upload and Assets | Publish permissions.

Required Scope 

  • Documents and Images, Read and Write
  • Saved Content, Read and Write

Example Request 

1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2POST /contacts/v1/contacts/id:1234/Preferences
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6{
7   "value":{
8      "contactID":1234,
9      "hasOptedOutTracking":false
10   }
11}

Example Response 

1HTTP/1.1 200 OK
2{
3   "value":{
4      "contactID":1234,
5      "hasOptedOutTracking":false
6   },
7   "rowsInserted":1,
8   "rowsUpdated":0,
9   "rowsDeleted":0,
10   "requestServiceMessageID":"1e17845f-d020-48a8-8621-c318c964b5a6",
11   "responseDateTime":"2019-01-24T11:37:13.1845624-06:00",
12   "resultMessages":[
13
14   ],
15   "serviceMessageID":"a5866bea-02a0-4989-bd1d-7edd4dd95519"
16}

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!