# Webhook Integration

You can integrate IncidentHub with your own webhook endpoint to get notified when incidents occur.

IncidentHub will send messages to your webhook when any of the following happens:

1. An incident or maintenance is triggered, updated, or resolved in any of your monitored services.
2. An upcoming maintenance reminder is triggered based on your chosen time interval.

## Webhook Event Format

The webhook request will be made in the following format

HTTP Method: POST

HTTP Headers

* Content-Type: application/json

Body:

```
"type": "triggered | updated" | "resolved",
"event": "incident | maintenance",
"timestamp": time as a string with time zone indicator,
"data": {
    "service": Service name,
    "statusPage": Link to official status page,
    "eventURL": Link to the event,
    "content": Content of the event,
    "title": Title of the event,
    "affectedComponents": An array (can be empty) of the affected components for the event,
}

```

Example payload:

```
{
    "type": "updated",
    "event": "incident",
    "timestamp": "2024-10-01T22:38:01.725-07:00",
    "data": {
        "service": "Twilio",
        "statusPage": "https://status.twilio.com/",
        "eventURL": "https://stspg.io/mjg3188vltfh",
        "content": "We are experiencing call dialling delays to Indosat Ooredoo Indonesia phone numbers. Our engineers are working with our carrier partner to resolve the issue. We will provide another update in 1 hour or as soon as more information becomes available.",
        "title": "Call Dialling Delays To Indosat Ooredoo Indonesia  Phone Numbers",
        "affectedComponents": [
            "CARRIER NETWORK (Voice, APAC)",
            "CARRIER NETWORK (Voice, EMEA)"
        ]
    }
}

```

## Payload Fields

**type**

triggered : Start of an incident.

updated : Intermediate update for an active incident.

resolved : End of an incident. Also sent for post-mortem updates after an incident "resolved" is sent.

**event**

incident : Indicates an outage, an unplanned event.

maintenance: Indicates a planned maintenance.

**timestamp**

The timestamp when this event took place.

**data**

Information about the event. Fields inside data:

service: Name of the monitored service.

statusPage: A link to the service's official status page.

eventURL: A link to the event on the service's official status page.

content: More information about the event.

title: A summary of the event.

affectedComponents: An array of strings which indicate the components affected in the event. This can be empty.

## Steps

1. Go to your IncidentHub account and click on Channels -> Add -> Webhook.
2. Add a Name and Description.
3. Under "Webhook URL", paste your webhook URL.&#x20;
4. You can check if the endpoint is working by filling in the Webhook URL and clicking on the "Send a test message" button.
5. Click "Save".

<figure><img src="/files/QCdKXzuckHEqrOUJCfHf" alt=""><figcaption></figcaption></figure>

#### [<sup>Set up your Webhook now</sup>](https://incidenthub.cloud/#pricing)


---

# 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://docs.incidenthub.cloud/incidenthub-documentation/channels/webhook-integration.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.
