Test Webhook Endpoint
webhooks.test_(webhook_endpoint_id, **kwargs) -> WebhookEndpointTestResult { event_type, object, status_code, 2 more }
POST/webhook_endpoints/{webhook_endpoint_id}/test
Sends a sample event to a webhook endpoint for the authenticated project.
Test Webhook Endpoint
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
webhook_endpoint_test_result = openai.webhooks.test_("whe_123", event_type: :"batch.completed")
puts(webhook_endpoint_test_result){
"event_type": "event_type",
"object": "webhook_endpoint.test",
"status_code": 0,
"success": true,
"webhook_endpoint_id": "webhook_endpoint_id"
}Returns Examples
{
"event_type": "event_type",
"object": "webhook_endpoint.test",
"status_code": 0,
"success": true,
"webhook_endpoint_id": "webhook_endpoint_id"
}