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

# Webhooks

> Signed alerts when a lead can be filled at a profit.

Routeur sends a signed `POST` to your endpoint when a graph run finds a lead whose live order books could be filled at a profit of at least your subscription's minimum.

## Events

| Type                                           | Sent when                                                                                                       |
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| [`lead.executable`](/webhooks/lead-executable) | A lead can be filled at a profit. An unchanged lead is not re-sent for six hours unless its net profit doubles. |
| [`ping`](/webhooks/ping)                       | A test delivery is requested, through the same signed path as real alerts.                                      |

## Subscriptions

During the private preview, subscriptions are set up for your key by the Routeur team. Each one has:

* an **HTTPS endpoint** on a public address;
* a **format**: `json`, the signed events on these pages, or `slack`, a formatted message for a Slack incoming webhook;
* a **minimum net profit** in USD, and whether to send **only cross-venue** leads;
* its own **signing secret**, shared with you once.

## Delivery

<AccordionGroup>
  <Accordion title="Headers" icon="list">
    | Header              | Value                                                                                 |
    | ------------------- | ------------------------------------------------------------------------------------- |
    | `Content-Type`      | `application/json`                                                                    |
    | `User-Agent`        | `Routeur-Webhooks/1`                                                                  |
    | `Routeur-Signature` | `t=<unix seconds>,v1=<hex>`; see [verifying signatures](/webhooks/verify-signatures). |
    | `Routeur-Delivery`  | The delivery id, unchanged across retries.                                            |
  </Accordion>

  <Accordion title="Responding" icon="reply">
    Respond with any `2xx` within 10 seconds. Do slow work after responding.

    Responding `410 Gone` disables the subscription.
  </Accordion>

  <Accordion title="Retries" icon="rotate">
    Any other status, or no response, is retried with exponential backoff starting at 30 seconds, for up to 8 attempts. Use `Routeur-Delivery` to ignore a delivery you have already handled.
  </Accordion>

  <Accordion title="Endpoints" icon="shield">
    Endpoints must be HTTPS on a public address. Redirects are not followed.
  </Accordion>
</AccordionGroup>
