sangtao.ai
API key

Webhooks

Send a test event

Send a test event now and see what your URL answered.

POSThttps://api.sangtao.ai/v2/webhooks/{id}/test

Authorization

  • X-Api-Keystring · headerrequired

    Your API key, from the API keys page of your account.

Path parameters

  • idstringrequired

    The 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

  • deliveryIdstringrequired

    The delivery, dlv_…

  • eventIdstringrequired

    The event, evt_… — the id in the body sent

  • statusstringrequired

    pending: it failed and will be retried on the schedule

    Available options:succeededpendingfailed

  • httpStatusnumber | null

    What your URL answered. null when it could not be reached

  • durationMsnumberrequired

    How long it took

  • errorstring | null

    Why it failed

Errors

StatuserrorCodeWhen
404WEBHOOK_NOT_FOUNDNo endpoint of yours with this id
409WEBHOOK_DISABLEDThe endpoint is turned off — PATCH enabled: true first
POST/webhooks/{id}/test
curl -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
  }
}