> ## Documentation Index
> Fetch the complete documentation index at: https://opentrain.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Webhook Endpoint

> Permanently remove a webhook endpoint. Pending deliveries are discarded.

Permanently removes a [webhook endpoint](/docs/developers/annotation-platforms/webhooks). Pending deliveries are discarded. Deleting and [re-creating](/docs/developers/annotation-platforms/api-reference/webhook-endpoints/create) is also how you rotate the signing secret — the new endpoint gets a new one.

If you only want to pause delivery, [set `status` to `DISABLED`](/docs/developers/annotation-platforms/api-reference/webhook-endpoints/update) instead.

**Requirements:** `webhooks:manage` scope.

## Request

<ParamField path="endpointId" type="string" required>
  The webhook endpoint ID to remove.
</ParamField>

## Response

<ResponseField name="webhookEndpoint" type="object">
  Final snapshot of the removed endpoint: `{id, url, eventTypes, status, createdAt, consecutiveFailures, disabledAt, disabledReason}`.
</ResponseField>

<ResponseField name="deleted" type="boolean">
  Always `true` on success.
</ResponseField>

## Errors

| Status | `code`         | Meaning                                  |
| ------ | -------------- | ---------------------------------------- |
| `401`  | `UNAUTHORIZED` | Missing, invalid, or revoked token       |
| `403`  | `FORBIDDEN`    | Token lacks `webhooks:manage`            |
| `404`  | `NOT_FOUND`    | No endpoint with this ID on this install |

<RequestExample>
  ```bash curl theme={null}
  curl -sS -X DELETE https://app.opentrain.ai/api/partner/v1/webhook-endpoints/<ENDPOINT_ID> \
    -H "Authorization: Bearer $OT_PARTNER_TOKEN"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "webhookEndpoint": {
      "id": "<ENDPOINT_ID>",
      "url": "https://your-platform.example.com/webhooks/opentrain",
      "eventTypes": ["contract.started", "contract.ended"],
      "status": "ACTIVE",
      "createdAt": "2026-06-12T10:00:00.000Z",
      "consecutiveFailures": 0,
      "disabledAt": null,
      "disabledReason": null
    },
    "deleted": true
  }
  ```
</ResponseExample>
