# List deliveries for a webhook subscription

```http
GET https://secure.yoprint.com/v1/api/store/{team_slug}/setting/webhook_subscription/{id}/log
```

- API version: v1
- Operation ID: `v1_public_webhook_subscription_log`
- Section: Team settings › [Webhook subscriptions](https://developer.yoprint.com/reference/webhook-subscriptions.md)
- Web page: https://developer.yoprint.com/reference/webhook-subscriptions/v1-webhook-subscription-log/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

Returns the subscription's deliveries, newest first, one page at a time. Each delivery is one event sent to this subscription, with the latest attempt's status code and error, when YoPrint retries next, and the event exactly as it was sent (`message`).

Use it to debug your endpoint: `status_code` is what your endpoint answered (`999` when it didn't answer or YoPrint didn't send), and `error` says what went wrong in a sentence of YoPrint's, such as "The receiver answered with HTTP 500." YoPrint doesn't keep your endpoint's reply, so log it on your side.

## Permission

Any team member can call it. Reading needs no extra permission.

## Path parameters

- `team_slug` (string, required): Your team slug, shown as Team ID next to your API key in Profile. Example `your-team`.
- `id` (string, required): The webhook subscription's `id`: a hash id from an earlier answer. Only hash ids work here; anything else answers 404 `page_not_found`. Example `V4keXwwxMQyXw7`.

## Query parameters

- `page` (integer, optional): The page to return. A page holds the team's page size (50 unless the team changed it). `per_page` is not read. Default `1`. Minimum 1. Example `1`.

## Request body

This operation takes no request body.

### Example request

```bash
curl 'https://secure.yoprint.com/v1/api/store/your-team/setting/webhook_subscription/V4keXwwxMQyXw7/log' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1'
```

## Response

`200` Successful response.

Fields:

- `data` (array of objects, required)
  - Each item:
    - `attempt` (integer, required): Attempts made so far: 0 before the first, at most 3.
    - `created_at` (string (date-time), required): When the delivery was queued.
    - `error` (string | null, required): Why the delivery failed. Null after a successful attempt (`status: success`). YoPrint never stores your endpoint's response body. For a failed attempt, this is one of: - `The receiver answered with HTTP {status}.` (your endpoint returned an HTTP status other than 200) - `Could not reach the receiver (connection, DNS, TLS or timeout error).` - `Delivery failed before the receiver answered.` - `Not sent: the webhook URL does not reach a public internet address.` - `Not sent: this server cannot hold the connection to the checked receiver address.`
    - `id` (string, required): The delivery id: one event to one subscription.
    - `message` (object, required)
      - `created_at` (string (date-time), required): When the event happened.
      - `id` (string, required): The event id. Every attempt to deliver this event, to every subscription, carries the same id.
      - `payload` (object, required): The record the event is about, as it was when the event happened. Its fields depend on the event; see "Events" on Create a webhook subscription.
      - `type` (string, required): The event name.
      - `updated_at` (string (date-time), required)
    - `next_retry_at` (string (date-time) | null, required): When YoPrint tries again, or null when it will not (after a success, or after the last attempt).
    - `sent_at` (string (date-time), required): When the latest attempt was made. Before the first attempt (`status` `pending`), when the delivery was queued. Never null.
    - `status` (string, required): `pending` before the first attempt, `success` when the latest attempt got exactly `200`, `error` for any other status code. One of: `"pending"`, `"success"`, `"error"`.
    - `status_code` (integer | null, required): The HTTP status your endpoint returned on the latest attempt (such as `200` or `500`). Set to `999` when no response was received (for example, connection timeouts, DNS lookup failures, TLS errors, or if the request was blocked before sending). Null before the first attempt.
    - `updated_at` (string (date-time), required)
    - `url` (string | null, required): The destination URL for the latest delivery attempt: the full URL on this API. AI apps reading deliveries through YoPrint's MCP server see only the origin (scheme and host, such as `https://example.com`).
    - `webhook_message_id` (string, required): The event id, the same as `id` in the body YoPrint sent.
    - `webhook_subscription_id` (string, required)
- `status` (integer, required)
- `success` (boolean, required)
- `pagination` (object, optional)
  - `count` (integer, required)
  - `currentPage` (integer, required)
  - `links` (object | array of any, required): Links to the neighbouring pages: `previous` and `next`, each present only when that page exists. An empty list, `[]`, when there is only one page.
    - `next` (string (uri), optional): The next page.
    - `previous` (string (uri), optional): The previous page.
  - `perPage` (integer, required)
  - `total` (integer, required)
  - `totalPages` (integer, required)

Example response:

```json
{
  "data": [
    {
      "attempt": 1,
      "created_at": "2026-11-03T15:00:00+00:00",
      "error": null,
      "id": "gxL14iJJPyg63n",
      "message": {
        "created_at": "2026-11-03T15:00:00+00:00",
        "id": "VwYKuTP9vd8Dfo",
        "payload": {
          "calc_total": 125000,
          "formatted_calc_total": "$125.00",
          "id": "BkzhmfgkK2HFTs",
          "name": "Team shirts",
          "scoped_id": "SO1001",
          "status_id": "PLksRyu0AR7Bv4",
          "unique_key": "ord_EXAMPLEuniqueKey"
        },
        "type": "order.created",
        "updated_at": "2026-11-03T15:00:00+00:00"
      },
      "next_retry_at": null,
      "sent_at": "2026-11-03T15:00:00+00:00",
      "status": "success",
      "status_code": 200,
      "updated_at": "2026-11-03T15:00:00+00:00",
      "url": "https://example.com/yoprint/webhooks",
      "webhook_message_id": "VwYKuTP9vd8Dfo",
      "webhook_subscription_id": "V4keXwwxMQyXw7"
    }
  ],
  "pagination": {
    "count": 1,
    "currentPage": 1,
    "links": [],
    "perPage": 50,
    "total": 1,
    "totalPages": 1
  },
  "status": 200,
  "success": true
}
```

## Errors

- `401` The API key is missing or wrong (`unauthenticated`).
  - When: The API key is missing or wrong. Fix: Send your personal API key as `Authorization: Bearer YOUR_API_KEY`.
- `403` You are not allowed to do this. `api_access_not_in_plan`: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only `{"message": "Insufficient Permission"}`. Other refusals use the error envelope, with `unauthorized` or `user_is_not_authorized`.
- `404` Not found. `page_not_found`: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. `code: null`, with a message that starts "No query results for": there is no record with that id.
  - When: No webhook subscription with that id on this team (`error.code` is null and `error.message` starts "No query results"), the id is not one of this team's hash ids, or you are not a member of the team (both `page_not_found`). Fix: Use an `id` from the list operation and check the team slug.

## Notes

- A delivery shows only its latest attempt. `attempt` counts them.
- `status` is `success` only for exactly `200`. Any other `2xx` shows as `error`, even though YoPrint stopped retrying.
- The path parameter is the subscription id.

## Related

- [Show a webhook subscription](https://developer.yoprint.com/reference/webhook-subscriptions/v1-webhook-subscription-show.md): `GET /v1/api/store/{team_slug}/setting/webhook_subscription/{hash_id}`
- [Touch a webhook subscription](https://developer.yoprint.com/reference/webhook-subscriptions/v1-webhook-subscription-update-patch.md): `PATCH /v1/api/store/{team_slug}/setting/webhook_subscription/{hash_id}`
