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

Webhooks

Create Webhook Endpoint
client.webhooks.create(WebhookCreateParams { event_types, name, url } body, RequestOptionsoptions?): WebhookEndpointWithSecret { id, created_at, event_types, 6 more }
POST/webhook_endpoints
Delete Webhook Endpoint
client.webhooks.delete(stringwebhookEndpointID, RequestOptionsoptions?): DeletedWebhookEndpoint { id, deleted, object }
DELETE/webhook_endpoints/{webhook_endpoint_id}
List Webhook Endpoints
client.webhooks.list(WebhookListParams { after, limit } query?, RequestOptionsoptions?): CursorPage<WebhookEndpoint { id, created_at, event_types, 5 more } >
GET/webhook_endpoints
Retrieve Webhook Endpoint
client.webhooks.retrieve(stringwebhookEndpointID, RequestOptionsoptions?): WebhookEndpoint { id, created_at, event_types, 5 more }
GET/webhook_endpoints/{webhook_endpoint_id}
Rotate Webhook Endpoint Signing Secret
client.webhooks.rotateSecret(stringwebhookEndpointID, WebhookRotateSecretParams { keep_old_secret_active_for_24_hours } body?, RequestOptionsoptions?): WebhookEndpointWithSecret { id, created_at, event_types, 6 more }
POST/webhook_endpoints/{webhook_endpoint_id}/rotate_secret
Test Webhook Endpoint
client.webhooks.test(stringwebhookEndpointID, WebhookTestParams { event_type } body, RequestOptionsoptions?): WebhookEndpointTestResult { event_type, object, status_code, 2 more }
POST/webhook_endpoints/{webhook_endpoint_id}/test
Unwrap
client.webhooks.unwrap(RequestOptionsoptions?): void
Function
Update Webhook Endpoint
client.webhooks.update(stringwebhookEndpointID, WebhookUpdateParams { event_types, name, url } body?, RequestOptionsoptions?): WebhookEndpoint { id, created_at, event_types, 5 more }
POST/webhook_endpoints/{webhook_endpoint_id}
ModelsExpand Collapse
AgentEnvironmentExpiredWebhookEvent { id, created_at, data, 2 more }

Sent when an agent environment expires and can no longer resume from a snapshot.

AgentEnvironmentFailedWebhookEvent { id, created_at, data, 2 more }

Sent when setup fails for a prewarmed OpenAI-hosted environment before it is attached to a session.

AgentEnvironmentReadyWebhookEvent { id, created_at, data, 2 more }

Sent when a prewarmed OpenAI-hosted environment finishes setup before being attached to a session.

AgentEnvironmentSuspendedWebhookEvent { id, created_at, data, 2 more }

Sent when an agent environment is suspended and can resume from a snapshot.

AgentSessionActionRequiredWebhookEvent { id, created_at, data, 2 more }

Sent when an agent session requires an action. Retrieve the session for action details.

AgentSessionCreatedWebhookEvent { id, created_at, data, 2 more }

Sent when an agent session is created.

AgentSessionFailedWebhookEvent { id, created_at, data, 2 more }

Sent when an agent session fails.

AgentSessionIdleWebhookEvent { id, created_at, data, 2 more }

Sent when an agent session becomes idle.

AgentSessionInProgressWebhookEvent { id, created_at, data, 2 more }

Sent when an agent session enters the in-progress state.

BatchCancelledWebhookEvent { id, created_at, data, 2 more }

Sent when a batch API request has been cancelled.

BatchCompletedWebhookEvent { id, created_at, data, 2 more }

Sent when a batch API request has been completed.

BatchExpiredWebhookEvent { id, created_at, data, 2 more }

Sent when a batch API request has expired.

BatchFailedWebhookEvent { id, created_at, data, 2 more }

Sent when a batch API request has failed.

DeletedWebhookEndpoint { id, deleted, object }
EvalRunCanceledWebhookEvent { id, created_at, data, 2 more }

Sent when an eval run has been canceled.

EvalRunFailedWebhookEvent { id, created_at, data, 2 more }

Sent when an eval run has failed.

EvalRunSucceededWebhookEvent { id, created_at, data, 2 more }

Sent when an eval run has succeeded.

FineTuningJobCancelledWebhookEvent { id, created_at, data, 2 more }

Sent when a fine-tuning job has been cancelled.

FineTuningJobFailedWebhookEvent { id, created_at, data, 2 more }

Sent when a fine-tuning job has failed.

FineTuningJobSucceededWebhookEvent { id, created_at, data, 2 more }

Sent when a fine-tuning job has succeeded.

LiveCallIncomingWebhookEvent { id, created_at, data, 2 more }

Deprecated: use live.transport.incoming. Retained for existing subscriptions during migration; new subscriptions to this event are not allowed. Sent when an incoming API SIP session is available for Live acceptance. The same pending session can also emit realtime.call.incoming; the first successful Realtime or Live accept endpoint selects the runtime surface.

LiveTransportIncomingWebhookEvent { id, created_at, data, 2 more }

Sent when an incoming API SIP session is available for Live acceptance. The same pending session can also emit realtime.call.incoming; the first successful Realtime or Live accept endpoint selects the runtime surface.

RealtimeCallIncomingWebhookEvent { id, created_at, data, 2 more }

Sent when an incoming API SIP session is available for Realtime acceptance. The same pending session can also emit live.transport.incoming; the first successful Realtime or Live accept endpoint selects the runtime surface.

ResponseCancelledWebhookEvent { id, created_at, data, 2 more }

Sent when a background response has been cancelled.

ResponseCompletedWebhookEvent { id, created_at, data, 2 more }

Sent when a background response has been completed.

ResponseFailedWebhookEvent { id, created_at, data, 2 more }

Sent when a background response has failed.

ResponseIncompleteWebhookEvent { id, created_at, data, 2 more }

Sent when a background response has been interrupted.

SafetyAlertCreatedWebhookEvent { id, created_at, data, 2 more }

Sent when an approved safety alert is available for an API project.

SafetyDeactivationIssuedWebhookEvent { id, created_at, data, 2 more }

Sent when a deactivation is issued for a safety identifier in your organization.

SafetyOrgAlertCreatedWebhookEvent { id, created_at, data, 2 more }

Sent when an approved safety alert is available for an enterprise workspace.

SafetyWarningIssuedWebhookEvent { id, created_at, data, 2 more }

Sent when a warning is issued for a safety identifier in your organization.

WebhookEndpoint { id, created_at, event_types, 5 more }
WebhookEndpointList { data, first_id, has_more, 2 more }
WebhookEndpointTestResult { event_type, object, status_code, 2 more }
WebhookEndpointWithSecret { id, created_at, event_types, 6 more }
WebhookEventTypeList { data, object }

WebhooksEvent Types

List Webhook Event Types
client.webhooks.eventTypes.list(RequestOptionsoptions?): WebhookEventTypeList { data, object }
GET/webhook_event_types