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

# getWebhooks

> List webhooks owned by the calling API key, newest first, with optional filters and keyset pagination.

### Overview

Returns webhooks created by the authenticated API key. Results are ordered newest first and paginated with an opaque `cursor`. You can narrow the listing by a single `webhookId`, by `bucketId`, by `bucketSortkey`, or by both `bucketId` + `bucketSortkey`.

Only the four supported webhook categories are returned: `TOKEN_PAIR_EVENT`, `TOKEN_PRICE_EVENT`, `MARKET_CAP_EVENT`, `TOKEN_TRANSFER_EVENT`.

<Tip>An API key is required. The query throws `UNAUTHENTICATED` if it is missing or invalid.</Tip>

### Returns

<ResponseField name="getWebhooks" type="GetWebhooksResponse!">
  See [GetWebhooksResponse](/api-reference/graphql/types/GetWebhooksResponse).
</ResponseField>

### Arguments

<ResponseField name="cursor" type="String">
  Cursor returned by a previous call to fetch the next page.
</ResponseField>

<ResponseField name="webhookId" type="String">
  Return only the webhook with this id (still scoped to the calling API key — returns empty if it belongs to another key). Mutually exclusive with `bucketId`.
</ResponseField>

<ResponseField name="bucketId" type="String">
  Return only webhooks whose `bucketKey.bucketId` matches. Mutually exclusive with `webhookId`.
</ResponseField>

<ResponseField name="bucketSortkey" type="String">
  Return only webhooks whose `bucketKey.bucketSortKey` matches. Can be combined with `bucketId` to address a single bucket entry.
</ResponseField>

<ResponseField name="limit" type="Int">
  Page size. Default `20`, clamped to `[1, 100]`.
</ResponseField>

### Example

```graphql theme={null}
query GetWebhooks {
  getWebhooks(limit: 20) {
    cursor
    items {
      id
      webhookType
      name
      created
      status
      alertRecurrence
      callbackUrl
      publishingType
      bucketKey {
        bucketId
        bucketSortKey
      }
      conditions {
        __typename
        ... on TokenPairEventWebhookCondition {
          pairAddress { eq }
          eventType { oneOf }
          swapValue { gte }
        }
        ... on TokenPriceEventWebhookCondition {
          address { eq }
          networkId { eq }
          priceUsd { gte }
        }
        ... on MarketCapEventWebhookCondition {
          tokenAddress { eq }
          networkId { eq }
          fdvMarketCapUsd { gte }
        }
        ... on TokenTransferEventWebhookCondition {
          tokenAddress { eq }
          address { eq }
          direction { oneOf }
        }
      }
    }
  }
}
```

#### Paginating

```graphql theme={null}
query NextPage($cursor: String!) {
  getWebhooks(limit: 50, cursor: $cursor) {
    cursor
    items { id name created }
  }
}
```

#### Look up one webhook

```graphql theme={null}
query OneWebhook($id: String!) {
  getWebhooks(webhookId: $id) {
    items { id name webhookType status }
  }
}
```

#### Filter by bucket

```graphql theme={null}
query Bucket($bucketId: String!) {
  getWebhooks(bucketId: $bucketId) {
    items { id name bucketKey { bucketId bucketSortKey } }
  }
}
```
