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",
"phone": "+61478940895",
"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,
"custom_fields": []
},
{
"id": "zxcv",
"email": "[email protected]",
"first_name": "foo",
"last_name": "bar",
"phone": "null",
"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,
"custom_fields": [
{
"id": 1,
"field_name": "Age",
"value": "20",
"value_type": "text"
},
{
"id": 2,
"field_name": "City",
"value": "Lisbon",
"value_type": "text"
}
]
}
]
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.
Subscriber custom field types
"text", "number", "date", "birthday"
Custom Fields parameters
{
"subscribers": [{"email": "[email protected]",
"phone": "+61478940895",
"custom_fields": [ { "field_name": "Age",
"value": "20",
"value_type": "text" } ]} ]
}
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",
"phone": "+61478940895"
"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
HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8
[
{
"id": "asdf",
"email": "[email protected]",
"first_name": "van",
"last_name": "halen",
"phone": "+61478940895"
"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,
"custom_fields": [
{
"id": 1,
"field_name": "age",
"value_type": "number",
"value": 37
}
]
},
{
"id": "zxcv",
"email": "[email protected]",
"first_name": "foo",
"last_name": "bar",
"phone": null,
"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,
"custom_fields": [
{
"id": 2
"field_name": "birthday",
"value_type": "date",
"value": "27, Dec, 1981"
}
]
}
]
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/:email_or_phone_or_uid
Parameters
:list_id = The ID of the requested list.
:email_or_phone_or_uid = The email address, phone number or UID of the
requested subscriber.
Expected response
HTTP/1.1 200 OK