# webhookEvents

Query

Paginate webhook events (the outbox) for the current workspace, newest first. Filter by event type. History is retained for 30 days.

Available to agents as MCP tool `getWebhookEvents` — see [Read tools](/api/v2/docs/mcp/read-tools#get-webhook-events).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `after` | `String` | No | `null` | Cursor for fetching the next page of results. |
| `filter` | [`WebhookEventFilterInput`](/api/v2/docs/types/webhook-event-filter-input) | No | `{}` | Filter criteria. Optionally narrow by event type. |
| `first` | `Int` | No | `20` | Number of events to return (page size). |

## Returns

A paginated connection of [`WebhookEvent`](/api/v2/docs/types/webhook-event) nodes. See [Pagination](/api/v2/docs/types/pagination) for the connection shape.

## Examples

### List webhook events

Paginate the outbox. Query it to recover business events whose deliveries were DROPPED or missed; an event id doubles as an idempotency key.

```graphql
query WebhookEventsDefault($filter: WebhookEventFilterInput, $first: Int) {
  webhookEvents(filter: $filter, first: $first) {
    nodes {
      id
      eventType
      eventVersion
      payload
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    totalCount
  }
}
```

Variables:

```json
{
  "filter": {
    "eventTypes": [
      "content_view.item_added"
    ]
  },
  "first": 10
}
```

Response — HTTP 200:

```json
{
  "data": {
    "webhookEvents": {
      "nodes": [
        {
          "id": "0f8e0d63-409e-5fd1-88bd-2febbe05fa53",
          "eventType": "content_view.item_added",
          "eventVersion": "1.0",
          "payload": {
            "item": {
              "id": "12dedc45-e264-5d57-91f7-4d9aa7a05849"
            },
            "view": {
              "id": "eaa824b8-374f-5db8-bee2-51dfd8c3776c"
            }
          }
        },
        {
          "id": "7f412c82-762e-5978-b0ae-bdcac334b9b5",
          "eventType": "content_view.item_added",
          "eventVersion": "1.0",
          "payload": {
            "item": {
              "id": "12dedc45-e264-5d57-91f7-4d9aa7a05849"
            },
            "view": {
              "id": "eaa824b8-374f-5db8-bee2-51dfd8c3776c"
            }
          }
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "endCursor": "Z2lkOi8vYXJjaGl2ZS9XZWJob29rRXZlbnQvMjAyNC0xMi0zMVQxNDowMDowMC4wMDAwMDBafDdmNDEyYzgyLTc2MmUtNTk3OC1iMGFlLWJkY2FjMzM0YjliNQ=="
      },
      "totalCount": 2
    }
  }
}
```
