Webhooks
Get an endpoint
One endpoint and when it was last delivered to.
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.
Response
idstringrequiredThe endpoint’s id, whk_…
urlstringrequiredWhere events are sent
eventsstring[]requiredThe event types it gets. ["*"] is all of them
descriptionstring | nullYour note
enabledbooleanrequiredWhether events are sent to it
statusstringrequireddisabled_failing: turned off after 3 days of failed deliveries
Available options:
activedisableddisabled_failingcreatedAtstringrequiredWhen it was created (ISO 8601, UTC). It only gets events from then on
lastDeliveryAtstring | nullLast attempt to deliver to it
lastSuccessAtstring | nullLast delivery it answered with 2xx
lastFailureAtstring | nullLast failed attempt
Errors
| Status | errorCode | When |
|---|---|---|
| 404 | WEBHOOK_NOT_FOUND | No endpoint of yours with this id |
/webhooks/{id}curl "https://api.sangtao.ai/v2/webhooks/whk_4nP8rT2xK" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": {
"id": "whk_4nP8rT2xK",
"url": "https://example.com/webhooks/sangtao",
"events": [
"image.completed",
"image.failed"
],
"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
}
}/webhooks/{id}curl "https://api.sangtao.ai/v2/webhooks/whk_4nP8rT2xK" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": {
"id": "whk_4nP8rT2xK",
"url": "https://example.com/webhooks/sangtao",
"events": [
"image.completed",
"image.failed"
],
"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
}
}