List all subscribers

Retrieve a list of subscribers.

Resource URL:

GET https://api.essential.to/v2/account/subscribers

Resource information:

Response formatJSON
Requires authentication?Yes

Parameters:

channel
optional

Return subscribers on a specific channel.

transport
optional

Return subscribers on a specific transport.

phone_number
optional

Get subscriber for specified phone number.

status
optional

Get subscribers with specified subscription status (unsubscribed, subscribed)

start_date
optional

Get subscribers with subscribed_at on or after specified date.

end_date
optional

Get subscribers with subscribed_at before specified date.

Sample code:

curl -X GET \
     -u '[SID]:[TOKEN]' \
     'https://api.essential.to/v2/account/subscribers'

# Sample response
[
  {
    "phone_number": "5555555555",
    "status": "subscribed",
    "subscribed_at": "2017-01-24T22:52:16.000Z",
    "unsubscribed_at": null,
    "created_at": "2017-01-24T22:52:16.000Z",
    "updated_at": "2017-01-24T22:52:16.000Z",
    "carrier": "Unknown",
    "carrier_updated_at": "2017-01-24T22:52:16.000Z",
    "added_to_inbox_at": null,
    "facebook_id": null,
    "sid": "tRhvpNDGZwyDeH-YRZIr9A",
    "account_sid": "p03Gjl8Uzn0RkZSpHXHnrw",
    "channel_sid": "p03Gjl8Uzn0RkZSpHXHnrw",
    "transport_sid": "p03Gjl8Uzn0RkZSpHXHnrw"
  },
  ...
]

# Find subscriber for phone number 5555555555
curl -X GET \
-u '[SID]:[TOKEN]' \
     'https://api.essential.to/v2/account/subscribers' \
      -G -d 'phone_number=5555555555'

# Sample response
[
   {
      "status" : "unsubscribed",
      "channel_sid" : "p03Gjl8Uzn0RkZSpHXHnrw",
      "added_to_inbox_at" : null,
      "updated_at" : "2017-01-25T23:06:31.000Z",
      "subscribed_at" : null,
      "transport_sid" : "p03Gjl8Uzn0RkZSpHXHnrw",
      "unsubscribed_at" : "2017-01-25T23:06:31.000Z",
      "account_sid" : "p03Gjl8Uzn0RkZSpHXHnrw",
      "carrier" : "Unknown",
      "facebook_id" : null,
      "phone_number" : "5555555555",
      "sid" : "tRhvpNDGZwyDeH-YRZIr9A",
      "carrier_updated_at" : "2017-01-24T22:52:16.000Z",
      "created_at" : "2017-01-24T22:52:16.000Z"
   }
]

# Get subscribers with status = unsubscribed
curl -X GET \
   -u '[SID]:[TOKEN]' \
     'https://api.essential.to/v2/account/subscribers' \
     -G -d 'status=unsubscribed'

# Sample response
[
   {
      "subscribed_at" : null,
      "phone_number" : "5555555555",
      "channel_sid" : "p03Gjl8Uzn0RkZSpHXHnrw",
      "added_to_inbox_at" : null,
      "carrier" : "Unknown",
      "status" : "unsubscribed",
      "facebook_id" : null,
      "sid" : "tRhvpNDGZwyDeH-YRZIr9A",
      "carrier_updated_at" : "2017-01-24T22:52:16.000Z",
      "created_at" : "2017-01-24T22:52:16.000Z",
      "transport_sid" : "p03Gjl8Uzn0RkZSpHXHnrw",
      "unsubscribed_at" : "2017-01-25T23:06:31.000Z",
      "updated_at" : "2017-01-25T23:06:31.000Z",
      "account_sid" : "p03Gjl8Uzn0RkZSpHXHnrw"
   },
   {
      "carrier" : "Unknown",
      "sid" : "lYpW4kwdnrlVhpIrnmBahg",
      "facebook_id" : null,
      "status" : "unsubscribed",
      "channel_sid" : "p03Gjl8Uzn0RkZSpHXHnrw",
      "phone_number" : "1112223333",
      "subscribed_at" : null,
      "added_to_inbox_at" : null,
      "updated_at" : "2017-01-26T22:47:12.000Z",
      "account_sid" : "p03Gjl8Uzn0RkZSpHXHnrw",
      "created_at" : "2017-01-26T22:42:11.000Z",
      "carrier_updated_at" : "2017-01-26T22:42:11.000Z",
      "unsubscribed_at" : "2017-01-26T22:47:12.000Z",
      "transport_sid" : "p03Gjl8Uzn0RkZSpHXHnrw"
   }
]

# Get subscribers who started on or after 2/20/17 and before 4/20/17
curl -X GET \
     -u '[SID]:[TOKEN]' \
     -H 'Content-Type: application/json' \
     'https://api.essential.to/v2/account/subscribers' \
     -G -d 'start_date=2017-02-20' -d 'end_date=2017-04-20'

# Sample response
[
   {
      "status" : "subscribed",
      "created_at" : "2017-02-17T18:47:34.000Z",
      "phone_number" : "2059554444",
      "carrier_updated_at" : null,
      "transport_sid" : "tRhvpNDGZwyDeH-YRZIr9A",
      "account_sid" : "p03Gjl8Uzn0RkZSpHXHnrw",
      "added_to_inbox_at" : null,
      "facebook_id" : null,
      "updated_at" : "2017-02-17T18:47:34.000Z",
      "subscribed_at" : "2017-02-17T18:47:34.000Z",
      "sid" : "M023pJRT9yNmt-5RjTQBwQ",
      "channel_sid" : "QsbrYCSo2m0sShMLOlZqtw",
      "unsubscribed_at" : null,
      "carrier" : null
   },
   ...
]
Python coming soon.
Node coming soon.