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

# Get Advanced Webhook Endpoint Secret

Use this API to retrieve the signing secret for a webhook delivery endpoint. Use the secret to verify the signature of webhook payloads delivered to your endpoint.

> [!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]
>
> Advanced webhooks must be enabled for the workspace first via [Update Advanced Webhook Config](https://velt.dev/docs/api-reference/rest-apis/v2/workspace/advancedwebhookconfig-update.md) with `{ "isEnabled": true }`. Otherwise this endpoint returns a `FAILED_PRECONDITION` error.

> [!WARNING]
>
> The signing secret grants the ability to forge webhook payloads that pass signature verification. Store it securely (e.g. in a secrets manager) and never expose it in client-side code.

# Endpoint

`POST https://api.velt.dev/v2/workspace/advancedwebhook/endpoints/secret/get`

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

**endpointId** `string` *required*

The ID of the endpoint whose signing secret to retrieve (returned by the create and list endpoints).

# Example Request

```JSON theme={null}
{
  "data": {
    "endpointId": "ep_2vK9mPzGqLxYwBnRtCdHsJfAeUo"
  }
}
```

# Example Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Advanced webhook endpoint secret retrieved successfully.",
    "data": {
      "endpointId": "ep_2vK9mPzGqLxYwBnRtCdHsJfAeUo",
      "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "status": "NOT_FOUND",
    "message": "Advanced webhook provider request failed."
  }
}
```

#### Failure Response (advanced webhooks disabled)

```JSON theme={null}
{
  "error": {
    "status": "FAILED_PRECONDITION",
    "message": "Advanced webhooks are disabled for this workspace. Enable them via POST /v2/workspace/advancedwebhookconfig/update with { \"isEnabled\": true }."
  }
}
```

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Advanced webhook endpoint secret retrieved successfully.",
    "data": {
      "endpointId": "ep_2vK9mPzGqLxYwBnRtCdHsJfAeUo",
      "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
    }
  }
}
```


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