Skip to main content

recordContactConsent

Requires permission communications:consent:update.

Records a contact's consent status for a channel and purpose, with where it came from. The contact's customer must be in the caller's own book. Requires permission to update consent.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation RecordContactConsent($input: RecordContactConsentInput!) {
recordContactConsent(input: $input) {
id
status
channel
contactId
occurredAt
partnerId
}
}

Variables:

{
"input": {
"channel": "EMAIL",
"contactId": "id",
"purpose": "BROADCAST",
"source": "ADMIN",
"status": "OPTED_IN"
}
}

Response:

{
"data": {
"recordContactConsent": {
"id": "id",
"status": "OPTED_IN",
"channel": "EMAIL",
"contactId": "id",
"occurredAt": "2025-01-15T00:00:00Z",
"partnerId": "id"
}
}
}
recordContactConsent(
input: RecordContactConsentInput!
): ContactConsentGql!

Arguments​

recordContactConsent.input ● RecordContactConsentInput! non-null input​

The contact, channel, purpose, consent status and source.

Type​

ContactConsentGql object​

A contact's consent for one channel and purpose.