Skip to main content
GET
/
hooks
List Hooks
curl --request GET \
  --url https://api.posthook.io/v1/hooks \
  --header 'X-API-Key: <api-key>'
{
  "data": [
    {
      "id": "<string>",
      "path": "<string>",
      "domain": "<string>",
      "data": {},
      "postAt": "2023-11-07T05:31:56Z",
      "status": "pending",
      "postDurationSeconds": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "attempts": 123,
      "failureError": "<string>",
      "tryAt": "2023-11-07T05:31:56Z",
      "wasNotified": true,
      "sequenceData": {
        "sequenceID": "<string>",
        "stepName": "<string>",
        "sequenceLastRunAt": "2023-11-07T05:31:56Z"
      }
    }
  ],
  "meta": {
    "totalItems": 123
  }
}
List your webhooks with cursor-based pagination.

Cursor-Based Pagination

Results are paginated using an opaque cursor. Pass the cursor from the previous response to fetch the next page. When no more results are available, no cursor is returned.
The offset parameter has been removed. Use cursor for pagination instead.

SDK Methods

LanguageSingle PageAuto-Paginate
TypeScriptposthook.hooks.list({ status, limit })posthook.hooks.listAll({ status })
Pythonclient.hooks.list(status, limit)client.hooks.list_all(status)
Goclient.Hooks.List(ctx, &HookListParams{})client.Hooks.ListAll(ctx, &HookListAllParams{})
The listAll / list_all / ListAll methods return an iterator that handles cursor pagination automatically.

Usage Patterns

Common patterns for this endpoint include:
  • Dead Letter Queue: Process failures within a specific time window.
  • Bulk Retry: Batch retry failed hooks.
  • Auditing: Reconcile Posthook delivery logs with your internal records.

Authorizations

X-API-Key
string
header
required

Query Parameters

limit
integer
default:10
cursor
string

Cursor for pagination. Use the value from the previous response to get the next page.

sortBy
enum<string>

Field to sort results by

Available options:
postAt,
createdAt
sortOrder
enum<string>

Sort direction

Available options:
asc,
desc
status
enum<string>
Available options:
pending,
completed,
failed,
retry
postAtBefore
string<date-time>

Filter hooks scheduled before this timestamp

postAtAfter
string<date-time>

Filter hooks scheduled after this timestamp

createdAtBefore
string<date-time>

Filter hooks created before this timestamp

createdAtAfter
string<date-time>

Filter hooks created after this timestamp

Response

200 - application/json

List of hooks

data
object[]
meta
object