ferrybox/docs

Create a job

POST https://api.ferrybox.example/v2/jobs

Adds a job to a queue. Ferrybox calls url with payload at run_at, or right away, and retries according to the queue’s policy unless you pass retry.

Scope
jobs:write
Idempotent
With Idempotency-Key
Since
v2.0 · retry.max_delay in v2.4

Headers

Authorizationrequired
Bearer fbx_live_… with the jobs:write scope.
Idempotency-Keyoptional
Up to 255 characters. Repeats within 24 hours return the original job instead of creating a new one.
Ferrybox-Versionoptional
Pin a dated API version, for example 2026-09-01. Defaults to your workspace setting.

Body parameters

Body parameters for POST /v2/jobs
ParameterDescription
queuestringrequired Name of the queue. The queue’s defaults apply unless overridden below.
urlstringrequired HTTPS URL that Ferrybox calls. Must resolve to a public address.
payloadobject JSON sent as the request body. Up to 256 KB after encoding.
methodstring POST (default), PUT, or PATCH.
headersobject Extra headers sent to your handler. Up to 20 entries. Authorization is allowed.
run_attimestamp RFC 3339 time for the first attempt. Up to 365 days ahead. Mutually exclusive with delay.
delayduration Wait before the first attempt, for example 90s or 2h.
timeoutduration Per-attempt timeout. Default from the queue, maximum 15m.
retry.max_attemptsinteger 1–25. Includes the first attempt. Default 8.
retry.backoffstring exponential (default), linear, or fixed.
retry.initial_delayduration Delay before attempt 2. Default 10s.
retry.max_delayduration Cap for any single delay. Default 1h. Added in v2.4.
tagsstring[] Up to 10 labels for filtering in the dashboard and in GET /v2/jobs.

Returns

201 with the job object. If the Idempotency-Key matches an earlier request with the same body, you get 200 and the original job. The status is queued when the job can run now, or scheduled when run_at or delay puts it in the future.

Errors

Errors return a JSON body with error.type, a readable message, and a doc_url. Branch on type, not on the message.

Error codes for POST /v2/jobs
StatusTypeCause
400invalid_requestBody is not valid JSON, or a field has the wrong type.
401unauthorizedMissing or revoked API key.
403missing_scopeKey does not have jobs:write.
404queue_not_foundNo queue with that name in this workspace.
409idempotency_conflictSame Idempotency-Key, different request body.
413payload_too_largepayload is over 256 KB.
422invalid_urlurl is not HTTPS or resolves to a private address.
429rate_limitedToo many requests. Wait for the Retry-After seconds.

Rate limits

Limits apply per API key. Every response carries RateLimit-Remaining and RateLimit-Reset; a 429 adds Retry-After in seconds.

Rate limits by plan
PlanSustainedBurstIncluded jobs
Free10 req/s2010,000 jobs / month
Team100 req/s2002,000,000 jobs / month
Business500 req/s1,000Custom

Request

curl

curl https://api.ferrybox.example/v2/jobs \
  -H "Authorization: Bearer $FERRYBOX_API_KEY" \
  -H "Idempotency-Key: signup-4821" \
  -H "Content-Type: application/json" \
  -d '{
    "queue": "emails",
    "url": "https://app.example.com/hooks/welcome",
    "payload": { "user_id": 4821 },
    "delay": "5m",
    "retry": { "max_attempts": 5 }
  }'

Node.js

const job = await fbx.jobs.create({
  queue: "emails",
  url: "https://app.example.com/hooks/welcome",
  payload: { user_id: 4821 },
  delay: "5m",
  retry: { maxAttempts: 5 },
}, { idempotencyKey: "signup-4821" });

Python

job = fbx.jobs.create(
    queue="emails",
    url="https://app.example.com/hooks/welcome",
    payload={"user_id": 4821},
    delay="5m",
    retry={"max_attempts": 5},
    idempotency_key="signup-4821",
)

CLI

$ ferry jobs send emails \
    --url https://app.example.com/hooks/welcome \
    --data '{"user_id": 4821}' \
    --delay 5m --max-attempts 5 \
    --idempotency-key signup-4821

Response

201 Created

{
  "id": "job_01JC8M2X4R",
  "object": "job",
  "queue": "emails",
  "status": "scheduled",
  "url": "https://app.example.com/hooks/welcome",
  "run_at": "2026-11-10T14:07:00Z",
  "attempts": [],
  "retry": {
    "max_attempts": 5,
    "backoff": "exponential",
    "initial_delay": "10s",
    "max_delay": "1h"
  },
  "created_at": "2026-11-10T14:02:00Z"
}

409 Conflict

{
  "error": {
    "type": "idempotency_conflict",
    "message": "Idempotency-Key signup-4821 was used with a different body.",
    "job_id": "job_01JC8M2X4R",
    "doc_url": "https://docs.ferrybox.example/errors#idempotency_conflict"
  }
}
Palette

Palettes · 60 / 30 / 10