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

# List Hooks

> Retrieve a paginated list of hooks for the current project. Supports cursor-based pagination and filtering by status.

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.

<Note>
  The `offset` parameter has been removed. Use `cursor` for pagination instead.
</Note>

### SDK Methods

| Language   | Single Page                                 | Auto-Paginate                                     |
| ---------- | ------------------------------------------- | ------------------------------------------------- |
| TypeScript | `posthook.hooks.list({ status, limit })`    | `posthook.hooks.listAll({ status })`              |
| Python     | `client.hooks.list(status, limit)`          | `client.hooks.list_all(status)`                   |
| Go         | `client.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**](/patterns/dead-letter-queue): Process failures within a specific time window.
* [**Bulk Retry**](/patterns/dead-letter-queue#bulk-retry): Batch retry failed hooks.
* [**Auditing**](/patterns/auditing): Reconcile Posthook delivery logs with your internal records.


## OpenAPI

````yaml GET /hooks
openapi: 3.0.0
info:
  title: Posthook API
  version: 1.0.0
  description: >-
    REST API for scheduling, managing, and inspecting durable webhook
    deliveries.
servers:
  - url: https://api.posthook.io/v1
security:
  - apiKey: []
paths:
  /hooks:
    get:
      summary: List Hooks
      description: >-
        Retrieve a paginated list of hooks for the current project. Supports
        cursor-based pagination and filtering by status.
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 10
        - name: cursor
          in: query
          schema:
            type: string
          description: >-
            Cursor for pagination. Use the value from the previous response to
            get the next page.
        - name: sortBy
          in: query
          schema:
            type: string
            enum:
              - postAt
              - createdAt
          description: Field to sort results by
        - name: sortOrder
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
          description: Sort direction
        - name: status
          in: query
          schema:
            type: string
            enum:
              - pending
              - completed
              - failed
              - retry
        - name: postAtBefore
          in: query
          schema:
            type: string
            format: date-time
          description: Filter hooks scheduled before this timestamp
        - name: postAtAfter
          in: query
          schema:
            type: string
            format: date-time
          description: Filter hooks scheduled after this timestamp
        - name: createdAtBefore
          in: query
          schema:
            type: string
            format: date-time
          description: Filter hooks created before this timestamp
        - name: createdAtAfter
          in: query
          schema:
            type: string
            format: date-time
          description: Filter hooks created after this timestamp
      responses:
        '200':
          description: List of hooks
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Hook'
                  meta:
                    type: object
                    properties:
                      totalItems:
                        type: integer
                        description: Total number of hooks matching the query.
components:
  schemas:
    Hook:
      type: object
      properties:
        id:
          type: string
        path:
          type: string
        domain:
          type: string
        data:
          type: object
        postAt:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
            - retry
        postDurationSeconds:
          type: number
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        attempts:
          type: integer
        failureError:
          type: string
        tryAt:
          type: string
          format: date-time
        wasNotified:
          type: boolean
        sequenceData:
          $ref: '#/components/schemas/HookSequenceData'
    HookSequenceData:
      type: object
      properties:
        sequenceID:
          type: string
        stepName:
          type: string
        sequenceLastRunAt:
          type: string
          format: date-time
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-Key
      in: header

````