> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding an HTTP alert source

> Send alerts from your own scripts, services and monitors to incident.io with a single POST request.

An HTTP alert source gives you an endpoint that accepts alerts in incident.io's own format. Use
it for internal scripts, custom monitors, or any tool where you control the request body. Every
request becomes an incident.io alert, so you can route it to a team, escalate to whoever is on
call, and open an incident when one matters.

| | |
| - | - |
| **Plans** | All plans |
| **Connects with** | An alert source. You send a `POST` request with a JSON body to incident.io |
| **What you get** | [Alerts](https://docs.incident.io/alerts/getting-started.md) and [alert attributes](https://docs.incident.io/alerts/attributes-and-priorities.md) to route, escalate and declare incidents from |

> [!NOTE]
>
> If your tool sends a webhook you can't reshape, use a
> [custom HTTP source](https://docs.incident.io/alerts/custom-http-sources.md) instead. It transforms the tool's payload into
> this format.

## Step 1: create the alert source

1. Go to [Alerts](https://app.incident.io/~/on-call/alert-routes/sources) in your incident.io dashboard
   and select the **Sources** tab.
2. Press **Create source**, search for **HTTP**, and continue.
3. Give it a name.

The setup page shows the **URL**, the secret token, an example body and a ready-made cURL
command. Keep it open for the next step.

## Step 2: send alerts

Send a `POST` request to the **URL** with a JSON body. Authenticate with an `Authorization:
Bearer <your token>` header, or add `?token=<your token>` to the URL if your tool can't set
headers.

```bash theme={null}
curl -X POST \
  -H 'Authorization: Bearer <your token>' \
  -H 'Content-Type: application/json' \
  <your alert source URL> \
  -d '{
    "title": "My first alert",
    "description": "Some additional context",
    "deduplication_key": "first-alert",
    "status": "firing",
    "metadata": {
      "team": "core",
      "service": "api"
    }
  }'
```

| Field | What it does |
| - | - |
| `title` | The alert title. Required |
| `status` | `firing` or `resolved`. Required |
| `deduplication_key` | Identifies the alert. Requests with the same key update the same alert |
| `description` | The alert description, in Markdown |
| `source_url` | A link back to where the alert came from |
| `metadata` | Any key-value pairs you want to use as alert attributes |

See the [Alert Events API reference](https://docs.incident.io/api-reference/alert-events-v2.md) for every field and its
validation rules.

## How alerts behave

* **Title and description.** The alert uses your `title` and Markdown `description`, where a
  single line break starts a new paragraph, and links to `source_url`.
* **Deduplication.** New HTTP sources reject requests without a `deduplication_key`. Older
  sources accept them, and treat identical requests in the same 30-second window as one alert.
* **Resolution.** Send `resolved` with the same `deduplication_key` you fired with.
* **Attributes.** Put ownership in `metadata`, such as `metadata.team`. URL query parameters,
  apart from `token`, land under `query_params`, so you can give each sender its own URL. Use
  these to set [alert attributes](https://docs.incident.io/alerts/attributes-and-priorities.md).

## Step 3: check it works

Run the cURL command from the setup page, then again with `"status": "resolved"`. The alert
should appear, then resolve, on the alert source page in incident.io within a few seconds.

If nothing arrives, check **Recent requests** on that page. Every request sent to the source is
listed there, including any that were rejected, with the reason.

***

Can't find the alert source you are looking for? Head to our
[integrations page](https://incident.io/integrations) or message us at
[support@incident.io](mailto:support@incident.io).
