ferrybox/docs

v2.4 Retry caps and dead-letter filters are out. Release notes

Ferrybox documentation

Ferrybox runs background jobs for your app over plain HTTP. You post a job, Ferrybox calls your endpoint, retries on failure, and keeps a record of every attempt.

Base URL
api.ferrybox.example/v2
Auth
Bearer API key
Latest
2.4.0, Nov 3

Install the CLI

macOS

$ brew install ferrybox/tap/ferry
$ ferry --version
ferry 2.4.1 (darwin/arm64)

Linux

$ curl -fsSL https://get.ferrybox.example/install.sh | sh
$ ferry --version
ferry 2.4.1 (linux/amd64)

npm

$ npm install --global @ferrybox/cli
$ ferry --version
ferry 2.4.1 (node 22.11.0)

Requires macOS 12+, a glibc-based Linux, or Node 18+. Windows: use the npm package or WSL.

Send a job from your app

Node.js

import { Ferrybox } from "@ferrybox/node";

// Reads FERRYBOX_API_KEY from the environment.
const fbx = new Ferrybox();

await fbx.jobs.create({
  queue: "emails",
  url: "https://example.com/hooks/welcome",
  payload: { user_id: 4821 },
});

Python

from ferrybox import Ferrybox

fbx = Ferrybox()  # reads FERRYBOX_API_KEY

fbx.jobs.create(
    queue="emails",
    url="https://example.com/hooks/welcome",
    payload={"user_id": 4821},
)

Quickstart

From an empty workspace to a job that ran, in about five minutes.

  1. Create an API key

    In the dashboard, open Settings → API keys and create a key with the jobs:write scope. Keys start with fbx_live_ or fbx_test_.

    Terminal
    $ ferry login
    Opened https://app.ferrybox.example/cli-auth
    ✓ Logged in as ops@example.com (workspace: acme-prod)
  2. Create a queue

    A queue holds jobs and their defaults: concurrency, timeout, and retry policy. Most teams start with one queue per handler.

    Terminal
    $ ferry queues create emails --concurrency 10 --timeout 30s
    ✓ Created queue emails (q_7Hk2pQ)
  3. Send your first job

    Ferrybox will POST the payload to your handler URL. Any 2xx response marks the job as succeeded.

    Terminal
    $ ferry jobs send emails \
        --url https://app.example.com/hooks/welcome \
        --data '{"user_id": 4821}'
    ✓ Enqueued job_01JC8M2X4R (attempt 1 of 8)
  4. Watch it run

    Tail attempts as they happen, with status code, duration, and the next retry time when one is scheduled.

    Terminal
    $ ferry jobs tail emails
    14:02:07  job_01JC8M2X4R  attempt 1  200  184ms  succeeded

Find your way around

Guides

Walkthroughs for the jobs most teams build first: welcome emails, nightly exports, webhook fan-out.

API reference

Every endpoint with parameters, examples, and error codes. Base URL api.ferrybox.example/v2.

CLI reference

The ferry command covers queues, jobs, schedules, the dead-letter queue, and a local tunnel.

How a job runs

One job on the emails queue, with the default policy: 8 attempts, exponential backoff from 10 s, 30 s timeout.

  1. 0 s Enqueued POST /v2/jobs returns 201 with the job ID.
  2. 0.2 s Attempt 1 Handler answers 503. Retry scheduled.
  3. 10 s Attempt 2 Timed out after 30 s. Retry scheduled.
  4. 60 s Attempt 3 Handler answers 200 in 212 ms.
  5. 60 s Succeeded Attempt log kept for 30 days.

After the last attempt fails, the job moves to the dead-letter queue, where you can inspect and replay it. Read the retries guide

API at a glance

JSON over HTTPS. Every response includes a Request-Id header; quote it when you write to support.

  • POST /v2/jobs Create a job
  • GET /v2/jobs/{id} Retrieve a job and its attempts
  • GET /v2/jobs List jobs, newest first
  • POST /v2/jobs/{id}/cancel Cancel a pending job
  • POST /v2/schedules Create a cron schedule
  • PATCH /v2/queues/{name} Update queue defaults
  • POST /v2/dlq/{id}/replay Replay a dead-lettered job
  • DELETE /v2/schedules/{id} Delete a schedule

Authenticate

Terminal
curl https://api.ferrybox.example/v2/jobs \
  -H "Authorization: Bearer $FERRYBOX_API_KEY"

Use fbx_test_ keys while you build. Test jobs never reach live handlers and are deleted after 7 days.

Client libraries

Official libraries wrap the API, sign requests, and retry on 429 with the server’s Retry-After.

Official client libraries
LanguageInstallVersionRequires
Node.jsnpm i @ferrybox/node2.4.1Node 18+
Pythonpip install ferrybox2.4.0Python 3.9+
Gogo get ferrybox.example/go@v22.3.2Go 1.22+
Rubygem install ferrybox2.3.0Ruby 3.1+

Most-read guides

Latest release

2.4.0

  • Added retry.max_delay caps any single delay. Default 1h.
  • Added ferry dlq replay accepts --since and --status filters.
  • Changed Default per-attempt timeout is now 30 s (was 60 s) for queues created after this release. Existing queues keep their setting.
All release notes

Stuck?

Palette

Palettes · 60 / 30 / 10