Show a subscriber
Returns the attributes of the requested subscriber.
GET https://go.smartrmail.com/api/v1/subscribers/:subscriber_email
Parameters
:subscriber_email The email address of the requested subscriber.
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,
"custom_fields": [
{
"id": 1,
"field_name": "Age",
"value": "20",
"value_type": "text"
},
{
"id": 2,
"field_name": "City",
"value": "Lisbon",
"value_type": "text"
}
]
}
Update a subscriber
Updates attributes of the requested subscriber.
PUT https://go.smartrmail.com/api/v1/subscribers/:subscriber_email
Parameters
:subscriber_email The email address of the requested list subscriber.
The custom field types are: "text", "number", "date" and "birthday"
Expected request
Accept: application/json
Authorization: token YOUR_API_TOKEN
Content-Type: application/json
{
"email": "[email protected]",
"first_name": "john",
"last_name": "bar",
"subscribed": true,
"custom_fields": [
{ "field_name": "Age", "value": "20", "value_type": "text" },
{ "field_name": "City", "value": "Lisbon", "value_type": "text" },
{ "field_name": "Phone", "value": 123456789, "value_type": "number" },
{ "field_name": "Wedding Date", "value": "2021-01-25", "value_type": "date" },
{ "field_name": "Birthday (mm/dd)", "value": "06/10", "value_type": "birthday" },
{ "field_name": "Birthday (dd/mm)", "value": "10/06", "value_type": "birthday" }
]
}
Expected response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "asdf",
"email": "[email protected]",
"first_name": "john",
"last_name": "bar",
"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": "20",
"value_type": "text"
},
{
"id": 2,
"field_name": "City",
"value": "Lisbon",
"value_type": "text"
},
{
"id": 3,
"field_name": "Phone",
"value": 123456789,
"value_type": "number"
},
{
"id": 4,
"field_name": "Wedding Date",
"value": "2021-01-25T00:00:00.000Z",
"value_type": "date"
},
{
"id": 5,
"field_name": "Birthday (mm/dd)",
"value": "06/10",
"value_type": "birthday"
},
{
"id": 6,
"field_name": "Birthday (dd/mm)",
"value": "10/06",
"value_type": "birthday"
},
{
"id": 7,
"field_name": "Dogs Birthday",
"value": "12/06",
"value_type": "birthday"
}
]
}
Unsubscribe a subscriber
To unsubscribe a subscriber, submit a request to update the subscriber with a subscribed attribute value of false.
PUT https://go.smartrmail.com/api/v1/subscribers/:subscriber_email
Parameters
:subscriber_email The email address of the requested list subscriber.
Expected request
Accept: application/json
Authorization: token YOUR_API_TOKEN
Content-Type: application/json
{
"subscribed": false
}