All Collections
API
Subscribers API
Manage Individual Subscribers
Manage Individual Subscribers
Peter Connolly avatar
Written by Peter Connolly
Updated over a week ago

Show a subscriber

Returns the attributes of the requested subscriber.

GET https://go.smartrmail.com/api/v1/subscribers/:email_or_phone_or_uid

Parameters

email_or_phone_or_uid = The email address, phone number or UID of the requested subscriber.

Expected response

HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8

{
  "id": "asdf",
  "email": "[email protected]",
"phone": "+61478940895",
  "first_name": "van",
  "last_name": "halen",
  "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/:email_or_phone_or_uid

Parameters

email_or_phone_or_uid = The email address, phone number or UID of the requested subscriber.


Custom field types

"text", "number", "date", "birthday"


Custom Fields parameters

{"custom_fields": [ { "field_name": "Age",
"value": "20",
"value_type": "text" } ]}

Expected request

Accept: application/json
Authorization: token YOUR_API_TOKEN
Content-Type: application/json

{
  "email": "[email protected]",
  "first_name": "john",
"phone": "+61478940895",
  "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": "foo@bar",
"phone": "+61478940895",
  "first_name": "john",
  "last_name": "bar",
  "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

POST https://go.smartrmail.com/api/v1/subscribers/:email_or_phone_or_uid/unsubscribe

Parameters

email_or_phone_or_uid = The email address, phone number or UID of the requested subscriber.

Expected request

HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8

{
"id": "asdf",
"email": "[email protected]",
"phone": "+61478940895",
"first_name": "van",
"last_name": "halen",
"unsubscribed_at": "2013-03-11 01:00:00 UTC",
"complained": false,
"delivered_count": 100,
"opened_count": 100,
"clicked_count": 100,
"joined_at": "2013-03-11 01:00:00 UTC",
"subscribed": false,
"custom_fields": []
}

Resubscribe a subscriber

POST https://go.smartrmail.com/api/v1/subscribers/:email_or_phone_or_uid/resubscribe

Parameters

email_or_phone_or_uid = The email address, phone number or UID of the requested subscriber.

Expected request

HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8

{
"id": "asdf",
"email": "[email protected]",
"phone": "+61478940895",
"first_name": "van",
"last_name": "halen",
"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": []
}

Did this answer your question?