> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velt.dev/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.

<Info>
  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](/api-reference/rest-apis/v2/workspace/authtokens-get) endpoint.
</Info>

# Endpoint

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

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="useWebhookService" type="boolean">
      Whether to enable the webhook service.
    </ParamField>

    <ParamField body="webhookServiceConfig" type="object">
      Webhook service configuration object.

      <Expandable title="properties">
        <ParamField body="authToken" type="string">
          Auth token sent with each webhook request for verification.
        </ParamField>

        <ParamField body="rawNotificationUrl" type="string">
          URL to receive raw (unprocessed) webhook notifications.
        </ParamField>

        <ParamField body="processedNotificationUrl" type="string">
          URL to receive processed webhook notifications.
        </ParamField>

        <ParamField body="encodeData" type="boolean">
          Whether to base64 encode the webhook payload.
        </ParamField>

        <ParamField body="encryptData" type="boolean">
          Whether to encrypt the webhook payload.
        </ParamField>

        <ParamField body="publicKey" type="string">
          Public key used for payload encryption.
        </ParamField>

        <ParamField body="triggers" type="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](/webhooks/advanced) for the full list of event types. Common keys include:

          <Expandable title="properties">
            <ParamField body="comment_annotation.add" type="boolean">
              Trigger when a new comment thread is created.
            </ParamField>

            <ParamField body="comment.add" type="boolean">
              Trigger when a new comment is added to a thread.
            </ParamField>

            <ParamField body="comment.update" type="boolean">
              Trigger when a comment is updated.
            </ParamField>

            <ParamField body="comment.delete" type="boolean">
              Trigger when a comment is deleted.
            </ParamField>

            <ParamField body="comment_annotation.status_change" type="boolean">
              Trigger when a thread's status changes (e.g., resolved).
            </ParamField>

            <ParamField body="comment_annotation.assign" type="boolean">
              Trigger when a thread is assigned to a user.
            </ParamField>

            <ParamField body="comment_annotation.priority_change" type="boolean">
              Trigger when a thread's priority changes.
            </ParamField>

            <ParamField body="comment.reaction_add" type="boolean">
              Trigger when a reaction is added to a comment.
            </ParamField>

            <ParamField body="comment.reaction_delete" type="boolean">
              Trigger when a reaction is removed from a comment.
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

# 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": null
  }
}
```

#### Failure Response

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

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Webhook configuration updated successfully.",
      "data": null
    }
  }
  ```
</ResponseExample>
