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

# Delete Advanced Webhook Endpoint

Use this API to delete a webhook delivery endpoint from a workspace.

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

<Note>
  Deletion is permanent. The endpoint immediately stops receiving webhook deliveries and its signing secret is invalidated.
</Note>

# Endpoint

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

# 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 to delete (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 deleted successfully.",
    "data": {
      "endpointId": "ep_2vK9mPzGqLxYwBnRtCdHsJfAeUo",
      "deleted": true
    }
  }
}
```

#### 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 deleted successfully.",
      "data": {
        "endpointId": "ep_2vK9mPzGqLxYwBnRtCdHsJfAeUo",
        "deleted": true
      }
    }
  }
  ```
</ResponseExample>
