> ## 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 Advanced Webhook Config

Use this API to update the advanced webhook configuration for a workspace. At least one of `isEnabled`, `encryptData`, `encodeData`, `publicKey` or `enableDataProtection` 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>

<Note>
  This endpoint is for **Advanced Webhooks**. For Basic Webhooks, use [Update Webhook Config](/api-reference/rest-apis/v2/workspace/webhookconfig-update).
</Note>

<Note>
  **First enable.** If advanced webhooks have never been configured for the workspace, the first request must include `isEnabled: true` — this provisions the underlying webhook application for your workspace. Sending only other fields before the first enable returns a `FAILED_PRECONDITION` error. After the first enable, you can manage delivery endpoints via the [endpoint management APIs](/api-reference/rest-apis/v2/workspace/advancedwebhook-endpoints-create).
</Note>

<Note>
  **Partial update.** Only the fields you send are changed; all other stored values are preserved. The response `data` echoes the latest post-write state — the same shape returned by [Get Advanced Webhook Config](/api-reference/rest-apis/v2/workspace/advancedwebhookconfig-get).
</Note>

# Endpoint

`POST https://api.velt.dev/v2/workspace/advancedwebhookconfig/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="isEnabled" type="boolean">
      Whether to enable advanced webhooks. Must be `true` on the very first configuration request.
    </ParamField>

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

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

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

    <ParamField body="enableDataProtection" type="boolean">
      Whether to enable data protection for webhook payloads.
    </ParamField>
  </Expandable>
</ParamField>

# Example Request

```JSON theme={null}
{
  "data": {
    "isEnabled": true,
    "encryptData": false,
    "encodeData": false
  }
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Advanced webhook configuration updated successfully.",
    "data": {
      "isEnabled": true,
      "encryptData": false,
      "encodeData": false,
      "publicKey": "",
      "enableDataProtection": false
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "At least one of isEnabled, encryptData, encodeData, publicKey or enableDataProtection must be provided."
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Advanced webhook configuration updated successfully.",
      "data": {
        "isEnabled": true,
        "encryptData": false,
        "encodeData": false,
        "publicKey": "",
        "enableDataProtection": false
      }
    }
  }
  ```
</ResponseExample>
