Getting started
Send Stafett a job and an HTTPS callback URL. Stafett stores the job, delivers the payload to your endpoint, and handles retries and dead-lettering.
Enqueue a job
Use the stf_ bearer token issued for your account:
curl -X POST https://api.stafett.dev/enqueue \
-H 'Authorization: Bearer stf_…' \
-H 'Content-Type: application/json' \
-d '{
"callback_url": "https://api.example.com/hooks/ship",
"payload": {"order": 42}
}'
Stafett returns 202 Accepted immediately:
{
"id": "018f3b7c-6c4a-7b32-9f21-2c0a5e4d9b11",
"status": "queued",
"status_url": "/jobs/018f3b7c-6c4a-7b32-9f21-2c0a5e4d9b11"
}
The request schedules delivery; it does not wait for your callback to finish.
Check the result
Poll the returned status URL with the same bearer token:
curl https://api.stafett.dev/jobs/018f3b7c-6c4a-7b32-9f21-2c0a5e4d9b11 \
-H 'Authorization: Bearer stf_…'
The status moves through queued, delivering, retrying, delivered, or
dead.
Receive the callback
Stafett POSTs the JSON payload to the callback URL you supplied. Every delivery
includes the Standard Webhooks webhook-id, webhook-timestamp, and
webhook-signature headers. Verify the signature with a Standard
Webhooks-compatible library before processing the body.
Delivery is at-least-once. The same job may arrive more than once, so make your
handler idempotent. The stable webhook-id is the Stafett job ID and is the
recommended idempotency key.
See the API reference for fields, limits, and retry behavior, or try the interactive OpenAPI explorer.