NAV

Introduction

Welcome to the Statusy API. This documentation is for Version 1 of our API.

We have designed our API to be as accessible as possible so you can manage your status page in any way you prefer.

Have questions? Let us know

Authentication

curl -X POST
     -h "Content-Type:application/json"
     -d '{}'
     https://app.statusy.co/api/v1/APITOKEN/services

Statusy uses an in-line API token to authenticate each request you make to our servers.

You can generate an unlimited use API token on the profile page.

Please note, your API token will be shown once for your security, be sure to note it once it has been generated.

If you lose your API token you should delete it immediately. You can then generate a new token.

Conventions

To make things easier, we have established several conventions that can be used when interacting with the Statusy API:

  1. All objects will be singular. For example, accessing team settings is done in /team endpoints.
  2. All endpoints are predicated with /api followed by the API version (version 1 if you are reading this documentation) so the full predicate is /api/v1.
  3. All endpoints use standard request types (POST is create, PUT is for updates, etc.)
  4. All endpoints return data in JSON.

Status Pages

Get all Status Pages

curl https://app.statusy.co/api/v1/APITOKEN/statuspages

The above command returns JSON structured like this:

{
  "statuspages": [
    {
      "google_analytics_token": null,
      "id": 10,
      "incidents": [],
      "is_active": true,
      "name": "AStatusPage",
      "services": [
        17,
        10,
        11,
        12,
        13,
        14,
        15,
        16
      ],
      "subdomain": "AStatusPage",
      "updated_date": "Fri, 27 May 2016 03:48:22 GMT"
    },
    {
      "google_analytics_token": null,
      "id": 11,
      "incidents": [],
      "is_active": true,
      "name": "AnotherStatusPage",
      "services": [
        18
      ],
      "subdomain": "AnotherStatusPage",
      "updated_date": "Fri, 27 May 2016 03:54:52 GMT"
    }
  ]
}

This endpoint returns an array of all the status pages on your account.

HTTP Request

GET https://app.statusy.co/api/v1/APITOKEN/statuspages

URL Parameters

Parameter Description
APITOKEN Your API token

Get all Statuses

curl https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/statuses

The above command returns JSON structured like this:

{
  "statuses": [
    {
      "color": "#22A722",
      "id": 48,
      "name": "Fully Operational",
      "weight": 1
    },
    {
      "color": "#F58F0D",
      "id": 49,
      "name": "Degraded Performance",
      "weight": 2
    },
    {
      "color": "#FF0000",
      "id": 50,
      "name": "Major Outage",
      "weight": 3
    }
  ]
}

HTTP Request

GET https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/statuses

URL Parameters

Parameter Description
APITOKEN Your API token
STATUSPAGE_ID The ID of the status page you want to view statuses for

Notifications

Add Email Subscriber

curl
  -X POST
  -H "Content-Type: application/json"
  -d '{"email":"anemail@adomain.com"}'
  https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/subscriber/email/new

The above command returns JSON structured like this:

{
  "email": "anemail@adomain.com",
  "notification_id": 21,
  "status": "success"
}

This endpoint allows you to add a new email subscriber to your status page. The email you provide will receive email notifications when the status of your service(s) has changed.

HTTP Request

POST https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/subscriber/email/new

URL Parameters

Parameter Description
APITOKEN Your API token
STATUSPAGE_ID The numberic ID of the status page this incident belongs to.

JSON Parameters

Parameter Description
email The email address notifications should be sent to

Services

Get all Services

curl https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service/all

The above command returns JSON structured like this:

{
  "services": [
    {
      "id": 1,
      "account_id": 1,
      "description": "Service",
      "status_enum": 1
    },
    {
      "id": 2,
      "account_id": 1,
      "description": "Another Service",
      "status_enum": 1
    },
    {
      "id": 3,
      "account_id": 1,
      "description": "Yet Another Service",
      "status_enum": 1
    }
  ]
}

This endpoint returns the details of all services on your account.

HTTP Request

GET https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service/all

Get a Service

curl https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service/SERVICE_ID

The above command returns JSON structured like this:

{
  "account_id": 1,
  "description": "Website",
  "status_enum": 1
}

This endpoint returns the details of a specific service.

HTTP Request

GET https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service/SERVICE_ID

URL Parameters

Parameter Description
APITOKEN Your API token
SERVICE_ID The numeric ID of the service you want to get
STATUSPAGE_ID The numeric ID of the status page the service belongs to

Create a Service

curl
 -X POST
 -H "Content-Type:application/json"
 -d '{"description": "Website"}'
 https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service

The above command returns JSON structured like this:

{
  "service_id": 6,
  "status": "success"
}

This endpoint allows for the creation of a new service.

HTTP Request

POST https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service

URL Parameters

Parameter Description
APITOKEN Your API token
STATUSPAGE_ID The numeric ID of the status page the service belongs to

JSON Parameters

Parameter Description
description The description is the title of the service, for example “Website” or “Database”.

Update a Service

curl
 -X PUT
 -H "Content-Type:application/json"
 -d '{"description": "Son of Website"}'
 https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service/SERVICE_ID

The above command returns JSON structured like this:

{
  "status": "success"
}

This endpoint allows you to update the description of a particular service.

HTTP Request

PUT https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service/SERVICE_ID

URL Parameters

Parameter Description
APITOKEN Your API token
SERVICE_ID The numeric ID of the service you want to update
STATUSPAGE_ID The numeric ID of the status page the service belongs to

JSON Parameters

Parameter Description
description The description is the title of the service, for example “Website” or “Database”.

Delete a Service

curl
 -X DELETE
 -H "Content-Type:application/json"
 https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service/SERVICE_ID

The above command returns JSON structured like this:

{
  "status": "success"
}

This endpoint allows you to delete an existing service.

HTTP Request

DELETE https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/service/SERVICE_ID

URL Parameters

Parameter Description
APITOKEN Your API token
SERVICE_ID The numeric ID of the service you want to delete
STATUSPAGE_ID The numeric ID of the status page the service belongs to

Incidents

Get all Incidents

curl https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/incident/all

The above command returns JSON structured like this:

{
  "incidents": [
    {
      "created_date": "Fri, 26 Feb 2016 03:36:32 GMT",
      "description": "It is super broken!",
      "id": 1,
      "service_id": 2,
      "solved_date": "Fri, 26 Feb 2016 04:20:39 GMT",
      "title": "Oh man, fire, everywhere!",
      "updated_date": "Fri, 26 Feb 2016 03:36:32 GMT"
    },
    {
      "created_date": "Fri, 26 Feb 2016 03:36:32 GMT",
      "description": "It is super SUPER broken!",
      "id": 2,
      "service_id": 3,
      "solved_date": "Fri, 26 Feb 2016 04:20:39 GMT",
      "title": "Abandon ship!",
      "updated_date": "Fri, 26 Feb 2016 03:36:32 GMT"
    }
  ]
}

This endpoint returns the details of all incidents on your account.

HTTP Request

GET https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/incident/all

URL Parameters

Parameter Description
APITOKEN Your API token
STATUSPAGE_ID The numberic ID of the status page this incident belongs to.

Get an Incident

curl https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/incident

The above command returns JSON structured like this:

{
  "created_date": "Fri, 26 Feb 2016 03:36:32 GMT",
  "description": "It is super broken!",
  "id": 1,
  "service_id": 2,
  "solved_date": "Fri, 26 Feb 2016 04:20:39 GMT",
  "title": "Oh man, fire, everywhere!",
  "updated_date": "Fri, 26 Feb 2016 03:36:32 GMT"
}

This endpoint returns the details of all incidents on your account.

HTTP Request

GET https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/incident

URL Parameters

Parameter Description
APITOKEN Your API token
STATUSPAGE_ID The numberic ID of the status page this incident belongs to.

Create an Incident

curl
 -X POST
 -H "Content-Type:application/json"
 -d '{"service_id": 2, "title": "Something broke!", "description": "Smoke, fire, everywhere!", "status": 2}'
 https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/incident

The above command returns JSON structured like this:

{
  "incident_id": 2,
  "status": "success"
}

This endpoint allows you to create a new incident.

HTTP Request

POST https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/incident

URL Parameters

Parameter Description
APITOKEN Your API token
STATUSPAGE_ID The numberic ID of the status page this incident belongs to.

JSON Parameters

Parameter Description
service_id The numeric ID of the service this incident is related to
title The title of this incident
description A long text description of the incident. Tell your users what is happening here.
status This is a status enum representing the status of the service given this incident.

Update an Incident

curl
 -X POST
 -H "Content-Type:application/json"
 -d '{"service_id": 2, "title": "Something broke!", "description": "Smoke, fire, everywhere!", "status": 2}'
 https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/incident/INCIDENT_ID

The above command returns JSON structured like this:

{
  "incident_id": 1,
  "incident_update_id": 3,
  "status": "success"
}

This endpoint allows you to add an update to an existing incident.

HTTP Request

POST https://app.statusy.co/api/v1/APITOKEN/statuspage/STATUSPAGE_ID/incident/INCIDENT_ID

URL Parameters

Parameter Description
APITOKEN Your API token
INCIDENT_ID The numeric ID of the incident you want to add an update to.
STATUSPAGE_ID The numberic ID of the status page this incident belongs to.

JSON Parameters

Parameter Description
service_id The numeric ID of the service this incident is related to
title The title of this incident
description A long text description of the incident. Tell your users what is happening here.
status This is a status enum representing the status of the service given this incident.

Public Data

Public Status Page Status

curl
 https://app.statusy.co/api/v1/public/statuspage/STATUSPAGE_SUBDOMAIN

The above command returns JSON structured like this:

{
  "statuspage": {
    "id": "7",
    "name": "JustAStatusPage",
    "overall_status": "Fully Operational",
    "services": [
      {
        "description": "OneService",
        "status": "Fully Operational"
      },
      {
        "description": "TwoService",
        "status": "Fully Operational"
      },
      {
        "description": "ThreeService",
        "status": "Fully Operational"
      },
      {
        "description": "FourService",
        "status": "Fully Operational"
      }
    ],
    "subdomain": "justastatuspage"
  }
}

This endpoint returns the overall status and individual service statuses of a public status page.

HTTP Request

GET https://app.statusy.co/api/v1/public/statuspage/STATUSPAGE_SUBDOMAIN

URL Parameters

Parameter Description
STATUSPAGE_SUBDOMAIN The subdomain of the status page you want the status of.

Errors

We make use of the following HTTP error codes:

Error Code Meaning
400 Bad Request – Your request was most likely formatted incorrectly
403 Forbidden – Your API key is either invalid or you are attempting to access something you do not have rights to access
404 Not Found – The thing you wanted to get or update didn’t exist
500 Internal Server Error – Our servers were unable to process your request - give it a few minutes and try again. If it keeps failing contact us
503 Service Unavailable – Our servers are offline, check our status page for more details.