Consent

Manage a Customer's marketing consent.

The Consent API Beta does not support batch / bulk imports.

Customers who have opted out cannot receive marketing messages.

https://api.zaius.com/v3/consent
This endpoint allows you to update consent for a messaging identifier. Consent may impact attempts to send marketing campaigns to the identifier. If noted as opted-out, certain marketing service or channels may skip the identifier, even when qualified for the campaign. This endpoint generates events of type consent and action opt-in or opt-out.
Request
Response
Request
Body Parameters
identifier_value
required
string
a valid messaging identifier, such as email address
identifier_field_name
required
string
the name of the field that this identifier falls under, such as email
consent
required
boolean
true/false indicator of whether a customer has provided consent to receive marketing messages on this identifier
consent_update_reason
optional
string
a reason for updating consent; can be any text value, for audit purposes
consent_update_ts
optional
string
the time of the event (defaults to current time)
event_data
optional
object
object of key/value pairs, which are added to the generated events
Response
200: OK
{
"title": "Accepted",
"status": 202,
"timestamp": "2019-07-30T23:55:00.519Z"
}
400: Bad Request
{
"title": "Bad Request",
"status": 400,
"timestamp": "2019-07-30T23:53:48.615Z",
"detail": {
"message": "Unable to parse request body."
}
}
Example Payload
[{
"identifier_value": "email@zaius.com",
"identifier_field_name": "email",
"consent": true
},{
"identifier_value": "email2@zaius.com",
"identifier_field_name": "email",
"consent": false
}]
https://api.zaius.com/v3/consent/{identifier_field_name}?id={identifier_value}
This endpoint allows you to get marketing consent information about a customer.
Request
Response
Request
Path Parameters
identifier_field_name
required
string
the name of the field that this identifier falls under, such as email
Query Parameters
identifier_value
required
string
the identifier value you're requesting valid messaging identifier, such as an email address
Response
200: OK
The values for consent can be true, false, or null. The value will be null if Zaius has never received consent preferences for the identifier value in question. Null consent is also known as implicit consent. More information about implicit consent is available in this article: https://docs.zaius.com/hc/en-us/articles/360036859974-Understand-marketing-consent#Implicitconsent.
{
"identifier_field_name": "email",
"identifier_value": "test@zaius.com",
"consent": true,
"consent_update_reason": "Global subscribe",
"consent_update_ts": 1576851909,
"zaius_id": 3355837520960159745
}
Example Request
curl -iX GET \
'https://api.zaius.com/v3/consent/email?id=email@zaius.com' \
-H 'x-api-key: example.apiKey'