Deliveries
Deliveries
Every attempt to POST an event to an endpoint is recorded, and the history is queryable:
curl -X POST https://api.travila.ai/api/v1/webhooks/list-deliveries \
-H "X-API-Key: sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"endpoint_id": "ep_abc123",
"status": "DELIVERY_STATUS_FAILED",
"created_after": "2026-08-01T00:00:00Z",
"per_page": 50
}'
All filters are optional and combine: endpoint_id, subscription_id, event_id,
status, created_after, created_before, plus page / per_page.
| Status | Meaning |
|---|---|
DELIVERY_STATUS_SCHEDULED | Queued, not yet attempted |
DELIVERY_STATUS_PROCESSING | Attempt in flight |
DELIVERY_STATUS_SUCCESS | Your endpoint accepted it |
DELIVERY_STATUS_RETRY | Failed, will be retried automatically |
DELIVERY_STATUS_FAILED | Retries exhausted |
DELIVERY_STATUS_DISCARDED | Not attempted — e.g. the endpoint was disabled |
Retrying
RETRY deliveries are re-attempted for you. Re-queue a FAILED or DISCARDED one by hand
once you have fixed the receiving side:
curl -X POST https://api.travila.ai/api/v1/webhooks/retry-delivery \
-H "X-API-Key: sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{ "delivery_id": "del_xyz789" }'
Receiving webhooks
Write your handler to survive the real world:
- Return 2xx quickly. Acknowledge first, process afterwards. A slow handler burns the delivery attempt and earns a retry.
- Expect duplicates. Retries mean the same event can arrive more than once. Deduplicate on the event id rather than assuming exactly-once.
- Expect out-of-order arrival. A retried event can land after a newer one. Use the event's own timestamp, not receipt order.
- Fail loudly, not silently. A non-2xx marks the delivery for retry, which is what you want when your downstream is briefly unavailable.