sangtao.ai
API key

Webhooks

Retry a delivery

Send a delivery’s event again.

POSThttps://api.sangtao.ai/v2/webhooks/{id}/deliveries/{deliveryId}/retry

Authorization

  • X-Api-Keystring · headerrequired

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

Path parameters

  • idstringrequired

    The ID in the path.

  • deliveryIdstringrequired

    The deliveryId in the path.

Queues the same event again, whatever the delivery’s status: a new delivery (new dlv_…), the same event id — so your deduplication still holds.

Response

  • idstringrequired

    The delivery, dlv_…

  • eventIdstringrequired

    The event, evt_… — the same on a retry

  • eventTypestringrequired

    e.g. image.completed

  • statusstringrequired

    canceled: the endpoint was deleted or turned off before it went

    Available options:pendingsucceededfailedcanceled

  • attemptCountnumberrequired

    Attempts so far

  • lastHttpStatusnumber | null

    What your URL answered last

  • lastErrorstring | null

    Why the last attempt failed

  • nextAttemptAtstring | null

    The next retry. Only while pending

  • createdAtstringrequired

    When the delivery was queued

  • completedAtstring | null

    When it ended: succeeded, failed or canceled

Answers 202, status pending.

Errors

StatuserrorCodeWhen
404WEBHOOK_NOT_FOUNDNo endpoint of yours with this id
404DELIVERY_NOT_FOUNDNo such delivery to this endpoint
409WEBHOOK_DISABLEDThe endpoint is turned off — PATCH enabled: true first
POST/webhooks/{id}/deliveries/{deliveryId}/retry
curl -X POST "https://api.sangtao.ai/v2/webhooks/whk_4nP8rT2xK/deliveries/dlv_5Vt1kRm9P/retry" \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "id": "dlv_9Rx3qTa6M",
    "eventId": "evt_8Kq2mXa7T",
    "eventType": "image.completed",
    "status": "pending",
    "attemptCount": 0,
    "lastHttpStatus": null,
    "lastError": null,
    "nextAttemptAt": "2026-11-10T10:00:00Z",
    "createdAt": "2026-11-10T10:00:00Z",
    "completedAt": null
  }
}