Deliveries API
Deliveries represent attempts to send webhooks to destinations.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/deliveries | List deliveries |
| GET | /api/deliveries/{id} | Get delivery |
| POST | /api/deliveries/{id}/replay | Replay a delivery |
| POST | /api/deliveries/{id}/analyze | AI failure root-cause analysis (Pro+) |
| POST | /api/deliveries/bulk-replay | Replay deliveries by ID (up to 100) |
| POST | /api/deliveries/bulk-replay-events | Replay failed deliveries for events or a time window |
Info
Failed deliveries are retried automatically. A delivery that exhausts its retries is moved to the inbound dead-letter queue, which you can browse at Inbound → Dead Letter Queue or through /api/organizations/{orgId}/dlq (list, /stats, POST /{dlqId}/retry, POST /retry-bulk, DELETE /{dlqId}, DELETE /bulk). Outbound webhooks have their own dead-letter queue (see the Webhooks API).
Delivery Object
{
"id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"organizationId": "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
"eventId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbb0001",
"routeId": "44444444-4444-4444-8444-444444444444",
"destinationId": "22222222-2222-4222-8222-222222220001",
"status": "delivered",
"attemptCount": 1,
"maxAttempts": 13,
"nextRetryAt": null,
"holdExpiresAt": null,
"responseStatus": 200,
"responseHeaders": {
"Content-Type": "application/json",
"X-Request-ID": "req_abc"
},
"responseBody": "{\"received\": true}",
"latencyMs": 245,
"errorMessage": null,
"deliveredAt": "2024-01-15T10:30:01Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:01Z",
"destinationName": "Production API",
"eventType": "push"
}Status Values
| Status | Description |
|---|---|
pending | Awaiting delivery, or waiting less than a minute to retry |
awaiting_retry | Waiting for a retry more than a minute away. nextRetryAt is when it is due |
held | Waiting while the route's circuit breaker is open. Spends no attempts. holdExpiresAt is when it goes to the dead letter queue if the destination hasn't recovered |
throttled | Waiting for the destination's rate limit |
delivered | Successfully delivered (2xx response) |
failed | All retry attempts exhausted, or a permanent failure |
failed_over | Moved to the route's next failover destination, as a new delivery |
schema_failed | Payload failed schema validation |
maxAttempts is the attempt budget the delivery was created with: your plan's (5 on Free, 11 on
Starter and Pay As You Go, 13 on Pro, 15 on Business), or 5 for routes with failover destinations,
sources in transient mode and edited replays. nextRetryAt is null on a held delivery; its
deadline is in holdExpiresAt, which is null in every other status.
List Deliveries
GET /api/deliveriesQuery Parameters
| Parameter | Type | Description |
|---|---|---|
| limit | number | Max items to return (default: 50) |
| offset | number | Number of items to skip (default: 0) |
| status | string | Filter by status. pending also returns awaiting_retry and held deliveries |
Example
curl "https://api.hookbase.app/api/deliveries?status=failed&limit=20" \
-H "Authorization: Bearer whr_your_api_key"Response
{
"deliveries": [
{
"id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"eventId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbb0001",
"destinationId": "22222222-2222-4222-8222-222222220001",
"status": "failed",
"attemptCount": 5,
"maxAttempts": 5,
"responseStatus": 500,
"latencyMs": 812,
"errorMessage": "Internal Server Error",
"destinationName": "Production API",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"limit": 20,
"offset": 0
}Get Delivery
GET /api/deliveries/{id}Example
curl "https://api.hookbase.app/api/deliveries/aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa" \
-H "Authorization: Bearer whr_your_api_key"Response
{
"delivery": {
"id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"organizationId": "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
"eventId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbb0001",
"routeId": "44444444-4444-4444-8444-444444444444",
"destinationId": "22222222-2222-4222-8222-222222220001",
"status": "delivered",
"attemptCount": 2,
"maxAttempts": 5,
"nextRetryAt": null,
"responseStatus": 200,
"responseHeaders": {
"Content-Type": "application/json"
},
"responseBody": "{\"received\": true}",
"latencyMs": 180,
"errorMessage": null,
"deliveredAt": "2024-01-15T10:30:02Z",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:02Z",
"destinationName": "Production API",
"destinationUrl": "https://api.yourapp.com/webhooks"
}
}Replay a Delivery
Create a fresh delivery from an existing one and queue it immediately:
POST /api/deliveries/{id}/replayRequest Body (optional)
| Field | Type | Description |
|---|---|---|
| destinationOverride | string | Send to a different destination ID |
| transformOverride | object | { code, type?, inputFormat?, outputFormat? } — apply a one-off transform |
| headersOverride | object | Extra request headers (max 50) |
| persistTransform | boolean | Save transformOverride to the route (requires transformOverride) |
A destinationOverride into a bridge, or a
transformOverride or edited payload on a replay that goes to one (including the route's failover
destinations, for an edited payload), needs the events:send permission: 403
Permission denied: events:send otherwise. A plain replay doesn't.
Example
curl -X POST https://api.hookbase.app/api/deliveries/aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa/replay \
-H "Authorization: Bearer whr_your_api_key"Response
{
"deliveryId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaa0005",
"message": "Replay queued"
}Info
Replay creates a new delivery record rather than mutating the original. Events processed in transient mode (payload not stored) cannot be replayed.
A plain replay gets a fresh attempt budget, the same one a new delivery on that route would get,
and is held like any other delivery while the route's circuit is open. A replay with a transformOverride or headersOverride
is an edited replay: it gets 5 attempts and is never held.
Bulk Replay
Replay multiple deliveries by ID in a single request (up to 100).
POST /api/deliveries/bulk-replayRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| deliveryIds | string[] | Yes | Array of delivery IDs to replay (max 100) |
Example
curl -X POST https://api.hookbase.app/api/deliveries/bulk-replay \
-H "Authorization: Bearer whr_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"deliveryIds": ["aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa", "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaa0001", "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaa0002"]
}'Response
{
"message": "3 deliveries queued for replay",
"queued": 3,
"skipped": 0,
"results": [
{ "originalId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa", "newId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaa0004", "status": "queued" }
]
}Info
Deliveries whose event payload is no longer stored (transient events) are skipped and reported in results with status: "skipped".
Bulk Replay by Event
Replay failed deliveries for a set of events, or for every failed event in a time window. Pass either eventIds or a since/until window — not both.
A failed delivery that a later delivery of the same event, route and destination has since delivered (for example, an earlier replay) is skipped, so the destination doesn't get the event twice.
POST /api/deliveries/bulk-replay-eventsRequest Body
| Field | Type | Description |
|---|---|---|
| eventIds | string[] | Explicit list of event IDs |
| since | string | Window start (ISO 8601) — used when eventIds is omitted |
| until | string | Window end (ISO 8601) |
| destinationOverride | string | Send all replays to a different destination ID |
| transformOverride | object | { code, type?, inputFormat?, outputFormat? } |
| headersOverride | object | Extra request headers |
| persistTransform | boolean | Save transformOverride to the route |
A destinationOverride into a bridge, or a
transformOverride when any replayed delivery goes to one, needs the events:send permission.
Example
curl -X POST https://api.hookbase.app/api/deliveries/bulk-replay-events \
-H "Authorization: Bearer whr_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"since": "2024-01-15T00:00:00Z",
"until": "2024-01-15T23:59:59Z"
}'Failure Analysis
Run AI-assisted root-cause analysis on a failed delivery (Pro plan and above).
POST /api/deliveries/{id}/analyzeRequest Body (optional)
| Field | Type | Description |
|---|---|---|
| force | boolean | Re-run analysis even if a cached result exists |
Error Responses
404 Not Found
{
"error": "Delivery not found"
}400 Bad Request
Returned by bulk replay when deliveryIds is missing, empty, or exceeds 100.
{
"error": "deliveryIds array is required"
}