Skip to main content
POST
/
uptime
/
incidents
Create an incident
curl --request POST \
  --url https://api.phare.io/uptime/incidents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "impact": "unknown",
  "title": "Service is not working as expected",
  "incident_at": "2023-11-07T05:31:56Z",
  "description": "The server answered with an unexpected status code: 503.",
  "exclude_from_downtime": false,
  "recovery_at": "2023-11-07T05:31:56Z",
  "monitors": [
    1,
    2,
    3
  ]
}
'
{
  "id": 1,
  "project_id": 1,
  "type": "monitor",
  "slug": "APP-123",
  "state": "unknown",
  "status": "ongoing",
  "impact": "unknown",
  "title": "Service is not working as expected",
  "description": "The server answered with an unexpected status code: 503.",
  "exclude_from_downtime": false,
  "incident_at": "2023-11-07T05:31:56Z",
  "recovery_at": "2023-11-07T05:31:56Z",
  "monitors": [
    1,
    2,
    3
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Use a user token to access authenticated routes. The token must be specified in the Authorization HTTP header with the following format 'Authorization: Bearer '.

Headers

X-Phare-Project-Id
integer

A project header is required when using an organization-scoped API key.

Example:

1

X-Phare-Project-Slug
string

A project header is required when using an organization-scoped API key.

Example:

"luminous-guiding-tower"

Body

application/json

Incident request

impact
enum<string>
required
Available options:
unknown,
operational,
degradedPerformance,
partialOutage,
majorOutage,
maintenance
title
string
required

Incident title

Example:

"Service is not working as expected"

incident_at
string<date-time> | null
required

Date of incident confirmation

description
string

Description of the error that caused the incident

Example:

"The server answered with an unexpected status code: 503."

exclude_from_downtime
boolean

Flag to exclude the incident from downtime calculations

Example:

false

recovery_at
string<date-time> | null

Date of incident recovery

monitors
integer[]

List of monitors linked to the incident

Required array length: 1 - 100 elements
Example:
[1, 2, 3]

Response

Success, incident created

id
number
Example:

1

project_id
number

Parent project ID

Example:

1

type
enum<string>
Available options:
monitor,
manual
slug
string

Incident unique slug name

Example:

"APP-123"

state
enum<string>
Available options:
unknown,
investigating,
identified,
monitoring,
resolved
status
enum<string>
Available options:
ongoing,
recovering,
recovered
impact
enum<string>
Available options:
unknown,
operational,
degradedPerformance,
partialOutage,
majorOutage,
maintenance
title
string

Incident title

Example:

"Service is not working as expected"

description
string

Description of the error that caused the incident

Example:

"The server answered with an unexpected status code: 503."

exclude_from_downtime
boolean

Flag to exclude the incident from downtime calculations

Example:

false

incident_at
string<date-time> | null

Date of incident confirmation

recovery_at
string<date-time> | null

Date of incident recovery

monitors
integer[]

List of monitors linked to the incident

Required array length: 1 - 100 elements
Example:
[1, 2, 3]
created_at
string<date-time>

Date of creation for the entity

updated_at
string<date-time>

Date of last update for the entity