Create Webhook Endpoint
webhooks.create(WebhookCreateParams**kwargs) -> WebhookEndpointWithSecret
POST/webhook_endpoints
Creates a webhook endpoint for the authenticated project.
Create 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
)
webhook_endpoint_with_secret = client.webhooks.create(
event_types=["batch.completed"],
name="x",
url="https://",
)
print(webhook_endpoint_with_secret.id){
"id": "id",
"created_at": 0,
"event_types": [
"string"
],
"name": "name",
"object": "webhook_endpoint",
"signing_secret": "signing_secret",
"signing_secret_hint": "signing_secret_hint",
"url": "url",
"updated_at": 0
}Returns Examples
{
"id": "id",
"created_at": 0,
"event_types": [
"string"
],
"name": "name",
"object": "webhook_endpoint",
"signing_secret": "signing_secret",
"signing_secret_hint": "signing_secret_hint",
"url": "url",
"updated_at": 0
}