> ## Documentation Index
> Fetch the complete documentation index at: https://docs.offthehook.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# View and Retry Failed Events

> Inspect delivery attempts for a subscription and manually trigger a retry for events that failed after exhausting automatic retries.

Off the Hook automatically retries failed deliveries up to 7 times over approximately 2 hours. If all automatic retries are exhausted, the event status changes to `failed` and no further attempts are made. You can inspect the full event history for any subscription and manually re-queue failed events once your endpoint is back in a healthy state.

<Tip>
  Before retrying a failed event, confirm that your endpoint is returning `2xx` responses, is publicly reachable over HTTPS, and that your signature verification code is correct. Retrying without fixing the underlying issue causes the event to fail again.
</Tip>

## List events for a subscription

`GET /v1/subscriptions/:id/events` returns a paginated list of all events for the subscription, ordered from newest to oldest.

```bash theme={null}
curl https://api.offthehook.dev/v1/subscriptions/sub_2QkP9aB7xN.../events \
  -H "Authorization: Bearer oth_YOUR_API_KEY"
```

Each item in the response is an `EventView` object:

```json theme={null}
{
  "items": [
    {
      "id": "evt_8xN9kP2QbA...",
      "subscriptionId": "sub_2QkP9aB7xN...",
      "kind": "wallet.transfer.broadcasted",
      "chainId": "tron:mainnet",
      "status": "failed",
      "attempts": 7,
      "deliveryCount": 0,
      "responseStatus": 500,
      "responseBody": "Internal Server Error",
      "payload": { "id": "evt_8xN9kP2QbA...", "kind": "wallet.transfer.broadcasted", "..." : "..." },
      "dateCreated": "2026-05-08T12:34:56Z"
    }
  ],
  "nextPageToken": "v1:..."
}
```

| Field            | Description                                                                                            |
| ---------------- | ------------------------------------------------------------------------------------------------------ |
| `id`             | The `evt_...` identifier — also the value of the `webhook-id` delivery header                          |
| `kind`           | The event type (e.g., `wallet.transfer.broadcasted`)                                                   |
| `status`         | `pending`, `delivered`, or `failed`                                                                    |
| `attempts`       | Number of delivery attempts in the current dispatch cycle; resets to 0 when you trigger a manual retry |
| `deliveryCount`  | Total number of successful deliveries across all cycles (monotonically increasing)                     |
| `responseStatus` | The last HTTP status code returned by your endpoint                                                    |
| `responseBody`   | The last response body returned by your endpoint (may be truncated)                                    |
| `payload`        | The full webhook payload that was or will be delivered                                                 |

Pass `nextPageToken` as a query parameter to page through a large event history:

```bash theme={null}
curl "https://api.offthehook.dev/v1/subscriptions/sub_2QkP9aB7xN.../events?nextPageToken=v1:..." \
  -H "Authorization: Bearer oth_YOUR_API_KEY"
```

## Get a specific event

`GET /v1/subscriptions/:id/events/:eventId` returns a single event by ID.

```bash theme={null}
curl https://api.offthehook.dev/v1/subscriptions/sub_2QkP9aB7xN.../events/evt_8xN9kP2QbA... \
  -H "Authorization: Bearer oth_YOUR_API_KEY"
```

The response shape is the same `EventView` object as above.

## Manually retry a failed event

`POST /v1/subscriptions/:id/events/:eventId/retry` re-queues a failed event for delivery. The `attempts` counter resets to 0 and the automatic retry schedule starts again from the beginning.

```bash theme={null}
curl -X POST https://api.offthehook.dev/v1/subscriptions/sub_2QkP9aB7xN.../events/evt_8xN9kP2QbA.../retry \
  -H "Authorization: Bearer oth_YOUR_API_KEY"
```

The API returns `200 OK` with the updated `EventView` when the event has been successfully re-queued. The `status` will be `"pending"` and `attempts` will be reset to `0`. Fetch the event again after a moment to confirm delivery progress.
