Full API and Integration Documentation

Subscribers

Subscribers are those that receive notifications via email or sms to incidents that are reported and subsequently updated. Subscribers can reside at the page level where they get all updates to every incident automatically, or at the incident level where they must opt-in to notifications after the incident has been created.

Get a list of all subscribers
ENDPOINTS
  GET /pages/[page_id]/subscribers.json
  GET /pages/[page_id]/incidents/[incident_id]/subscribers.json

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/subscribers.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074"

RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  [
    {
      "created_at": "2013-03-05T20:50:42Z",
      "id": "f6c6ggw8z0t1",
      "phone_country": "us",
      "phone_number": "9196022733"
    },
    {
      "created_at": "2013-03-05T20:50:42Z",
      "email": "steve@flyingkleinbrothers.com",
      "id": "xx5tcn6g80n8"
    },
    {
      "created_at": "2013-03-05T20:50:42Z",
      "email": "scott@flyingkleinbrothers.com",
      "id": "pm0tzg6pwkr4"
    }
  ]
Search for subscribers
ENDPOINTS
  GET /pages/[page_id]/subscribers.json?q=

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/subscribers.json?q=919 \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074"

RESPONSE CODES
  200 - Successful call

SAMPLE RESPONSE
  [
    {
      "created_at": "2013-03-05T20:50:42Z",
      "id": "f6c6ggw8z0t1",
      "phone_country": "us",
      "phone_number": "9196022733"
    }
  ]
Create a subscriber

You must be provide either subscriber[email], both of subscriber[phone_country] and subscriber[phone_number], or both of subscriber[email] and subscriber[endpoint].

A list of supported SMS countries can be found at https://api.statuspage.io/sms_countries.json

ENDPOINTS
  POST /pages/[page_id]/subscribers.json
  POST /pages/[page_id]/incidents/[incident_id]/subscribers.json

ATTRIBUTES
  subscriber[email] - The email address the subscriber wishes to receive notifications at (or, confirmation for webhook endpoint)
  subscriber[phone_number] - The phone number the subscriber wishes to receive notifications at
  subscriber[phone_country] - The two digit country code corresponding to the phone country
  subscriber[endpoint] - The URL endpoint you wish to wish to receive webhook notifications at (must be accompanied by email)
  subscriber[skip_confirmation_notification] - Optional. All subscribers are notified by default. Pass in 't' to override.
  subscriber[component_ids][] - Optional. Array of component ids that the created subscriber will be subscribed to. NOTE: you must have enabled component subscriptions to use this. This is not applicable to incident subscribers.
  subscriber[page_access_user] - Required if Access Control is enabled for the page. This is the code that identifies the PageAccessUser the subscription is for.

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/subscribers.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X POST \
    -d "subscriber[email]=scott@scottkle.in" \
    -d "subscriber[component_ids][]=v8ghv9zlmr6r"
    

RESPONSE CODES
  201 - Successfully created
  422 - Validation failed (see errors in response body)

SAMPLE RESPONSE
  {
    "created_at": "2013-03-05T23:57:39Z",
    "email": "scott@scottkle.in",
    "id": "86z91fzjhlxy",
    "components": [ "v8ghv9zlmr6r" ]
  }
Delete a subscriber
ENDPOINT
  DELETE /pages/[page_id]/subscribers/[subscriber_id].json
  DELETE /pages/[page_id]/incidents/[incident_id]/subscribers/[subscriber_id].json

SAMPLE CALL
  curl https://api.statuspage.io/v1/pages/qfn30z5r6s5h/subscribers/86z91fzjhlxy.json \
    -H "Authorization: OAuth 2a7b9d4aac30956d537ac76850f4d78de30994703680056cc103862d53cf8074" \
    -X DELETE
    

RESPONSE CODES
  200 - Successful call
  422 - Validation failed (see errors in response body)

SAMPLE RESPONSE
  {
    "created_at": "2013-03-05T23:57:39Z",
    "email": "scott@scottkle.in",
    "id": "86z91fzjhlxy"
  }