resources/webhooks/methods/update/index.md +0 −122 deleted
File Deleted View Diff
1## Update Webhook Endpoint
2
3**post** `/webhook_endpoints/{webhook_endpoint_id}`
4
5Updates a webhook endpoint for the authenticated project.
6
7### Path Parameters
8
9- `webhook_endpoint_id: string`
10
11### Body Parameters
12
13- `event_types: optional array of "batch.completed" or "batch.failed" or "batch.expired" or 15 more`
14
15 The complete set of event types that should trigger deliveries.
16
17 - `"batch.completed"`
18
19 - `"batch.failed"`
20
21 - `"batch.expired"`
22
23 - `"batch.cancelled"`
24
25 - `"response.completed"`
26
27 - `"response.failed"`
28
29 - `"response.cancelled"`
30
31 - `"response.incomplete"`
32
33 - `"eval.run.succeeded"`
34
35 - `"eval.run.failed"`
36
37 - `"eval.run.canceled"`
38
39 - `"fine_tuning.job.succeeded"`
40
41 - `"fine_tuning.job.failed"`
42
43 - `"fine_tuning.job.cancelled"`
44
45 - `"realtime.call.incoming"`
46
47 - `"video.completed"`
48
49 - `"video.failed"`
50
51 - `"safety.alert.created"`
52
53- `name: optional string`
54
55 A new human-readable name for the webhook endpoint.
56
57- `url: optional string`
58
59 A new HTTPS URL that receives webhook deliveries.
60
61### Returns
62
63- `WebhookEndpoint object { id, created_at, event_types, 5 more }`
64
65 - `id: string`
66
67 The unique ID of the webhook endpoint.
68
69 - `created_at: number`
70
71 The Unix timestamp when the endpoint was created.
72
73 - `event_types: array of string`
74
75 The event types that trigger deliveries to this endpoint.
76
77 - `name: string`
78
79 The human-readable name of the endpoint.
80
81 - `object: "webhook_endpoint"`
82
83 The object type, which is always webhook_endpoint.
84
85 - `"webhook_endpoint"`
86
87 - `signing_secret_hint: string or null`
88
89 A masked hint for the endpoint's signing secret.
90
91 - `url: string`
92
93 The HTTPS URL that receives webhook deliveries.
94
95 - `updated_at: optional number`
96
97 The Unix timestamp of the last endpoint configuration or signing-secret change. Initialized at creation; tests and unchanged updates do not advance it.
98
99### Example
100
101```http
102curl https://api.openai.com/v1/webhook_endpoints/$WEBHOOK_ENDPOINT_ID \
103 -X POST \
104 -H "Authorization: Bearer $OPENAI_API_KEY"
105```
106
107#### Response
108
109```json
110{
111 "id": "id",
112 "created_at": 0,
113 "event_types": [
114 "string"
115 ],
116 "name": "name",
117 "object": "webhook_endpoint",
118 "signing_secret_hint": "signing_secret_hint",
119 "url": "url",
120 "updated_at": 0
121}
122```