SpyBara
Go Premium

resources/webhooks/methods/test/index.md 2026-10-29 23:59 UTC to 2026-10-30 23:59 UTC

This page contains 2 additions and 0 deletions.

2026
Wed 28 23:00 Thu 29 23:59 Fri 30 23:59

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

Test Webhook Endpoint

post /webhook_endpoints/{webhook_endpoint_id}/test

Sends a sample event to a webhook endpoint for the authenticated project.

Path Parameters

  • webhook_endpoint_id: string

    The ID of the webhook endpoint to test.

Body Parameters

Content type: application/json

  • event_type: "batch.completed" or "batch.failed" or "batch.expired" or 24 more

    The event type to send as a sample delivery.

    • "batch.completed"

    • "batch.failed"

    • "batch.expired"

    • "batch.cancelled"

    • "response.completed"

    • "response.failed"

    • "response.cancelled"

    • "response.incomplete"

    • "eval.run.succeeded"

    • "eval.run.failed"

    • "eval.run.canceled"

    • "fine_tuning.job.succeeded"

    • "fine_tuning.job.failed"

    • "fine_tuning.job.cancelled"

    • "realtime.call.incoming"

    • "video.completed"

    • "video.failed"

    • "agent.environment.ready"

    • "agent.environment.failed"

    • "agent.environment.suspended"

    • "agent.environment.expired"

    • "agent.session.created"

    • "agent.session.action_required"

    • "agent.session.in_progress"

    • "agent.session.idle"

    • "agent.session.failed"

    • "safety.alert.created"

Returns

  • WebhookEndpointTestResult object { event_type, object, status_code, 2 more }

    • event_type: string

      The event type sent in the test.

    • object: "webhook_endpoint.test" (default: "webhook_endpoint.test")

      The object type, which is always webhook_endpoint.test.

      • "webhook_endpoint.test"
    • status_code: integer

      The HTTP status code returned by the endpoint.

    • success: true (default: true)

      Whether the test request completed. Always true for returned results; use status_code to determine the endpoint response.

      • true
    • webhook_endpoint_id: string

      The ID of the webhook endpoint that received the test.

Example

curl https://api.openai.com/v1/webhook_endpoints/$WEBHOOK_ENDPOINT_ID/test \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -d '{
          "event_type": "batch.completed"
        }'

200 — Example

{
  "event_type": "event_type",
  "object": "webhook_endpoint.test",
  "status_code": 0,
  "success": true,
  "webhook_endpoint_id": "webhook_endpoint_id"
}