Subscribers


Fetch Subscribers

Return json data about subscribers

URL

/subscribers

Method

GET

URL Params

Optional:

items=[number] Number of records to return

page=[number] For pagination of results

search=[alphanumeric]

order_by=[first_name | last_name | email | created_at | updated_at]

order=[asc | desc]

subscription_list_id=[alphanumeric] Defaults to all subscribers/default subscription list

Success Response

Code:200
Content:

{
"data": [
{
"id": "string",
"type": "subscriber",
"attributes": {
"email": "string",
"first_name": "string",
"last_name": "string",
"unsubscribed": "bool"
}
}
]
}

Create Subscriber

Creates a subscriber record

Adds record to subscription list if specified otherwise adds to all contacts.

URL

/subscribers

Method

POST

Data Params

{
"subscriber": {
"email": "string", // required
"first_name": "string", // optional
"last_name": "string" // optional
},
"subscription_list_id": "string" // optional
}

Success Response

Code: 200
Content:

{
"data": {
"id": "string",
"type": "subscriber",
"attributes": {
"email": "string",
"first_name": "string",
"last_name": "string"
}
}
}

Update Subscriber

Updates a subscriber record

URL

/subscribers/:subscriber_id

Method

PATCH | PUT

Data Params

{
"subscriber": {
"email": "string", // optional
"first_name": "string", // optional
"last_name": "string" // optional
}
}

Success Response

Code: 200
Content:

{
"data": {
"id": "string",
"type": "subscriber",
"attributes": {
"email": "string",
"first_name": "string",
"last_name": "string"
}
}
}

Bulk Create Subscribers

Creates one or more subscriber records

Adds to subscription list if specified, otherwise adds to all contacts

URL

/subscribers_bulk_create

Method

POST

Data Params

{
"subscribers": [
// required
{
"email": "string", // required
"first_name": "string", // optional
"last_name": "string" // optional
}
],
"subscription_list_id": "string" // optional
}

Success Response

Code: 200
Content:

{
"data": {
"num_subscribers_added": "number"
}
}

Bulk Delete Subscribers

Deletes one or more subscriber records

Removes from subscription list if specified, otherwise removed from all contacts

URL

/subscribers_bulk_delete

Method

DELETE

Data Params

{
"subscriber_ids": ["string"], // required
"subscription_list_id": "string" // optional
}

Success Response:

Code: 200
Content:

{}