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

# Webhooks

Receive real-time POST notifications from Statuspal to your own endpoints when incidents or service status changes occur.

Statuspal supports outbound webhooks so you can receive events from your status page and monitoring system in real time. When a selected event occurs, Statuspal sends a `POST` request to your endpoint with a JSON payload in the body.

## Setup

1. Click **Webhooks** in the admin sidebar, then click **New Webhook**.\
   \
   ![New Webhook button](https://4061983002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgIMm5p2V7PNx3dS7vwKE%2Fuploads%2Fgit-blob-a486f0767997472881d02134b6918dbdb13c8554%2Fintegrations-webhooks-new-webhook.png?alt=media)
2. Enter your **endpoint URL**.
3. Select one or more **events** to subscribe to.
4. Click **Create**.

Once created, click **Send test request** to verify that your endpoint receives payloads correctly. The latest response from your server will appear inline.

![Webhook test request result](https://4061983002-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgIMm5p2V7PNx3dS7vwKE%2Fuploads%2Fgit-blob-af6bb04fe5e3ed3d884c5012a39b78f5d0c7ee84%2Fintegrations-webhooks-test-request.png?alt=media)

## Webhook events

### `service.monitored_status.updated`

Triggered when a service configured with Statuspal's internal monitoring changes status (up/down).

```json
{
  "event": "service.monitored_status.updated",
  "data": {
    "object": {
      "type": "service",
      "parent_id": null,
      "name": "API",
      "id": 123,
      "display_response_time_chart": false,
      "current_incident_type": null
    },
    "monitored_status": "up"
  }
}
```

### `incident.created`, `incident.updated`, `incident.deleted`

Triggered during the lifecycle of an incident. All three events share the same payload shape.

```json
{
  "event": "incident.updated",
  "data": {
    "object": {
      "type": "incident",
      "starts_at": "2020-03-11T12:47:17",
      "ends_at": null,
      "service_ids": [1, 2],
      "l_title": [{ "lang": "en", "text": "Incident title" }],
      "id": 123
    }
  }
}
```
