API reference

Webhooks

Receive signed, retried email events (sent, delivered, delayed, bounced, complained, failed, received) at your own endpoints.

GET/webhooks
API key

List webhook endpoints

List webhook endpoints

Request
curl https://sendhq.cc/api/v1/webhooks \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "data": [],
  "count": 0,
  "eventTypes": [
    "email.sent",
    "email.delivered",
    "email.delivery_delayed",
    "email.bounced",
    "email.complained",
    "email.failed",
    "email.received"
  ]
}
POST/webhooks
API key

Create a webhook endpoint

Subscribe an https URL to email events. Omit `events` to receive every event type. The response includes the signing secret (`whsec_…`). Each delivery is signed with the Standard Webhooks scheme (`webhook-id`, `webhook-timestamp`, `webhook-signature`) and retried up to 8 times over about 27 hours. Up to 10 endpoints per workspace.

Request
curl https://sendhq.cc/api/v1/webhooks \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/webhooks/sendhq","events":["email.delivered","email.bounced"],"description":"Production"}'
201 Response
{
  "id": "wh_…",
  "url": "https://example.com/webhooks/sendhq",
  "events": [
    "email.delivered",
    "email.bounced"
  ],
  "status": "enabled",
  "secret": "whsec_…"
}
GET/webhooks/:id
API key

Retrieve a webhook endpoint and its secret

Retrieve a webhook endpoint and its secret

Request
curl https://sendhq.cc/api/v1/webhooks/id_value \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "id": "wh_…",
  "url": "https://example.com/webhooks/sendhq",
  "events": [],
  "status": "enabled",
  "secret": "whsec_…"
}
PATCH/webhooks/:id
API key

Update, enable, or disable a webhook endpoint

Update, enable, or disable a webhook endpoint

Request
curl https://sendhq.cc/api/v1/webhooks/id_value \
  -X PATCH \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"disabled"}'
200 Response
{
  "id": "wh_…",
  "status": "disabled"
}
DELETE/webhooks/:id
API key

Delete a webhook endpoint and its delivery log

Delete a webhook endpoint and its delivery log

Request
curl https://sendhq.cc/api/v1/webhooks/id_value \
  -X DELETE \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "ok": true
}
POST/webhooks/:id/rotate-secret
API key

Rotate an endpoint signing secret

Rotate an endpoint signing secret

Request
curl https://sendhq.cc/api/v1/webhooks/id_value/rotate-secret \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "id": "wh_…",
  "secret": "whsec_…"
}
POST/webhooks/:id/test
API key

Send a signed webhook.test event now

Send a signed webhook.test event now

Request
curl https://sendhq.cc/api/v1/webhooks/id_value/test \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "delivery": {
    "id": "msg_…",
    "eventType": "webhook.test",
    "status": "succeeded",
    "attempts": 1
  },
  "ok": true
}
GET/webhooks/:id/deliveries
API key

List delivery attempts for an endpoint

List delivery attempts for an endpoint

Query parametersstatuslimit
Request
curl https://sendhq.cc/api/v1/webhooks/id_value/deliveries \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "data": [],
  "count": 0
}
GET/webhooks/:id/deliveries/:deliveryId
API key

Retrieve one delivery and its payload

Retrieve one delivery and its payload

Request
curl https://sendhq.cc/api/v1/webhooks/id_value/deliveries/deliveryId_value \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "id": "msg_…",
  "eventType": "email.delivered",
  "status": "succeeded",
  "attempts": 1,
  "payload": {
    "type": "email.delivered",
    "created_at": "2026-10-29T12:00:00.000Z",
    "data": {
      "email_id": "em_…"
    }
  }
}
POST/webhooks/:id/deliveries/:deliveryId/retry
API key

Retry a delivery now

Retry a delivery now

Request
curl https://sendhq.cc/api/v1/webhooks/id_value/deliveries/deliveryId_value/retry \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
200 Response
{
  "delivery": {
    "id": "msg_…",
    "status": "succeeded",
    "attempts": 2
  },
  "ok": true
}