Lists

get
Get Subscription Status

https://api.zaius.com/v3/lists/subscriptions?{identifier}={identifier_value}
Get the subscription status of a customer identifier to a Zaius list. If an identifier other than email is provided, global marketing consent will be shown for the last seen email address on the customer profile. List subscriptions are set at the profile level, but can be queried based on any customer identifier.
Request
Response
Request
Query Parameters
{identifier}
required
string
The identifier type, for example "email".
Response
202: Accepted
{
"customer": {
"email": "sample@test.com"
},
"opted_in": true,
"explicit_opt_in": true,
"subscriptions": [
{
"name": "True List Name",
"list_id": "sample_list",
"subscribed": true,
"ts_status_updated": 1583868571
}
]
}
400: Bad Request
{
"title": "Bad Request",
"status": 400,
"timestamp": "2018-09-10T21:07:10-05:00",
"detail": {
"invalids": []
}
}
403: Forbidden
{
"message": "Forbidden"
}
404: Not Found
{
"title": "Not Found",
"status": 404,
"timestamp": "2018-09-10T21:07:10-05:00",
"detail": {
"message": "Customer with email sample@zaius.com was not found"
}
}
Example Request
Example Request
curl -iX GET \
'https://api.zaius.com/v3/lists/subscriptions?email=sample@test.com' \
-H 'x-api-key: example.apiKey'

The ts_status_updated value in the response will indicate the last time the subscribed value was changed. If the customer has never been subscribed to a list, the subscribed value is false and the ts_status_updated value is null.

The explicit_opt_in Boolean value in the response will indicate if the email address explicitly consented to receive marketing messages, or if global marketing consent is null. Learn more about implicit and explicit consent in the Zaius Help Center. explicit_opt_in will be false when global marketing consent is false or null.

post
Subscribe / Unsubscribe

https://api.zaius.com/v3/lists/subscriptions
Subscribe or unsubscribe a customer identifier to or from a Zaius list.
Request
Response
Request
Body Parameters
subscribed
optional
boolean
whether or not the messaging identifier is subscribed or not to the list
{identifier}
required
string
the messaging identifier to act upon (e.g. email)
list_id
required
string
the name of the list
Response
202: Accepted
{
"updates": [
{
"list_id": "sample_list",
"email": "sample@test.com",
"subscribed": true
}
]
}
400: Bad Request
{
"title": "Bad Request",
"status": 400,
"timestamp": "2018-09-10T21:07:10-05:00",
"detail": {
"invalids": [
{
"event": 0,
"message": "Missing required field `product_id`"
}
]
}
}
403: Forbidden
{
"message": "Forbidden"
}
404: Not Found
{
"title": "Not Found",
"status": 404,
"timestamp": "2018-09-10T21:07:10-05:00",
"detail": {
"message": "Customer with email sample@zaius.com was not found"
}
}
Example Payload
{
"list_id": "sample_list",
"email": "sample@test.com",
"subscribed": false
}

get
Get Lists

https://api.zaius.com/v3/lists
Get all lists associated with a Zaius account.
Request
Response
Request
Response
202: Accepted
{
"lists": [
{
"name": "Example List",
"created_at": "2018-09-10T21:07:10+00:00",
"list_id": "example_list"
},
{
"name": "Example List 2",
"created_at": "2018-10-15T13:43:46+00:00",
"list_id": "example_list_2"
}
]
}
403: Forbidden
{
"title": "Forbidden",
"status": 403,
"timestamp": "2018-09-10T21:07:10-05:00",
"detail": {
"message": "Insufficient privileges to access this resource."
}
}
Example Request
Example Request
curl -iX GET \
'https://api.zaius.com/v3/lists' \
-H 'x-api-key: example.apiKey'

post
Create List

https://api.zaius.com/v3/lists
Create a new list within a Zaius account.
Request
Response
Request
Body Parameters
name
required
string
The name of the list to create.
Response
202: Accepted
{
"created": {
"list_id": "my_list",
"name": "My List"
}
}
Example Payload
{
"name": "My List"
}