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

# Webhooks

Webhooks endpoints

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

> List all webhooks

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Webhooks","description":"Webhooks 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":{"Webhook":{"required":["enabled","events","url"],"type":"object","properties":{"url":{"type":"string","description":"The endpoint URL of the webhook to send the POST request to when the specified events occur."},"events":{"type":"array","description":"Available events:\n* `service.monitored_status.updated` - Triggered when a service configured with our internal monitoring goes up/down.\n* `incident.created`, `incident.updated`, `incident.deleted` - Triggered during the lifecycle of an incident, they all send the same payload.\n","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Toggles the webhook's state."}}},"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}/webhooks":{"get":{"tags":["Webhooks"],"summary":"List all webhooks","operationId":"getWebhooks","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"}],"responses":{"200":{"description":"The list of webhooks","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

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

> Adds a new webhook

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Webhooks","description":"Webhooks 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":{"WebhookObj":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}}},"Webhook":{"required":["enabled","events","url"],"type":"object","properties":{"url":{"type":"string","description":"The endpoint URL of the webhook to send the POST request to when the specified events occur."},"events":{"type":"array","description":"Available events:\n* `service.monitored_status.updated` - Triggered when a service configured with our internal monitoring goes up/down.\n* `incident.created`, `incident.updated`, `incident.deleted` - Triggered during the lifecycle of an incident, they all send the same payload.\n","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Toggles the webhook's state."}}},"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}/webhooks":{"post":{"tags":["Webhooks"],"summary":"Adds a new webhook","operationId":"addWebhook","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"}],"requestBody":{"description":"The webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookObj"}}},"required":true},"responses":{"200":{"description":"The webhook was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookObj"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"422":{"$ref":"#/components/responses/ValidationError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## GET /status\_pages/{subdomain}/webhooks/{webhookId}

> Get a webhook

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Webhooks","description":"Webhooks 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"}},"WebhookId":{"name":"webhookId","in":"path","description":"The ID of a webhook","required":true,"schema":{"type":"integer"}}},"schemas":{"WebhookObj":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}}},"Webhook":{"required":["enabled","events","url"],"type":"object","properties":{"url":{"type":"string","description":"The endpoint URL of the webhook to send the POST request to when the specified events occur."},"events":{"type":"array","description":"Available events:\n* `service.monitored_status.updated` - Triggered when a service configured with our internal monitoring goes up/down.\n* `incident.created`, `incident.updated`, `incident.deleted` - Triggered during the lifecycle of an incident, they all send the same payload.\n","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Toggles the webhook's state."}}},"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}/webhooks/{webhookId}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook","operationId":"getWebhook","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/WebhookId"}],"responses":{"200":{"description":"The webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookObj"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## PUT /status\_pages/{subdomain}/webhooks/{webhookId}

> Update the webhook

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Webhooks","description":"Webhooks 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"}},"WebhookId":{"name":"webhookId","in":"path","description":"The ID of a webhook","required":true,"schema":{"type":"integer"}}},"schemas":{"WebhookObj":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}}},"Webhook":{"required":["enabled","events","url"],"type":"object","properties":{"url":{"type":"string","description":"The endpoint URL of the webhook to send the POST request to when the specified events occur."},"events":{"type":"array","description":"Available events:\n* `service.monitored_status.updated` - Triggered when a service configured with our internal monitoring goes up/down.\n* `incident.created`, `incident.updated`, `incident.deleted` - Triggered during the lifecycle of an incident, they all send the same payload.\n","items":{"type":"string"}},"enabled":{"type":"boolean","description":"Toggles the webhook's state."}}},"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}/webhooks/{webhookId}":{"put":{"tags":["Webhooks"],"summary":"Update the webhook","operationId":"updateWebhook","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/WebhookId"}],"requestBody":{"description":"The webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookObj"}}},"required":true},"responses":{"200":{"description":"The webhook was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookObj"}}}},"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}/webhooks/{webhookId}

> Deletes the webhook

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Webhooks","description":"Webhooks 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"}},"WebhookId":{"name":"webhookId","in":"path","description":"The ID of a webhook","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}/webhooks/{webhookId}":{"delete":{"tags":["Webhooks"],"summary":"Deletes the webhook","operationId":"deleteWebhook","parameters":[{"$ref":"#/components/parameters/StatusPageSubdomain"},{"$ref":"#/components/parameters/WebhookId"}],"responses":{"204":{"description":"Webhook deleted successfully","content":{}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```
