Webhooks
Update an endpoint
Change an endpoint’s URL, events or note, or turn it off and on.
PATCH
https://api.sangtao.ai/v2/webhooks/{id}Authorization
X-Api-Keystring · headerrequiredYour API key, from the API keys page of your account.
Path parameters
idstringrequiredThe ID in the path.
Body
urlstringA new URL, checked as when creating
eventsstring[]Replaces the list
Available options:
*image.completedimage.failedvideo.completedvideo.failedpost.publishedpost.failedsocial_account.needs_attentiondescriptionstringUp to 200 characters
enabledbooleanfalse stops deliveries. true turns it back on, also after disabled_failing
Send only what changes. The answer is the whole endpoint.
Errors
| Status | errorCode | When |
|---|---|---|
| 404 | WEBHOOK_NOT_FOUND | No endpoint of yours with this id |
| 422 | INVALID_WEBHOOK_URL | url is not a public https URL on port 443, or carries a user or password |
| 422 | INVALID_WEBHOOK_EVENT | events is empty or has an unknown type — the allowed ones in details[0].params.allowed |
| 422 | VALIDATION_ERROR | description is over 200 characters |
PATCH
/webhooks/{id}curl -X PATCH "https://api.sangtao.ai/v2/webhooks/whk_4nP8rT2xK" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
"*"
]
}'{
"success": true,
"data": {
"id": "whk_4nP8rT2xK",
"url": "https://example.com/webhooks/sangtao",
"events": [
"*"
],
"description": "Production",
"enabled": true,
"status": "active",
"createdAt": "2026-11-10T08:00:00Z",
"lastDeliveryAt": "2026-11-10T09:43:32Z",
"lastSuccessAt": "2026-11-10T09:43:32Z",
"lastFailureAt": null
}
}PATCH
/webhooks/{id}curl -X PATCH "https://api.sangtao.ai/v2/webhooks/whk_4nP8rT2xK" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
"*"
]
}'{
"success": true,
"data": {
"id": "whk_4nP8rT2xK",
"url": "https://example.com/webhooks/sangtao",
"events": [
"*"
],
"description": "Production",
"enabled": true,
"status": "active",
"createdAt": "2026-11-10T08:00:00Z",
"lastDeliveryAt": "2026-11-10T09:43:32Z",
"lastSuccessAt": "2026-11-10T09:43:32Z",
"lastFailureAt": null
}
}