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

# Update Webhook Config

Use this API to update the webhook service configuration for a workspace. At least one of `useWebhookService` or `webhookServiceConfig` must be provided.

> [!NOTE]
>
> This endpoint uses **API-key-level auth**: pass `x-velt-api-key` and `x-velt-auth-token` as headers. You can obtain these from the [Get Auth Tokens](https://velt.dev/docs/api-reference/rest-apis/v2/workspace/authtokens-get.md) endpoint.

> [!NOTE]
>
> Currently only supported for Basic Webhooks.

> [!NOTE]
>
> **Defaults on first enable.** If you enable the service (`useWebhookService: true`) and the stored config has no `triggers` yet (defaults are seeded even if `authToken` / URLs already exist), defaults are seeded automatically: the standard `comment` triggers and all `huddle` triggers are turned on, the `crdt` and `recorder` triggers are off, and `enableDataProtection` is `false`. The opt-in `suggestion_accept` / `suggestion_reject` comment triggers stay off until you enable them explicitly. Existing non-trigger fields are preserved, and any `webhookServiceConfig` values you send in the same request are merged on top of these defaults.

> [!NOTE]
>
> The response `data` echoes the latest post-write state as `{ useWebhookService, webhookServiceConfig }` — the same shape returned by [Get Webhook Config](https://velt.dev/docs/api-reference/rest-apis/v2/workspace/webhookconfig-get.md). Fields not part of your request fall back to the existing stored values.

# Endpoint

`POST https://api.velt.dev/v2/workspace/webhookconfig/update`

# Headers

**x-velt-api-key** `string` *required*

Your API key.

**x-velt-auth-token** `string` *required*

Your [Auth Token](https://velt.dev/docs/security/auth-tokens.md).

# Body

#### Params

**data** `object` *required*

**properties**

**useWebhookService** `boolean`

Whether to enable the webhook service.

**webhookServiceConfig** `object`

Webhook service configuration object.

**properties**

**authToken** `string`

Auth token sent with each webhook request for verification.

**rawNotificationUrl** `string`

URL to receive raw (unprocessed) webhook notifications.

**processedNotificationUrl** `string`

URL to receive processed webhook notifications.

**encodeData** `boolean`

Whether to base64 encode the webhook payload.

**encryptData** `boolean`

Whether to encrypt the webhook payload.

**publicKey** `string`

Public key used for payload encryption.

**triggers** `object`

Event triggers that activate webhook notifications. Each key is an event type string and the value is a boolean to enable (`true`) or disable (`false`) that trigger. See [Webhooks](https://velt.dev/docs/webhooks/advanced.md) for the full list of event types. Common keys include:

**properties**

**comment\_annotation.add** `boolean`

Trigger when a new comment thread is created.

**comment.add** `boolean`

Trigger when a new comment is added to a thread.

**comment.update** `boolean`

Trigger when a comment is updated.

**comment.delete** `boolean`

Trigger when a comment is deleted.

**comment\_annotation.status\_change** `boolean`

Trigger when a thread's status changes (e.g., resolved).

**comment\_annotation.assign** `boolean`

Trigger when a thread is assigned to a user.

**comment\_annotation.priority\_change** `boolean`

Trigger when a thread's priority changes.

**comment\_annotation.suggestion\_accept** `boolean`

Trigger when a suggestion is accepted. Opt-in: disabled by default, enable it explicitly to receive this event.

**comment\_annotation.suggestion\_reject** `boolean`

Trigger when a suggestion is rejected. Opt-in: disabled by default, enable it explicitly to receive this event.

**comment.reaction\_add** `boolean`

Trigger when a reaction is added to a comment.

**comment.reaction\_delete** `boolean`

Trigger when a reaction is removed from a comment.

# Example Request

```JSON theme={null}
{
  "data": {
    "useWebhookService": true,
    "webhookServiceConfig": {
      "authToken": "webhook_auth_token_here",
      "rawNotificationUrl": "https://example.com/webhooks/raw",
      "processedNotificationUrl": "https://example.com/webhooks/processed"
    }
  }
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Webhook configuration updated successfully.",
    "data": {
      "useWebhookService": true,
      "webhookServiceConfig": {
        "authToken": "webhook_auth_token_here",
        "rawNotificationUrl": "https://example.com/webhooks/raw",
        "processedNotificationUrl": "https://example.com/webhooks/processed"
      }
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "Invalid webhook service configuration."
  }
}
```

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Webhook configuration updated successfully.",
    "data": {
      "useWebhookService": true,
      "webhookServiceConfig": {
        "authToken": "webhook_auth_token_here",
        "rawNotificationUrl": "https://example.com/webhooks/raw",
        "processedNotificationUrl": "https://example.com/webhooks/processed"
      }
    }
  }
}
```


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