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

# webhook

> Gets a webhook by its global id. Fails with a top-level `NotFoundError` if there's none, or if the id belongs to another type of event destination.



**query** `webhook(id: ID!): Webhook!`

## Arguments

**`id`**: `ID!` (required)

Global id of the webhook: base64 of `Webhook:<id>`, where `<id>` is `Webhook.id`.

## Returns

`Webhook!`

**`createdAt`**: `DateTime!`

When the webhook was created (UTC).

---

**`destinationType`**: `EventDestinationType!`

Kind of event destination; `WEBHOOK` for a webhook.

---

**`endpoint`**: `String!`

HTTPS URL the events are POSTed to.

---

**`filter`**: `String!`

Which events are delivered, in the syntax `CreateWebhookInput.filter` describes. Stored normalized, e.g. `(type eq "source.updated" and sourceId eq "products")`.

---

**`filterDialectVersion`**: `Int!`

Version of the filter syntax. Currently always 1.

---

**`id`**: `UUID!`

Raw id of the webhook (UUID). `webhook` and the webhook mutations take its global form, base64 of `Webhook:<id>`; `rotateWebhookSecret` takes base64 of `EventDestination:<id>`.

---

**`name`**: `String!`

Name of the webhook, 1 to 200 characters.

---

**`startsAfterSequence`**: `String`

Position in the tenant's event stream that delivery started after: only later events are delivered. Same format as the CloudEvent `sequence` (e.g. `001.00000000000000012345`). Null while the webhook waits for verification.

---

**`status`**: `WebhookStatus!`

Lifecycle state of the webhook. See `WebhookStatus`.

---

**`updatedAt`**: `DateTime!`

When the webhook last changed (UTC), status changes Occtoo makes itself included.

## Examples

```graphql Query
query Webhook($id: ID!) {
  webhook(id: $id) {
    createdAt
    destinationType
    endpoint
    filter
    filterDialectVersion
    id
  }
}
```

```json Variables
{
  "id": "id"
}
```

```json Response
{
  "data": {
    "webhook": {
      "createdAt": "value",
      "destinationType": "WEBHOOK",
      "endpoint": "string",
      "filter": "string",
      "filterDialectVersion": 1,
      "id": "value"
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.