Update an organization webhook endpoint
PATCH/api/v1/organizations/{id}/webhooks/{webhook_id}
PATCH /organizations/{id}/webhooks/{webhook_id}
curl -X PATCH 'https://www.unitpost.com/api/v1/organizations/org_123/webhooks/wh_123' \
-H 'Authorization: Bearer YOUR_ORG_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"events": [
"email.delivered"
]
}'Response · 200
{
"object": "webhook",
"id": "id_123",
"name": "Example",
"url": "https://example.com",
"events": [
"email.sent"
],
"status": "enabled",
"include_text": false,
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"backlog": {
"queued": 0,
"failed": 0
}
}Change the endpoint's url, events, name, status or include_text, as PATCH /webhooks/{id} does. Re-enabling clears its failure streak; it never delivers the backlog on its own. The signing secret never changes here. Takes an organization key (ok_live_…) with organizations:write.
Parameters2 fields
| Field | Type | Description |
|---|---|---|
idrequired | string · path | The organization's id (`org_…`), from `GET /whoami` or Organization → API. |
webhook_idrequired | string · path | The organization webhook endpoint's id (`wh_…`). |
Request body5 fields
| Field | Type | Description |
|---|---|---|
url | string | — |
events | enum | string[] | — |
name | string | — |
status | enumenabled | disabled | — |
include_text | boolean | `email.received` deliveries to this endpoint also carry the message's plain-text body as `text`, at most 64 KB (`text_truncated` says it was cut). Null for a copy of one of your own sends (`sent_by_us`), a message deleted since, or one with no plain-text part. Default false: metadata only. The text is read when each delivery is sent and is never kept with the event, so the deliveries log doesn't show it. |
Response · 200 fields10 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
namerequired | string | — |
urlrequired | string | — |
eventsrequired | enum | string[] | — |
statusrequired | enumenabled | disabled | suspended | — |
include_text | boolean | `email.received` deliveries to this endpoint also carry the message's plain-text body as `text`, at most 64 KB (`text_truncated` says it was cut). Null for a copy of one of your own sends (`sent_by_us`), a message deleted since, or one with no plain-text part. Default false: metadata only. The text is read when each delivery is sent and is never kept with the event, so the deliveries log doesn't show it. |
created_atrequired | string | — |
updated_atrequired | string | — |
backlog | object | The deliveries a flush would send. Each count stops at 10,001, which means more than 10,000. Only on `GET /webhooks/{id}`. |
200401403404409422429