Guides & Tutorials

Get a subscriber

GET /api/contact.php?email=...

Endpoint returns detailed subscriber information for a given email address. All subscriber custom data fields are included.

Request parameters

Parameter Value
email Subscriber’s email address.

Required.

Response parameters

Response is formatted as a JSON object.

Parameter Value
email Subscriber’s email address.
is_unsubscribed Subscriber’s subscription status.

0 - subscribed, emails will be delivered;
1 - unsubscribed.
last_response_code Response code of the last failed message.

Values are described under Delivery response codes.
last_response_at Date and time of the last failed email.

Formatted as YYYY-MM-DD HH:MM:SS, and presented in Europe/Tallinn timezone.
created_at Date and time when subscriber was added to Smaily.

Formatted as YYYY-MM-DD HH:MM:SS, and presented in Europe/Tallinn timezone.
subscribed_at Date and time when subscriber was added to Smaily database or unsubscribed status was changed to subscribed.
modified_at Date and time when subscriber’s data was updated.

Formatted as YYYY-MM-DD HH:MM:SS, and presented in Europe/Tallinn timezone.
last_open_at Latest date and time when subscriber opened an email.

Formatted as YYYY-MM-DD HH:MM:SS, and presented in Europe/Tallinn timezone.
total_opens Total number of emails opened.
last_click_at Latest date and time when subscriber clicked a trackable link in an email.

Formatted as YYYY-MM-DD HH:MM:SS, and presented in Europe/Tallinn timezone.
total_clicks Total number of clicks made.
unsubscribed_at Date and time when subscriber was marked unsubscribed.
... Any subscriber’s custom data field.

Example

$ curl -X GET -u "${USERNAME}:${PASSWORD}" \
  "https://${SUBDOMAIN}.sendsmaily.net/api/contact.php?email=recipient%40domain.tld"

(JavaScript/JSON)

{
  "email": "subscriber@domain.tld",
  "is_unsubscribed": 0,
  "created_at": "2014-04-23 10:32:55",
  "subscribed_at": "2014-04-23 10:32:55",
  "modified_at": "2015-03-22 19:22:31",
  "last_open_at": "0000-00-00 00:00:00",
  "total_opens": "0",
  "last_click_at": "0000-00-00 00:00:00",
  "total_clicks": "0",
  "unsubscribed_at": "0000-00-00 00:00:00",
  "lisa_vaartus_1": "jah",
  "kuuluvus_1": "ei",
  ...
}