Show all list subscribers
Returns all subscribers in the requested list.
GET https://go.smartrmail.com/api/v1/lists/:list_id/list_subscribers
Parameters
:list_id The ID of the requested list.
Expected response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "asdf",
"email": "[email protected]",
"first_name": "van",
"last_name": "halen",
"status": "Subscribed",
"unsubscribed_at": null,
"complained": false,
"delivered_count": 100,
"opened_count": 100,
"clicked_count": 100,
"joined_at": "2013-03-11 01:00:00 UTC",
"subscribed": true,
},
{
"id": "zxcv",
"email": "[email protected]",
"first_name": "foo",
"last_name": "bar",
"status": "Subscribed",
"unsubscribed_at": null,
"complained": false,
"delivered_count": 100,
"opened_count": 100,
"clicked_count": 100,
"joined_at": "2015-03-11 01:00:00 UTC",
"subscribed": true,
}
]
Create list of subscribers
Creates many subscribers and adds them to the requested list. Existing subscribers will not be updated.
POST https://go.smartrmail.com/api/v1/lists/:list_id/list_subscribers
Parameters
:list_id The ID of the requested list.
Expected request for one subscriber
Accept: application/json
Authorization: token YOUR_API_TOKEN
Content-Type: application/json
{
subscribers:
[
{
"email": "[email protected]",
"first_name": "van",
"last_name": "halen",
"subscribed": true,
"custom_fields": [
{
"field_name": "birth location",
"value_type": "text",
"value": "New York"
},
{
"field_name": "age",
"value_type": "number",
"value": 37
},
{
"field_name": "birthday",
"value_type": "date",
"value": "27, Dec, 1981"
}
]
}
]
}
Expected request for many subscribers
Accept: application/json
Authorization: token YOUR_API_TOKEN
Content-Type: application/json
{
subscribers:
[
{
"email": "[email protected]",
"first_name": "van",
"last_name": "halen",
"subscribed": true,
"custom_fields": [
{
"field_name": "age",
"value_type": "number",
"value": 37
}
]
},
{
"email": "[email protected]",
"first_name": "foo",
"last_name": "bar",
"subscribed": true,
"custom_fields": [
{
"field_name": "birthday",
"value_type": "date",
"value": "27, Dec, 1981"
}
]
}
]
}
Expected response
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
[
{
"id": "asdf",
"email": "[email protected]",
"first_name": "van",
"last_name": "halen",
"status": "Subscribed",
"unsubscribed_at": null,
"complained": false,
"delivered_count": 100,
"opened_count": 100,
"clicked_count": 100,
"joined_at": "2013-03-11 01:00:00 UTC",
"subscribed": true,
},
{
"id": "zxcv",
"email": "[email protected]",
"first_name": "foo",
"last_name": "bar",
"status": "Subscribed",
"unsubscribed_at": null,
"complained": false,
"delivered_count": 100,
"opened_count": 100,
"clicked_count": 100,
"joined_at": "2015-03-11 01:00:00 UTC",
"subscribed": true,
}
]
Expected response with failure
HTTP/1.1 422 Unprocessable entity
Content-Type: application/json; charset=utf-8
Delete a list subscriber
Remove the requested subscriber from the list.
DELETE https://go.smartrmail.com/api/v1/lists/:list_id/list_subscribers/:subscriber_email
Parameters
:list_id The ID of the requested list.
:subscriber_email The email address of the requested list subscriber.
Expected response
HTTP/1.1 200 OK