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

# createWebhook

> Creates a webhook in `PENDING_VERIFICATION` and returns it with its signing secret, which is shown only here. Call `verifyWebhook` to start delivery. Fails with a top-level `ValidationError` for an invalid name, endpoint or filter.



**mutation** `createWebhook(input: CreateWebhookInput!): CreateWebhookPayload!`

## Arguments

**`input`**: `CreateWebhookInput!` (required)

## Returns

`CreateWebhookPayload!`

**`createdWebhook`**: `CreatedWebhook`

## Examples

```graphql Mutation
mutation CreateWebhook($input: CreateWebhookInput!) {
  createWebhook(input: $input) {
    createdWebhook {
      signingSecret
      webhook {
        createdAt
        destinationType
        endpoint
        filter
        filterDialectVersion
        id
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "endpoint": "string",
    "filter": "string",
    "name": "string"
  }
}
```

```json Response
{
  "data": {
    "createWebhook": {
      "createdWebhook": {
        "signingSecret": "string",
        "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.