NOTE:

You can use the API to subscribe people to receive your status updates via Email and SMS, however, certain notification methods such as Slack cannot be added through the API, as it requires each individual subscriber to authorise themselves.

Endpoint & Available Methods

https://api.sorryapp.com/v1/pages/:page_id/subscribers/(:subscriber_id)

The Subscriber Object

These are the attributes which represent the object, most of which can be posted too and received in response to the actions.

Attribute Name Description
id The unique identifier for the subscriber
email The subscriber's email address, we'll use this address to send them status notices, assuming you have an Email publisher configured on your page.
phone_number The subscriber's mobile phone number, including its international country code, we'll use this address to send them status notices, assuming you have an SMS publisher configured on your page.
first_name The persons first name, displayed in your subscribers list.
last_name The persons first name, displayed in your subscribers list.
nickname An alternative name to be used in place of their real name.
company The name of the company that the subscriber works for, helpful for grouping your customers together.
tag_list A comma separated list of tags can be used to target subscribers i.e. publish a notice that only need to be sent to subscribers tagged as 'management'.
created_at The date/time the record was created.
updated_at The date/time the record was last updated.

List Subscriber

GET https://api.sorryapp.com/v1/pages/:page_id/subscribers

Example Request

curl -X GET https://api.sorryapp.com/v1/pages/:page_id/subscribers \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Example Response

{"response":[{"id":1,"email":"joe.bloggs@example.com","phone_number":"+7712345678","first_name":"Joe","last_name":"Bloggs","nickname":"J.B.","company":"Sorry™","tag_list":"Founder,Developer","created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}],"count":1}

Create Subscriber

POST https://api.sorryapp.com/v1/pages/:page_id/subscribers

Example Request

curl -X POST https://api.sorryapp.com/v1/pages/:page_id/subscribers \
  -d email="joe.bloggs@example.com" \
  -d phone_number="+7712345678" \
  -d tag_list="Technical,High-Value" \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Example Response

{"response":{"id":1,"email":"joe.bloggs@example.com","phone_number":"+7712345678","first_name":"Joe","last_name":"Bloggs","nickname":"J.B.","company":"Sorry™","tag_list":"Founder,Developer","created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Retrieve Subscriber

GET https://api.sorryapp.com/v1/pages/:page_id/subscribers/:subscriber_id

Example Request

curl -X GET https://api.sorryapp.com/v1/pages/:page_id/subscribers/:subscriber_id \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Example Response

{"response":{"id":1,"email":"joe.bloggs@example.com","phone_number":"+7712345678","first_name":"Joe","last_name":"Bloggs","nickname":"J.B.","company":"Sorry™","tag_list":"Founder,Developer","created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Update Subscriber

PATCH https://api.sorryapp.com/v1/pages/:page_id/subscribers/:subscriber_id

Example Request

curl -X PATCH https://api.sorryapp.com/v1/pages/:page_id/subscribers/:subscriber_id \
  -d email="jb@example.com" \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Example Response

{"response":{"id":1,"email":"joe.bloggs@example.com","phone_number":"+7712345678","first_name":"Joe","last_name":"Bloggs","nickname":"J.B.","company":"Sorry™","tag_list":"Founder,Developer","created_at":"2016-02-09 14:39:21 +0000","updated_at":"2016-02-09 14:39:21 +0000"}}

Delete Subscriber

DELETE https://api.sorryapp.com/v1/pages/:page_id/subscribers/:subscriber_id

Example Request

curl -X DELETE https://api.sorryapp.com/v1/pages/:page_id/subscribers/:subscriber_id \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"