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.
Request
Response
Query Parameters
{identifier}
required
string
The identifier type, for example "email".
202: Accepted
{
"customer": {
"email": "sample@test.com"
},
"opted_in": true,
"subscriptions": [
{
"name": "True List Name",
"list_id": "sample_list",
"subscribed": true
}
]
}
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
curl -iX GET \
'https://api.zaius.com/v3/lists/subscriptions?email=sample@test.com' \
-H 'x-api-key: example.apiKey'

post
Subscribe / Unsubscribe

https://api.zaius.com/v3/lists/subscriptions
Subscribe or unsubscribe a customer identifier to or from a Zaius list.
Request
Response
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
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
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
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
Body Parameters
name
required
string
The name of the list to create.
202: Accepted
{
"created": {
"list_id": "sample_list",
"name": "Example List"
}
}
Example Payload
{
"name": "My List"
}