Skip to main content
DELETE
/
api
/
partner
/
v1
/
webhook-endpoints
/
{endpointId}
curl -sS -X DELETE https://app.opentrain.ai/api/partner/v1/webhook-endpoints/<ENDPOINT_ID> \
  -H "Authorization: Bearer $OT_PARTNER_TOKEN"
{
  "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
}
Permanently removes a webhook endpoint. Pending deliveries are discarded. Deleting and re-creating 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 instead. Requirements: webhooks:manage scope.

Request

endpointId
string
required
The webhook endpoint ID to remove.

Response

webhookEndpoint
object
Final snapshot of the removed endpoint: {id, url, eventTypes, status, createdAt, consecutiveFailures, disabledAt, disabledReason}.
deleted
boolean
Always true on success.

Errors

StatuscodeMeaning
401UNAUTHORIZEDMissing, invalid, or revoked token
403FORBIDDENToken lacks webhooks:manage
404NOT_FOUNDNo endpoint with this ID on this install
curl -sS -X DELETE https://app.opentrain.ai/api/partner/v1/webhook-endpoints/<ENDPOINT_ID> \
  -H "Authorization: Bearer $OT_PARTNER_TOKEN"
{
  "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
}