GET/v1/status_pages/{status_page_id}/subscribers

List all subscribers

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Path parameters

status_page_id:string
Status Page ID

Query parameters

page:stringoptional
Page number of paginated results.
Default: "1"
per_page:stringoptional
Number of items per page.
Default: "20"

Responses

StatusMeaningDescription
200OKReturns a list of subscribers for a status page
401UnauthorizedUnauthenticated
403ForbiddenUnauthorized - status page not in user's organisation
500Internal Server ErrorInternal Server Error

Response Schema

result:object[]
result_info:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

GET
/v1/status_pages/{status_page_id}/subscribers
curl --request GET \
  --url https://api.onlineornot.com/v1/status_pages/a1b2c3d4/subscribers \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": [
    {
      "id": "a1b2c3d4e5f6",
      "email_address": "[email protected]",
      "confirmed": false,
      "created_at": "2021-01-01T00:00:00.000Z"
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 1
  },
  "success": true,
  "errors": [],
  "messages": []
}

POST/v1/status_pages/{status_page_id}/subscribers

Create a subscriber

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Path parameters

status_page_id:string
Status Page ID

Body parameters

email_address:string(email)
Email address of the subscriber

Responses

StatusMeaningDescription
201CreatedReturns the newly created subscriber
400Bad RequestInvalid email address
401UnauthorizedUnauthenticated
403ForbiddenUnauthorized - status page not in user's organisation
409ConflictEmail already subscribed or has pending invitation
500Internal Server ErrorInternal Server Error

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

POST
/v1/status_pages/{status_page_id}/subscribers
curl --request POST \
  --url https://api.onlineornot.com/v1/status_pages/a1b2c3d4/subscribers \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"email_address":"[email protected]"}'

Response

{
  "result": {
    "id": "a1b2c3d4e5f6",
    "email_address": "[email protected]",
    "confirmed": false,
    "created_at": "2021-01-01T00:00:00.000Z"
  },
  "success": true,
  "errors": [],
  "messages": []
}

DELETE/v1/status_pages/{status_page_id}/subscribers/{subscriber_id}

Delete a subscriber

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Path parameters

status_page_id:string
Status Page ID
subscriber_id:string
Status Page Subscriber ID

Responses

StatusMeaningDescription
200OKReturns the deleted subscriber's ID
401UnauthorizedUnauthenticated
403ForbiddenUnauthorized
404Not FoundSubscriber not found
500Internal Server ErrorInternal Server Error

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

DELETE
/v1/status_pages/{status_page_id}/subscribers/{subscriber_id}
curl --request DELETE \
  --url https://api.onlineornot.com/v1/status_pages/a1b2c3d4/subscribers/a1b2c3d4e5f6 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": {
    "id": "a1b2c3d4e5f6"
  },
  "success": true,
  "errors": [],
  "messages": []
}

Was this page helpful?