Record contact consent
Records the contact's consent on one channel at one of its addresses and returns the contact.
Records the contact's consent on one channel at one of its addresses and returns the contact. opted_out stops every send on that channel to that address until the contact opts back in; opted_in is what channels that require opt-in check for. source and capturedAt say where and when the contact decided; proof keeps your evidence. A decision captured before the recorded one is ignored. A change publishes contact.consent_changed.
Authorization
apiKey In: header
Path Parameters
^contact_[0-9a-hjkmnp-tv-z]{16,24}$^cident_[0-9a-hjkmnp-tv-z]{16,24}$Value in
- "email"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Value in
- "opted_in"
- "opted_out"
Where the consent was captured, such as a form URL or a checkout step.
1 <= length <= 200Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/contacts/string/identities/string/consent/email" \ -H "Content-Type: application/json" \ -d '{ "status": "opted_in", "source": "string", "capturedAt": "string" }'{ "id": "string", "name": "string", "displayName": "string", "avatar": "string", "status": "active", "statusReason": "string", "externalId": "string", "identities": [ { "id": "string", "type": "email", "identifier": "string", "verified": true, "channels": [ { "channel": "email", "reachability": "unknown", "consent": { "status": "opted_in", "source": "string", "capturedAt": "string", "proof": { "property1": "string", "property2": "string" } } } ] } ], "profile": { "firstName": "string", "lastName": "string", "company": "string", "jobTitle": "string", "location": { "country": "string", "state": "string", "city": "string", "timezone": "string" }, "customFields": { "property1": "string", "property2": "string" }, "source": "api" }, "preferences": { "preferredChannels": [ "email" ], "language": "string", "timezone": "string", "notifications": { "email": true, "quiet_hours": { "start": "string", "end": "string" } } }, "tags": [ "string" ], "metadata": { "property1": "string", "property2": "string" }, "createdAt": "string", "updatedAt": "string"}