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

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

<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.
</Warning>

# Endpoint

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

# 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="endpointId" type="string" required>
      The ID of the endpoint whose signing secret to retrieve (returned by the create and list endpoints).
    </ParamField>
  </Expandable>
</ParamField>

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

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