# 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"`).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.eaglestatus.io/webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
