Skip to main content

sendEligibility

Requires permission communications:consent:read.

Tells whether a message on a channel for a purpose can be sent to a customer now, and the reason when it cannot. Marketing needs a recorded opt-in, marketing switched on for the organization, a customer not marked do-not-market, a time inside the send window and room under the caps; utility messages are not gated. 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:

query SendEligibility($channel: ConsentChannel!, $partnerId: ID!, $purpose: ConsentPurpose!) {
sendEligibility(channel: $channel, partnerId: $partnerId, purpose: $purpose) {
allowed
deferredUntil
reason
reasonText
}
}

Variables:

{
"channel": "EMAIL",
"partnerId": "id",
"purpose": "BROADCAST"
}

Response:

{
"data": {
"sendEligibility": {
"allowed": true,
"deferredUntil": "2025-01-15T00:00:00Z",
"reason": "string",
"reasonText": "string"
}
}
}
sendEligibility(
channel: ConsentChannel!
partnerId: ID!
purpose: ConsentPurpose!
): SendEligibilityGql!

Arguments​

sendEligibility.channel ● ConsentChannel! non-null enum​

The channel the message would go on.

sendEligibility.partnerId ● ID! non-null scalar​

The ID of the customer.

sendEligibility.purpose ● ConsentPurpose! non-null enum​

Whether the message is utility or marketing.

Type​

SendEligibilityGql object​

Whether a message may be sent now, and if not why.