# Webhook Integration

## Overview

EagleStatus can trigger an HTTP webhook whenever a service's component status changes. You will receive notifications only if you are subscribed to both the service and the affected components.

## Setting Up

1. [**Sign in**](https://eaglestatus.io/sign-in?utm_source=developer) or [**create an account**](https://eaglestatus.io/sign-in?utm_source=developer) on EagleStatus.
2. Navigate to your **dashboard integrations**.
3. Select the **webhook integration** and add your **webhook URL** where EagleStatus will send `POST` requests.
4. **Done!** EagleStatus will start sending notifications when status changes are detected.

## Payload

When an alert is triggered, the webhook sends a `POST` message with a JSON payload with the following structure:

```json
{
    "checkedAt": "2023-08-21T14:30:00Z",
    "service": {
      "key": "github",
      "name": "Github",
      "status": "DEGRADED",
      "url": "https://eaglestatus.io/services/github",
      "icon": "https//assets.eaglestatus.io/services/github.png"
    },
    "changedComponents": [
      {
        "key": "github/pages",
        "name": "Pages",
        "status": "UP",
        "fullName": "Github / Pages"
      },
      {
        "key": "github/actions",
        "name": "Actions",
        "status": "DEGRADED",
        "fullName": "Github / Actions"
      }
    ]
}
```

## Field Descriptions

* **checkedAt:** The ISO 8601 string representing the time when the status check was performed (e.g., `"2023-08-21T14:30:00Z"`).
* **service:** An object containing details about the service being monitored:
  * **key:** A unique identifier for the service (e.g., `"github"`).
  * **name:** The name of the service (e.g., `"Github"`).
  * **status:** The current status of the service (`UP`, `DOWN`,`UNDER_MAINTENANCE`, `DEGRADED_PERFORMANCE`,`PARTIAL_OUTAGE`).
  * **url:** The URL of the service’s status page on Eagle Status.
  * **icon:** A URL to the service's icon.
* **changedComponents:** An array of components within the service that have experienced a status change:
  * **key:** A unique identifier for the component (e.g., `"github/actions"`).
  * **name:** The name of the component (e.g., `"Actions"`).
  * **status:** The new status of the component.
  * **fullName:** A full name that combines the service and component names (e.g., `"Github / Actions"`).
