Webhooks
Send a test event
Send a test event now and see what your URL answered.
POST
https://api.sangtao.ai/v2/webhooks/{id}/testAuthorization
X-Api-Keystring · headerrequiredYour API key, from the API keys page of your account.
Path parameters
idstringrequiredThe ID in the path.
Sends a webhook.test event to this endpoint now and answers with the result of that first attempt. A failed one is retried on the usual schedule.
Response
deliveryIdstringrequiredThe delivery, dlv_…
eventIdstringrequiredThe event, evt_… — the id in the body sent
statusstringrequiredpending: it failed and will be retried on the schedule
Available options:
succeededpendingfailedhttpStatusnumber | nullWhat your URL answered. null when it could not be reached
durationMsnumberrequiredHow long it took
errorstring | nullWhy it failed
Errors
| Status | errorCode | When |
|---|---|---|
| 404 | WEBHOOK_NOT_FOUND | No endpoint of yours with this id |
| 409 | WEBHOOK_DISABLED | The endpoint is turned off — PATCH enabled: true first |
POST
/webhooks/{id}/testcurl -X POST "https://api.sangtao.ai/v2/webhooks/whk_4nP8rT2xK/test" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": {
"deliveryId": "dlv_2Hc7wNe4F",
"eventId": "evt_1Lp6sYb3R",
"status": "succeeded",
"httpStatus": 200,
"durationMs": 182,
"error": null
}
}POST
/webhooks/{id}/testcurl -X POST "https://api.sangtao.ai/v2/webhooks/whk_4nP8rT2xK/test" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": {
"deliveryId": "dlv_2Hc7wNe4F",
"eventId": "evt_1Lp6sYb3R",
"status": "succeeded",
"httpStatus": 200,
"durationMs": 182,
"error": null
}
}