---
title: "List delivery attempts"
method: GET
path: "/v1/webhooks/{id}/deliveries"
tags: ["Webhooks"]
---

# List delivery attempts

`GET /v1/webhooks/{id}/deliveries`

## Request

- Base URL: `https://api.mails.ai`
- URL: `https://api.mails.ai/v1/webhooks/{id}/deliveries`
- Auth: HTTP bearer

**Requires scope:** `read`.

## Path parameters

- `id` string, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

A page of delivery attempts for this endpoint.

- object
  - `data` WebhookDelivery[], required: The items on this page, at most `limit` of them.
    - `id` string, required: Delivery id (`whd_…`). Each attempt is a delivery of its own, so a retry has a new id; pass one to `POST /v1/webhook-deliveries/{id}/replay`.
    - `webhook_endpoint_id` string, required: The endpoint the event was sent to (`whe_…`).
    - `event_id` string, required: The event that was sent (`evt_…`); read it with `GET /v1/events/{id}`.
    - `attempt_number` integer, required: Which try this was: 1 for the first, 2 and 3 for the automatic retries. A replay, a redelivery or a test starts again at 1.
    - `status` 'pending' | 'succeeded' | 'failed' | 'dlq', required: `failed`: this attempt failed and a retry follows, as a delivery of its own with the next `attempt_number`. `dlq` (dead-lettered): no retry follows, because three attempts failed or a retry came due while the endpoint was paused (`response_body_excerpt` then says so). Replay any delivery with `POST /v1/webhook-deliveries/{id}/replay`.
    - `http_status` integer: The HTTP status the endpoint answered with; redirects are followed, 3 at most. Absent while `pending`, and when no answer came back: a connection error, no answer within 5 seconds, or an address that is not public.
    - `response_body_excerpt` string: The first 500 characters of the endpoint's response body. When no answer came back, or a retry could not be made, the reason instead; absent while `pending`.
    - `next_retry_at` string, date-time: When the retry of a `failed` attempt is due: 30 seconds after a first failure, 2 minutes after a second. Absent once that retry has been made, and on attempts that get none.
    - `delivered_at` string, date-time: When the endpoint answered with a 2xx. Present only when `status` is `succeeded`.
    - `created_at` string, required: When this attempt started (ISO 8601, UTC).
  - `has_more` boolean, required: True when more items follow this page: pass `next_cursor` as `cursor` to get them.
  - `next_cursor` string: Pass as `cursor` to fetch the next page. Absent on the last page.

## Other responses

- `400`: Invalid request — malformed JSON or a field failed validation. Also `feature_not_enabled` when this server has a feature switched off (custom domains before they are available).
- `401`: Missing or invalid API key.
- `403`: The API key lacks the required scope (`insufficient_scope`), or the token belongs to an app connected by sign-in and this operation is closed to connected apps (`connected_app_not_allowed`).
- `404`: Resource not found in this workspace, or the agent a send names is archived (`agent_archived`).
- `500`: Internal server error.

---

[API](https://skmtc.dev/mails/apis/mails-ai-api.md) · [All operations](https://skmtc.dev/mails/apis/mails-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mails/apis/mails-ai-api/revisions/4d4930a8c33b?raw)
