partnerConsent
Requires permission communications:consent:read.
Lists the recorded communication consent for the contacts of one customer. The customer must be in the caller's own book. Requires permission to read 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:
- GraphQL
- cURL
query PartnerConsent($partnerId: ID!) {
partnerConsent(partnerId: $partnerId) {
doNotMarket
messageContactId
consents {
id
status
channel
contactId
occurredAt
partnerId
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query PartnerConsent($partnerId: ID!) {\n partnerConsent(partnerId: $partnerId) {\n doNotMarket\n messageContactId\n consents {\n id\n status\n channel\n contactId\n occurredAt\n partnerId\n }\n }\n}",
"variables": {
"partnerId": "id"
}
}
EOF
Variables:
{
"partnerId": "id"
}
Response:
{
"data": {
"partnerConsent": {
"doNotMarket": true,
"messageContactId": "id",
"consents": [
{
"id": "id",
"status": "OPTED_IN",
"channel": "EMAIL",
"contactId": "id",
"occurredAt": "2025-01-15T00:00:00Z",
"partnerId": "id"
}
]
}
}
}
partnerConsent(
partnerId: ID!
): PartnerConsentGql!
Arguments
partnerConsent.partnerId ● ID! non-null scalar
The ID of the customer.
Type
PartnerConsentGql object
A customer's consent picture.