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
Theme

Delete Webhook Endpoint

client.Webhooks.Delete(ctx, webhookEndpointID) (*DeletedWebhookEndpoint, error)
DELETE
/webhook_endpoints/{webhook_endpoint_id}

Deletes a webhook endpoint for the authenticated project.

Parameters
webhookEndpointID string
Returns
type DeletedWebhookEndpoint struct{…}
ID string

The ID of the deleted webhook endpoint.

Deleted bool

Whether the endpoint was deleted.

Object WebhookEndpointDeleted

The object type, which is always webhook_endpoint.deleted.

Delete Webhook Endpoint

package main

import (
  "context"
  "fmt"

  "github.com/openai/openai-go"
  "github.com/openai/openai-go/option"
)

func main() {
  client := openai.NewClient(
    option.WithAPIKey("My API Key"),
  )
  deletedWebhookEndpoint, err := client.Webhooks.Delete(context.TODO(), "whe_123")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", deletedWebhookEndpoint.ID)
}
200 — Example
{
  "id": "id",
  "deleted": true,
  "object": "webhook_endpoint.deleted"
}
Returns Examples
200 — Example
{
  "id": "id",
  "deleted": true,
  "object": "webhook_endpoint.deleted"
}