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.
tag_list A comma separated list of tags you can use to help identify and find subscribers through the API.
created_at The date/time the record was created.
updated_at The date/time the record was last updated.
include components

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" \
  -H "Authorization: Bearer 0526ff9fdbb3ca728daa3d17781eac1a15a1c3f0917abc53394d17ecdc8a8751"

Special Request Parameters

These attributes are not part of the standard resource and only apply on this specific action.

Attribute Name Description
component_ids[] List of components this subscriber should be notified about. Leave blank for all.

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"