> For the complete documentation index, see [llms.txt](https://docs.statuspal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.statuspal.io/platform/api-reference/incidents.md).

# Incidents

Incidents endpoints

## GET /status\_pages/{subdomain}/incidents

> Get the list of incidents of a status page

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incidents","description":"Incidents endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[],"paths":{"/status_pages/{subdomain}/incidents":{"get":{"tags":["Incidents"],"summary":"Get the list of incidents of a status page","operationId":"getIncidents","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"name":"before","in":"query","description":"Used as a cursor for pagination.","schema":{"type":"string"}},{"name":"after","in":"query","description":"Used as a cursor for pagination.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Set the number of incidents to return in the response.\nThis defaults to 20 items, and can be a maximum of 100.\n","schema":{"type":"integer"}},{"name":"type","in":"query","description":"Filter incidents by incident type key.","schema":{"type":"string"}}],"responses":{"200":{"description":"The list of incidents","content":{"application/json":{"schema":{"type":"object","properties":{"incidents":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}},"links":{"type":"object","properties":{"next":{"type":"string","description":"Link for the next page."},"prev":{"type":"string","description":"Link for the previous page."}}},"meta":{"type":"object","properties":{"total_count":{"type":"integer","description":"Shows the total amount of incidents."}}}}}}}},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"components":{"parameters":{"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}}},"schemas":{"Incident":{"type":"object","description":"An incident, either major, minor or a scheduled maintenance","required":["service_ids","type","updates","title"],"properties":{"id":{"type":"integer","description":"ID of the record","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true},"title":{"type":"string","description":"The title of the incident"},"starts_at":{"type":"string","description":"The time at which the incident/maintenance started/will start.","format":"date-time"},"ends_at":{"type":"string","description":"The time at which the incident/maintenance ended/will end.","format":"date-time"},"type":{"$ref":"#/components/schemas/IncidentType"},"service_ids":{"type":"array","description":"An array of service Ids, at least 1 must be included","items":{"type":"integer"}},"updates":{"type":"array","description":"The incident's updates. On incident creation you must pass exactly one update object in the array, if the incident is of type minor/major the update type `issue` is recommended, if a scheduled maintenance then use `scheduled`.","items":{"$ref":"#/components/schemas/IncidentActivity"}},"url":{"readOnly":true,"type":"string","description":"URL to the incident"},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"title\": \"English Title\" },\n  \"es\": { \"title\": \"Spanish Title\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"title":{"type":"string"}}}}},"notify":{"type":"boolean","description":"Notify subscribers when creating an incident with `type` `major` or `minor`."},"maintenance_notify":{"type":"boolean","description":"Notify subscribers when creating an incident (maintenance) with `type` `scheduled`."},"maintenance_notify_settings":{"$ref":"#/components/schemas/MaintenanceNotifySettings"},"affects_uptime":{"readOnly":true,"description":"It's a boolean if the incident affects uptime.","type":"boolean"}}},"IncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n * `scheduled` - A scheduled maintenance is currently taking place.\n","enum":["major","minor","scheduled"]},"IncidentActivity":{"type":"object","description":"Communicates an update of an incident, the special type `resolved` will close an incident.","required":["type","description"],"properties":{"id":{"type":"integer","description":"ID of the record","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true},"posted_at":{"type":"string","description":"Editable datetime at which the record was posted","format":"date-time"},"type":{"type":"string","description":"The type of an incident update:\n * `investigating` - Investigating.\n * `issue` - Issue.\n * `monitoring` - Monitoring.\n * `resolved` - Resolved will close the associated incident by settings its `ends_at` to the current time.\n * `scheduled` - Scheduled Maintenance's first update shall have this type.\n * `essential` - Essential Maintenance's first update shall have this type.\n * `retroactive` - Retroactive.\n * `update` - Standard update on an incident.\n * `escalate` - Escalate will switch the incident type from `minor` to `major`.\n * `deescalate` - De-escalate will switch the incident type from `major` to `minor`.\n * `postmortem` - A Post-mortem update.\n"},"description":{"type":"string","description":"The provided update description (accepts Markdown format)"},"description_html":{"type":"string","readOnly":true,"description":"The provided update description rendered in HTML"},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"description\": \"English description\" },\n  \"es\": { \"description\": \"Spanish description\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"description":{"type":"string"}}}}},"notify":{"type":"boolean","description":"Should your subscribers be notified about this update?","writeOnly":true},"subscribers_notified_at":{"type":"string","description":"Datetime at which subscribers were notified for this update","format":"date-time","readOnly":true},"tweet":{"type":"boolean","description":"Tweet this update with your configured Twitter account?"}}},"MaintenanceNotifySettings":{"type":"object","description":"> ### Configure this field only if the `type` is set to `scheduled`. To take effect, the `maintenance_notify` must be set to `true`.\nOverrides the status page auto maintenance notification settings for this specific maintenance.\n","properties":{"before_notice_minutes":{"type":"integer","description":"The number of minutes to notify the subscribers before the maintenance start.\n* `-1` - Immediately\n* `0` - Never\n* Positive integer (`4320`, `5760`, `10080`, ...) - Before the maintenance start minutes\n"},"second_before_notice_minutes":{"type":"integer","description":"The number of minutes to notify the subscribers the second time before the maintenance start. It needs to be after the first \"before maintenance start\" notice.\n* `0` - Never\n* Positive integer (`720`, `1440`, `2880`, ...) - Before the maintenance start minutes\n"},"on_start":{"type":"boolean","description":"Notify subscribers when the maintenance starts."},"on_end":{"type":"boolean","description":"Notify subscribers when the maintenance ends."}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
````

## POST /status\_pages/{subdomain}/incidents

> Adds a new incident associated to one or more services

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incidents","description":"Incidents endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}}},"schemas":{"IncidentObj":{"type":"object","properties":{"incident":{"$ref":"#/components/schemas/Incident"}}},"Incident":{"type":"object","description":"An incident, either major, minor or a scheduled maintenance","required":["service_ids","type","updates","title"],"properties":{"id":{"type":"integer","description":"ID of the record","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true},"title":{"type":"string","description":"The title of the incident"},"starts_at":{"type":"string","description":"The time at which the incident/maintenance started/will start.","format":"date-time"},"ends_at":{"type":"string","description":"The time at which the incident/maintenance ended/will end.","format":"date-time"},"type":{"$ref":"#/components/schemas/IncidentType"},"service_ids":{"type":"array","description":"An array of service Ids, at least 1 must be included","items":{"type":"integer"}},"updates":{"type":"array","description":"The incident's updates. On incident creation you must pass exactly one update object in the array, if the incident is of type minor/major the update type `issue` is recommended, if a scheduled maintenance then use `scheduled`.","items":{"$ref":"#/components/schemas/IncidentActivity"}},"url":{"readOnly":true,"type":"string","description":"URL to the incident"},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"title\": \"English Title\" },\n  \"es\": { \"title\": \"Spanish Title\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"title":{"type":"string"}}}}},"notify":{"type":"boolean","description":"Notify subscribers when creating an incident with `type` `major` or `minor`."},"maintenance_notify":{"type":"boolean","description":"Notify subscribers when creating an incident (maintenance) with `type` `scheduled`."},"maintenance_notify_settings":{"$ref":"#/components/schemas/MaintenanceNotifySettings"},"affects_uptime":{"readOnly":true,"description":"It's a boolean if the incident affects uptime.","type":"boolean"}}},"IncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n * `scheduled` - A scheduled maintenance is currently taking place.\n","enum":["major","minor","scheduled"]},"IncidentActivity":{"type":"object","description":"Communicates an update of an incident, the special type `resolved` will close an incident.","required":["type","description"],"properties":{"id":{"type":"integer","description":"ID of the record","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true},"posted_at":{"type":"string","description":"Editable datetime at which the record was posted","format":"date-time"},"type":{"type":"string","description":"The type of an incident update:\n * `investigating` - Investigating.\n * `issue` - Issue.\n * `monitoring` - Monitoring.\n * `resolved` - Resolved will close the associated incident by settings its `ends_at` to the current time.\n * `scheduled` - Scheduled Maintenance's first update shall have this type.\n * `essential` - Essential Maintenance's first update shall have this type.\n * `retroactive` - Retroactive.\n * `update` - Standard update on an incident.\n * `escalate` - Escalate will switch the incident type from `minor` to `major`.\n * `deescalate` - De-escalate will switch the incident type from `major` to `minor`.\n * `postmortem` - A Post-mortem update.\n"},"description":{"type":"string","description":"The provided update description (accepts Markdown format)"},"description_html":{"type":"string","readOnly":true,"description":"The provided update description rendered in HTML"},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"description\": \"English description\" },\n  \"es\": { \"description\": \"Spanish description\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"description":{"type":"string"}}}}},"notify":{"type":"boolean","description":"Should your subscribers be notified about this update?","writeOnly":true},"subscribers_notified_at":{"type":"string","description":"Datetime at which subscribers were notified for this update","format":"date-time","readOnly":true},"tweet":{"type":"boolean","description":"Tweet this update with your configured Twitter account?"}}},"MaintenanceNotifySettings":{"type":"object","description":"> ### Configure this field only if the `type` is set to `scheduled`. To take effect, the `maintenance_notify` must be set to `true`.\nOverrides the status page auto maintenance notification settings for this specific maintenance.\n","properties":{"before_notice_minutes":{"type":"integer","description":"The number of minutes to notify the subscribers before the maintenance start.\n* `-1` - Immediately\n* `0` - Never\n* Positive integer (`4320`, `5760`, `10080`, ...) - Before the maintenance start minutes\n"},"second_before_notice_minutes":{"type":"integer","description":"The number of minutes to notify the subscribers the second time before the maintenance start. It needs to be after the first \"before maintenance start\" notice.\n* `0` - Never\n* Positive integer (`720`, `1440`, `2880`, ...) - Before the maintenance start minutes\n"},"on_start":{"type":"boolean","description":"Notify subscribers when the maintenance starts."},"on_end":{"type":"boolean","description":"Notify subscribers when the maintenance ends."}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Bad request!"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ValidationError":{"type":"object","properties":{"errors":{"type":"object","description":"A dictionary where each key contains the name of a field with a validation error and the value an array with the validation errors"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"BadRequestError":{"description":"Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ValidationError":{"description":"There was a validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/status_pages/{subdomain}/incidents":{"post":{"tags":["Incidents"],"summary":"Adds a new incident associated to one or more services","operationId":"addIncident","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"}],"requestBody":{"description":"The incident","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentObj"}}},"required":true},"responses":{"200":{"description":"The incident was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentObj"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"422":{"$ref":"#/components/responses/ValidationError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
````

## GET /status\_pages/{subdomain}/incidents/{incidentId}

> Get an incident

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incidents","description":"Incidents endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[],"paths":{"/status_pages/{subdomain}/incidents/{incidentId}":{"get":{"tags":["Incidents"],"summary":"Get an incident","operationId":"getIncident","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/IncidentId"}],"responses":{"200":{"description":"Incident object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentObj"}}}},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}},"components":{"parameters":{"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}},"IncidentId":{"name":"incidentId","in":"path","description":"The ID of an incident/maintenance","required":true,"schema":{"type":"integer"}}},"schemas":{"IncidentObj":{"type":"object","properties":{"incident":{"$ref":"#/components/schemas/Incident"}}},"Incident":{"type":"object","description":"An incident, either major, minor or a scheduled maintenance","required":["service_ids","type","updates","title"],"properties":{"id":{"type":"integer","description":"ID of the record","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true},"title":{"type":"string","description":"The title of the incident"},"starts_at":{"type":"string","description":"The time at which the incident/maintenance started/will start.","format":"date-time"},"ends_at":{"type":"string","description":"The time at which the incident/maintenance ended/will end.","format":"date-time"},"type":{"$ref":"#/components/schemas/IncidentType"},"service_ids":{"type":"array","description":"An array of service Ids, at least 1 must be included","items":{"type":"integer"}},"updates":{"type":"array","description":"The incident's updates. On incident creation you must pass exactly one update object in the array, if the incident is of type minor/major the update type `issue` is recommended, if a scheduled maintenance then use `scheduled`.","items":{"$ref":"#/components/schemas/IncidentActivity"}},"url":{"readOnly":true,"type":"string","description":"URL to the incident"},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"title\": \"English Title\" },\n  \"es\": { \"title\": \"Spanish Title\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"title":{"type":"string"}}}}},"notify":{"type":"boolean","description":"Notify subscribers when creating an incident with `type` `major` or `minor`."},"maintenance_notify":{"type":"boolean","description":"Notify subscribers when creating an incident (maintenance) with `type` `scheduled`."},"maintenance_notify_settings":{"$ref":"#/components/schemas/MaintenanceNotifySettings"},"affects_uptime":{"readOnly":true,"description":"It's a boolean if the incident affects uptime.","type":"boolean"}}},"IncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n * `scheduled` - A scheduled maintenance is currently taking place.\n","enum":["major","minor","scheduled"]},"IncidentActivity":{"type":"object","description":"Communicates an update of an incident, the special type `resolved` will close an incident.","required":["type","description"],"properties":{"id":{"type":"integer","description":"ID of the record","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true},"posted_at":{"type":"string","description":"Editable datetime at which the record was posted","format":"date-time"},"type":{"type":"string","description":"The type of an incident update:\n * `investigating` - Investigating.\n * `issue` - Issue.\n * `monitoring` - Monitoring.\n * `resolved` - Resolved will close the associated incident by settings its `ends_at` to the current time.\n * `scheduled` - Scheduled Maintenance's first update shall have this type.\n * `essential` - Essential Maintenance's first update shall have this type.\n * `retroactive` - Retroactive.\n * `update` - Standard update on an incident.\n * `escalate` - Escalate will switch the incident type from `minor` to `major`.\n * `deescalate` - De-escalate will switch the incident type from `major` to `minor`.\n * `postmortem` - A Post-mortem update.\n"},"description":{"type":"string","description":"The provided update description (accepts Markdown format)"},"description_html":{"type":"string","readOnly":true,"description":"The provided update description rendered in HTML"},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"description\": \"English description\" },\n  \"es\": { \"description\": \"Spanish description\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"description":{"type":"string"}}}}},"notify":{"type":"boolean","description":"Should your subscribers be notified about this update?","writeOnly":true},"subscribers_notified_at":{"type":"string","description":"Datetime at which subscribers were notified for this update","format":"date-time","readOnly":true},"tweet":{"type":"boolean","description":"Tweet this update with your configured Twitter account?"}}},"MaintenanceNotifySettings":{"type":"object","description":"> ### Configure this field only if the `type` is set to `scheduled`. To take effect, the `maintenance_notify` must be set to `true`.\nOverrides the status page auto maintenance notification settings for this specific maintenance.\n","properties":{"before_notice_minutes":{"type":"integer","description":"The number of minutes to notify the subscribers before the maintenance start.\n* `-1` - Immediately\n* `0` - Never\n* Positive integer (`4320`, `5760`, `10080`, ...) - Before the maintenance start minutes\n"},"second_before_notice_minutes":{"type":"integer","description":"The number of minutes to notify the subscribers the second time before the maintenance start. It needs to be after the first \"before maintenance start\" notice.\n* `0` - Never\n* Positive integer (`720`, `1440`, `2880`, ...) - Before the maintenance start minutes\n"},"on_start":{"type":"boolean","description":"Notify subscribers when the maintenance starts."},"on_end":{"type":"boolean","description":"Notify subscribers when the maintenance ends."}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
````

## PUT /status\_pages/{subdomain}/incidents/{incidentId}

> Updates existing incident

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incidents","description":"Incidents endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"IncidentId":{"name":"incidentId","in":"path","description":"The ID of an incident/maintenance","required":true,"schema":{"type":"integer"}},"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}}},"schemas":{"IncidentObj":{"type":"object","properties":{"incident":{"$ref":"#/components/schemas/Incident"}}},"Incident":{"type":"object","description":"An incident, either major, minor or a scheduled maintenance","required":["service_ids","type","updates","title"],"properties":{"id":{"type":"integer","description":"ID of the record","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true},"title":{"type":"string","description":"The title of the incident"},"starts_at":{"type":"string","description":"The time at which the incident/maintenance started/will start.","format":"date-time"},"ends_at":{"type":"string","description":"The time at which the incident/maintenance ended/will end.","format":"date-time"},"type":{"$ref":"#/components/schemas/IncidentType"},"service_ids":{"type":"array","description":"An array of service Ids, at least 1 must be included","items":{"type":"integer"}},"updates":{"type":"array","description":"The incident's updates. On incident creation you must pass exactly one update object in the array, if the incident is of type minor/major the update type `issue` is recommended, if a scheduled maintenance then use `scheduled`.","items":{"$ref":"#/components/schemas/IncidentActivity"}},"url":{"readOnly":true,"type":"string","description":"URL to the incident"},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"title\": \"English Title\" },\n  \"es\": { \"title\": \"Spanish Title\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"title":{"type":"string"}}}}},"notify":{"type":"boolean","description":"Notify subscribers when creating an incident with `type` `major` or `minor`."},"maintenance_notify":{"type":"boolean","description":"Notify subscribers when creating an incident (maintenance) with `type` `scheduled`."},"maintenance_notify_settings":{"$ref":"#/components/schemas/MaintenanceNotifySettings"},"affects_uptime":{"readOnly":true,"description":"It's a boolean if the incident affects uptime.","type":"boolean"}}},"IncidentType":{"type":"string","description":"The type of the (current) incident:\n * `minor` - A minor incident is currently taking place.\n * `major` - A major incident is currently taking place.\n * `scheduled` - A scheduled maintenance is currently taking place.\n","enum":["major","minor","scheduled"]},"IncidentActivity":{"type":"object","description":"Communicates an update of an incident, the special type `resolved` will close an incident.","required":["type","description"],"properties":{"id":{"type":"integer","description":"ID of the record","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true},"posted_at":{"type":"string","description":"Editable datetime at which the record was posted","format":"date-time"},"type":{"type":"string","description":"The type of an incident update:\n * `investigating` - Investigating.\n * `issue` - Issue.\n * `monitoring` - Monitoring.\n * `resolved` - Resolved will close the associated incident by settings its `ends_at` to the current time.\n * `scheduled` - Scheduled Maintenance's first update shall have this type.\n * `essential` - Essential Maintenance's first update shall have this type.\n * `retroactive` - Retroactive.\n * `update` - Standard update on an incident.\n * `escalate` - Escalate will switch the incident type from `minor` to `major`.\n * `deescalate` - De-escalate will switch the incident type from `major` to `minor`.\n * `postmortem` - A Post-mortem update.\n"},"description":{"type":"string","description":"The provided update description (accepts Markdown format)"},"description_html":{"type":"string","readOnly":true,"description":"The provided update description rendered in HTML"},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"description\": \"English description\" },\n  \"es\": { \"description\": \"Spanish description\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"description":{"type":"string"}}}}},"notify":{"type":"boolean","description":"Should your subscribers be notified about this update?","writeOnly":true},"subscribers_notified_at":{"type":"string","description":"Datetime at which subscribers were notified for this update","format":"date-time","readOnly":true},"tweet":{"type":"boolean","description":"Tweet this update with your configured Twitter account?"}}},"MaintenanceNotifySettings":{"type":"object","description":"> ### Configure this field only if the `type` is set to `scheduled`. To take effect, the `maintenance_notify` must be set to `true`.\nOverrides the status page auto maintenance notification settings for this specific maintenance.\n","properties":{"before_notice_minutes":{"type":"integer","description":"The number of minutes to notify the subscribers before the maintenance start.\n* `-1` - Immediately\n* `0` - Never\n* Positive integer (`4320`, `5760`, `10080`, ...) - Before the maintenance start minutes\n"},"second_before_notice_minutes":{"type":"integer","description":"The number of minutes to notify the subscribers the second time before the maintenance start. It needs to be after the first \"before maintenance start\" notice.\n* `0` - Never\n* Positive integer (`720`, `1440`, `2880`, ...) - Before the maintenance start minutes\n"},"on_start":{"type":"boolean","description":"Notify subscribers when the maintenance starts."},"on_end":{"type":"boolean","description":"Notify subscribers when the maintenance ends."}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Bad request!"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ValidationError":{"type":"object","properties":{"errors":{"type":"object","description":"A dictionary where each key contains the name of a field with a validation error and the value an array with the validation errors"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"BadRequestError":{"description":"Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ValidationError":{"description":"There was a validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/status_pages/{subdomain}/incidents/{incidentId}":{"put":{"tags":["Incidents"],"summary":"Updates existing incident","operationId":"updateIncident","parameters":[{"$ref":"#/components/parameters/IncidentId"},{"$ref":"#/components/parameters/StatusPageSubdomain"}],"requestBody":{"description":"The incident","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentObj"}}},"required":true},"responses":{"200":{"description":"The incident was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentObj"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"422":{"$ref":"#/components/responses/ValidationError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
````

## DELETE /status\_pages/{subdomain}/incidents/{incidentId}

> Deletes incident permanently

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incidents","description":"Incidents endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"StatusPageSubdomain":{"name":"subdomain","in":"path","description":"The subdomain of your status page.\n\nYou can find this under your status page settings, the Subdomain field is found under the \"Domain name\" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/`subdomain`).\n","required":true,"schema":{"type":"string"}},"IncidentId":{"name":"incidentId","in":"path","description":"The ID of an incident/maintenance","required":true,"schema":{"type":"integer"}}},"responses":{"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}},"schemas":{"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}}},"paths":{"/status_pages/{subdomain}/incidents/{incidentId}":{"delete":{"tags":["Incidents"],"summary":"Deletes incident permanently","operationId":"deleteIncident","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/IncidentId"}],"responses":{"200":{"description":"Incident deleted successfully","content":{}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```
