> 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/incident-templates.md).

# Incident Templates

Incident Templates endpoints

## GET /status\_pages/{subdomain}/incident\_templates

> Get the incident templates

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incident Templates","description":"Incident Templates 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":{"IncidentTemplate":{"description":"Represents the incident template.","type":"object","required":["title","description"],"properties":{"id":{"type":"integer","readOnly":true,"description":"The ID of the incident template."},"name":{"type":"string","nullable":true,"description":"The template's own name/label as shown in the dashboard. This is separate from `title`, which is the incident title the template produces when applied. Blank or whitespace-only values are stored as null."},"title":{"type":"string","description":"The title of the incident template."},"description":{"type":"string","description":"The description of the incident template."},"service_ids":{"type":"array","description":"An array of service Ids.","items":{"type":"integer"}},"incident_types":{"type":"array","description":"An array of incident type keys. If set, the incident template will only work with the given incident types.","items":{"type":"string"}},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"title\": \"English title\", \"description\": \"English description\" },\n  \"es\": { \"title\": \"Spanish title\", \"description\": \"Spanish description\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}}}}}}},"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 :("}}}},"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"}}}}}},"paths":{"/status_pages/{subdomain}/incident_templates":{"get":{"tags":["Incident Templates"],"summary":"Get the incident templates","operationId":"getIncidentTemplates","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"}],"responses":{"200":{"description":"A status page's incident templates","content":{"application/json":{"schema":{"type":"object","properties":{"incident_templates":{"type":"array","items":{"$ref":"#/components/schemas/IncidentTemplate"}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
````

## POST /status\_pages/{subdomain}/incident\_templates

> Adds a new incident template

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incident Templates","description":"Incident Templates 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":{"IncidentTemplateObj":{"type":"object","properties":{"incident_template":{"$ref":"#/components/schemas/IncidentTemplate"}}},"IncidentTemplate":{"description":"Represents the incident template.","type":"object","required":["title","description"],"properties":{"id":{"type":"integer","readOnly":true,"description":"The ID of the incident template."},"name":{"type":"string","nullable":true,"description":"The template's own name/label as shown in the dashboard. This is separate from `title`, which is the incident title the template produces when applied. Blank or whitespace-only values are stored as null."},"title":{"type":"string","description":"The title of the incident template."},"description":{"type":"string","description":"The description of the incident template."},"service_ids":{"type":"array","description":"An array of service Ids.","items":{"type":"integer"}},"incident_types":{"type":"array","description":"An array of incident type keys. If set, the incident template will only work with the given incident types.","items":{"type":"string"}},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"title\": \"English title\", \"description\": \"English description\" },\n  \"es\": { \"title\": \"Spanish title\", \"description\": \"Spanish description\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}}}}}}},"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}/incident_templates":{"post":{"tags":["Incident Templates"],"summary":"Adds a new incident template","operationId":"addIncidentTemplate","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"}],"requestBody":{"description":"The incident template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentTemplateObj"}}},"required":true},"responses":{"201":{"description":"The incident template created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentTemplateObj"}}}},"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"}}}}}}
````

## GET /status\_pages/{subdomain}/incident\_templates/{incidentTemplateId}

> Get incident template against given incident template id

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incident Templates","description":"Incident Templates 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"}},"IncidentTemplateId":{"name":"incidentTemplateId","in":"path","description":"The ID of an incident template","required":true,"schema":{"type":"integer"}}},"schemas":{"IncidentTemplateObj":{"type":"object","properties":{"incident_template":{"$ref":"#/components/schemas/IncidentTemplate"}}},"IncidentTemplate":{"description":"Represents the incident template.","type":"object","required":["title","description"],"properties":{"id":{"type":"integer","readOnly":true,"description":"The ID of the incident template."},"name":{"type":"string","nullable":true,"description":"The template's own name/label as shown in the dashboard. This is separate from `title`, which is the incident title the template produces when applied. Blank or whitespace-only values are stored as null."},"title":{"type":"string","description":"The title of the incident template."},"description":{"type":"string","description":"The description of the incident template."},"service_ids":{"type":"array","description":"An array of service Ids.","items":{"type":"integer"}},"incident_types":{"type":"array","description":"An array of incident type keys. If set, the incident template will only work with the given incident types.","items":{"type":"string"}},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"title\": \"English title\", \"description\": \"English description\" },\n  \"es\": { \"title\": \"Spanish title\", \"description\": \"Spanish description\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}}}}}}},"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 :("}}}},"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"}}}}}},"paths":{"/status_pages/{subdomain}/incident_templates/{incidentTemplateId}":{"get":{"operationId":"getIncidentTemplate","summary":"Get incident template against given incident template id","tags":["Incident Templates"],"parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/IncidentTemplateId"}],"responses":{"200":{"description":"The incident template details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentTemplateObj"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
````

## PUT /status\_pages/{subdomain}/incident\_templates/{incidentTemplateId}

> Updates existing incident template

````json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incident Templates","description":"Incident Templates 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"}},"IncidentTemplateId":{"name":"incidentTemplateId","in":"path","description":"The ID of an incident template","required":true,"schema":{"type":"integer"}}},"schemas":{"IncidentTemplateObj":{"type":"object","properties":{"incident_template":{"$ref":"#/components/schemas/IncidentTemplate"}}},"IncidentTemplate":{"description":"Represents the incident template.","type":"object","required":["title","description"],"properties":{"id":{"type":"integer","readOnly":true,"description":"The ID of the incident template."},"name":{"type":"string","nullable":true,"description":"The template's own name/label as shown in the dashboard. This is separate from `title`, which is the incident title the template produces when applied. Blank or whitespace-only values are stored as null."},"title":{"type":"string","description":"The title of the incident template."},"description":{"type":"string","description":"The description of the incident template."},"service_ids":{"type":"array","description":"An array of service Ids.","items":{"type":"integer"}},"incident_types":{"type":"array","description":"An array of incident type keys. If set, the incident template will only work with the given incident types.","items":{"type":"string"}},"translations":{"description":"A translations object. For example:\n```json\n{\n  \"en\": { \"title\": \"English title\", \"description\": \"English description\" },\n  \"es\": { \"title\": \"Spanish title\", \"description\": \"Spanish description\" }\n}\n```\n","type":"object","additionalProperties":true,"properties":{"[lang]":{"description":"e.g. `en`.","type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}}}}}}},"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}/incident_templates/{incidentTemplateId}":{"put":{"tags":["Incident Templates"],"summary":"Updates existing incident template","operationId":"updateIncidentTemplate","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/IncidentTemplateId"}],"requestBody":{"description":"The incident template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentTemplateObj"}}},"required":true},"responses":{"200":{"description":"The incident template updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentTemplateObj"}}}},"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}/incident\_templates/{incidentTemplateId}

> Deletes incident template permanently

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Incident Templates","description":"Incident Templates 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"}},"IncidentTemplateId":{"name":"incidentTemplateId","in":"path","description":"The ID of an incident template","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}/incident_templates/{incidentTemplateId}":{"delete":{"operationId":"deleteIncidentTemplate","summary":"Deletes incident template permanently","tags":["Incident Templates"],"parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/IncidentTemplateId"}],"responses":{"200":{"description":"Incident template deleted successfully","content":{}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```
