---
title: "Webhooks: signing, retries and replay"
description: "HMAC-SHA256 signed deliveries, three attempts with backoff, then a dead-letter queue you can replay from."
url: https://help.mails.ai/en/articles/11-webhooks-signing-retries-and-replay
collection: "Inbound and events"
updated: 2026-10-10
language: en
---

# Webhooks: signing, retries and replay

HMAC-SHA256 signed deliveries, three attempts with backoff, then a dead-letter queue you can replay from.

![Mails.ai — Webhooks: signing, retries and replay](https://staticfiles.gleap.io/p6a77ce6bbe980ea9dbca1955/zRKRJg9YibpKNBs3UzWLVN3P5iR3zUmWCevzXHCVMY10Ikt7U7JQMN1AfTes8Iap0wQ9LqPoetS.png)

Add an HTTPS endpoint, choose the events you want, and every matching event is POSTed to you.

![The Webhooks page with two endpoints, both enabled](https://staticfiles.gleap.io/p6a77ce6bbe980ea9dbca1955/gXqrk7XEHrnZZ5GIfuKQ5brwMvXddPeYZkgrPPQaZkMJ8JTvl2B51uUzMfY9lmk968yCq9b4572.png)

## Verifying the signature

Each delivery carries `X-Mails-Signature` in the form `t=<timestamp>,v1=<signature>`: an HMAC-SHA256 of the timestamp, a dot and the raw request body, keyed with your endpoint's signing secret, with a ±5 minute timestamp tolerance. Both SDKs check it for you: `webhooks.verify` in TypeScript, `verify_webhook` in Python. **Verify against the raw body**, before any JSON parsing — a re-serialised body will not match, and that is the single most common integration bug here.

## Retries

A non-2xx response, or no response within 5 seconds, is retried twice with backoff, so three attempts in all. After the third failure the delivery lands in the dead-letter queue, where it is kept and can be replayed once your endpoint is healthy again. Nothing is silently dropped.

## Testing without waiting for real mail

**Send test event** on the Webhooks page, or `POST /v1/webhooks/{id}/test`, fires a signed `webhook.test` delivery at your endpoint, so you can confirm the signature check works before any customer mail depends on it. `POST /v1/test/inbound` goes further: with a test key, it pushes a fake inbound through the whole parse-and-classify path.

Endpoint counts are capped per plan: 5 on Free, 25 on Pro, 100 on Scale.

[Add a webhook](https://app.mails.ai/webhooks)
