Create a subscriber on a particular channel - to receive messages sent to that channel. Subscribers are customers (people) that belong to channels.
Response format | JSON |
---|---|
Requires authentication? | Yes |
phone_number required | The customer's phone number. |
---|---|
channel required | Channel sid or name. |
email_address optional | The customer's email address. |
external_user_id optional | External ID for the customer. |
curl -X POST \
-u '[SID]:[TOKEN]' \
-H 'Content-Type: application/json' \
'https://api.essential.to/v2/account/subscribers' \
-d '{"phone_number":"15009998080", "channel":"p03Gjl8Uzn0RkZSpHXHnrw"}'
# Sample response
{
"phone_number": "5009998080",
"status": "subscribed",
"subscribed_at": "2017-01-25T21:43:04.618Z",
"unsubscribed_at": null,
"created_at": "2017-01-25T21:43:04.620Z",
"updated_at": "2017-01-25T21:43:04.620Z",
"carrier": "AT&T Wireless",
"carrier_updated_at": "2017-01-25T21:43:04.618Z",
"added_to_inbox_at": null,
"facebook_id": null,
"sid": "daBoeXvpfadRPgyYaaZJpw",
"account_sid": "p03Gjl8Uzn0RkZSpHXHnrw",
"channel_sid": "p03Gjl8Uzn0RkZSpHXHnrw",
"transport_sid": "p03Gjl8Uzn0RkZSpHXHnrw"
}
Python coming soon.
Node coming soon.