> ## 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.

# Webhook

> A webhook subscription owned by an API key, returned by getWebhooks.

### TypeScript shape

```ts theme={null}
interface Webhook {
  id: string;
  webhookType: WebhookType;
  name: string;
  created: number;
  alertRecurrence: AlertRecurrence;
  callbackUrl: string;
  status: string;
  groupId: string | null;
  conditions: WebhookCondition;
  retrySettings: RetrySettings | null;
  bucketId: string | null;
  bucketSortkey: string | null;
  publishingType: PublishingType | null;
}
```

<ResponseField name="id" type="String!">Webhook id (UUID).</ResponseField>

<ResponseField name="webhookType" type="WebhookType!">
  Webhook category. See [WebhookType](/api-reference/graphql/types/WebhookType).

  <Expandable title="View values (WebhookType)">
    <ResponseField name="TOKEN_PAIR_EVENT" type="enum">Pair-level events (swap / mint / burn).</ResponseField>
    <ResponseField name="TOKEN_PRICE_EVENT" type="enum">Token-price threshold events.</ResponseField>
    <ResponseField name="MARKET_CAP_EVENT" type="enum">Market-cap threshold events.</ResponseField>
    <ResponseField name="TOKEN_TRANSFER_EVENT" type="enum">Token-transfer events.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="name" type="String!">User-supplied webhook name.</ResponseField>

<ResponseField name="created" type="Int!">Creation timestamp (unix seconds).</ResponseField>

<ResponseField name="alertRecurrence" type="AlertRecurrence!">
  Whether the webhook fires once or indefinitely. See [AlertRecurrence](/api-reference/graphql/types/AlertRecurrence).

  <Expandable title="View values (AlertRecurrence)">
    <ResponseField name="INDEFINITE" type="enum">Fires every time conditions match.</ResponseField>
    <ResponseField name="ONCE" type="enum">Fires once and is then disabled.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="callbackUrl" type="String!">Destination URL for delivery.</ResponseField>

<ResponseField name="status" type="String!">Webhook status (e.g. `active`).</ResponseField>

<ResponseField name="conditions" type="WebhookCondition!">
  Match conditions. Union — discriminate via `__typename`. See [WebhookCondition](/api-reference/graphql/types/WebhookCondition).

  <Expandable title="View variants (WebhookCondition)">
    <ResponseField name="TokenPairEventWebhookCondition" type="object">
      Pair-level event conditions. See [TokenPairEventWebhookCondition](/api-reference/graphql/types/TokenPairEventWebhookCondition).
    </ResponseField>

    <ResponseField name="TokenPriceEventWebhookCondition" type="object">
      Token-price threshold conditions. See [TokenPriceEventWebhookCondition](/api-reference/graphql/types/TokenPriceEventWebhookCondition).
    </ResponseField>

    <ResponseField name="MarketCapEventWebhookCondition" type="object">
      Market-cap threshold conditions. See [MarketCapEventWebhookCondition](/api-reference/graphql/types/MarketCapEventWebhookCondition).
    </ResponseField>

    <ResponseField name="TokenTransferEventWebhookCondition" type="object">
      Token-transfer conditions. See [TokenTransferEventWebhookCondition](/api-reference/graphql/types/TokenTransferEventWebhookCondition).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="retrySettings" type="RetrySettings">
  Optional retry policy. See [RetrySettings](/api-reference/graphql/types/RetrySettings).

  <Expandable title="View fields (RetrySettings)">
    <ResponseField name="maxTimeElapsed" type="Int">Max delivery window (seconds).</ResponseField>
    <ResponseField name="minRetryDelay" type="Int">Minimum delay between retries (seconds).</ResponseField>
    <ResponseField name="maxRetryDelay" type="Int">Maximum delay between retries (seconds).</ResponseField>
    <ResponseField name="maxRetries" type="Int">Maximum number of retry attempts.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="bucketKey" type="BucketKey">
  Optional bucket grouping for batched delivery. See [BucketKey](/api-reference/graphql/types/BucketKey).

  <Expandable title="View fields (BucketKey)">
    <ResponseField name="bucketId" type="String!">Bucket identifier.</ResponseField>
    <ResponseField name="bucketSortKey" type="String!">Sort key within the bucket.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="publishingType" type="PublishingType">
  How matched events are published. See [PublishingType](/api-reference/graphql/types/PublishingType).

  <Expandable title="View values (PublishingType)">
    <ResponseField name="BATCH" type="enum">Events delivered in batches.</ResponseField>
    <ResponseField name="SINGLE" type="enum">Each event delivered individually.</ResponseField>
  </Expandable>
</ResponseField>

<Warning>
  The following fields are deprecated — use `bucketKey` instead. They remain in the schema for backwards compatibility and may be removed in a future version.
</Warning>

<ResponseField name="bucketId" type="String" deprecated>Deprecated — use [`bucketKey`](/api-reference/graphql/types/BucketKey) instead.</ResponseField>
<ResponseField name="bucketSortkey" type="String" deprecated>Deprecated — use [`bucketKey`](/api-reference/graphql/types/BucketKey) instead.</ResponseField>
<ResponseField name="groupId" type="String" deprecated>Deprecated — use [`bucketKey`](/api-reference/graphql/types/BucketKey) instead.</ResponseField>
