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

# updateWebhook

> Replaces the name, endpoint and filter of a webhook. A new endpoint cancels pending deliveries and sends the webhook back to `PENDING_VERIFICATION`; verify it again. Fails with a top-level `NotFoundError` or `ValidationError`.



**mutation** `updateWebhook(id: ID!, input: UpdateWebhookInput!): UpdateWebhookPayload!`

## Arguments

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

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

---

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

## Returns

`UpdateWebhookPayload!`

**`webhook`**: `Webhook`

## Examples

```graphql Mutation
mutation UpdateWebhook($id: ID!, $input: UpdateWebhookInput!) {
  updateWebhook(id: $id, input: $input) {
    webhook {
      createdAt
      destinationType
      endpoint
      filter
      filterDialectVersion
      id
    }
  }
}
```

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

```json Response
{
  "data": {
    "updateWebhook": {
      "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.