Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete Webhook Endpoint

webhooks.delete(strwebhook_endpoint_id) -> DeletedWebhookEndpoint
DELETE/webhook_endpoints/{webhook_endpoint_id}

Deletes a webhook endpoint for the authenticated project.

ParametersExpand Collapse
webhook_endpoint_id: str
ReturnsExpand Collapse
class DeletedWebhookEndpoint:
id: str

The ID of the deleted webhook endpoint.

deleted: bool

Whether the endpoint was deleted.

object: Literal["webhook_endpoint.deleted"]

The object type, which is always webhook_endpoint.deleted.

Delete Webhook Endpoint

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
deleted_webhook_endpoint = client.webhooks.delete(
    "whe_123",
)
print(deleted_webhook_endpoint.id)
{
  "id": "id",
  "deleted": true,
  "object": "webhook_endpoint.deleted"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "webhook_endpoint.deleted"
}