Skip to content

API Reference

All endpoints are prefixed with {basePath}/api. The default base path is /, so endpoints are at /api/....

Config

MethodPathDescription
GET/api/configRuntime flags the UI needs before signing in

Returns the handler configuration so clients (and the embedded UI) can adapt before any authenticated request is made. This endpoint is registered before the auth middleware, so it is always reachable.

json
{
  "data": {
    "readOnly": false,
    "authRequired": true
  }
}
FieldTypeDescription
readOnlybooleanWhen true, all mutation endpoints reject with 403
authRequiredbooleanWhen true, an auth callback is configured on the handler

Queues

MethodPathDescription
GET/api/queuesList all queues (filtered by queues option if set)
GET/api/queues/:nameQueue detail: job counts and paused job names
POST/api/queues/:name/pausePause a queue or a specific job name
POST/api/queues/:name/resumeResume a queue or a specific job name
POST/api/queues/:name/drainDrain all waiting and delayed jobs
POST/api/queues/:name/cleanRemove jobs in a given state older than a grace period
POST/api/queues/:name/retryRetry all failed or completed jobs
POST/api/queues/:name/promotePromote all delayed jobs to waiting
DELETE/api/queues/:nameObliterate a queue (use ?force=true to force)

Pause / Resume Body

json
{ "jobName": "send-email" }

Omit jobName (or set to "__all__") to pause/resume the entire queue.

Clean Body

json
{ "state": "completed", "grace": 3600000 }

grace is in milliseconds. Removes jobs in the given state older than the grace period.

Retry Body

json
{ "state": "failed" }

state must be "failed" or "completed".

Jobs

MethodPathDescription
GET/api/queues/:name/jobsList jobs with pagination
POST/api/queues/:name/jobsAdd a new job
GET/api/queues/:name/jobs/:idJob detail
GET/api/queues/:name/jobs/:id/childrenList child jobs (flow)
POST/api/queues/:name/jobs/:id/retryRetry a single failed/completed job
POST/api/queues/:name/jobs/:id/promotePromote a single delayed job to waiting
POST/api/queues/:name/jobs/:id/cancelCancel an active job
PATCH/api/queues/:name/jobs/:idEdit job payload or priority
DELETE/api/queues/:name/jobs/:idRemove a job

List Jobs Query Parameters

ParameterDefaultDescription
statewaitingJob state to filter by
start0Pagination offset
end100Pagination end index (max page size: 1000)

Add Job Body

json
{
  "name": "send-email",
  "data": { "to": "user@example.com" },
  "opts": { "priority": 1, "delay": 5000 }
}

Edit Job Body

json
{
  "data": { "to": "updated@example.com" },
  "opts": { "priority": 2 }
}

Cannot edit active jobs.

Groups

MethodPathDescription
GET/api/queues/:name/groupsList distinct groups with active/waiting counts

Flows

MethodPathDescription
GET/api/flowsList flow parent jobs

Query Parameters

ParameterDefaultDescription
stateallFilter by job state
MethodPathDescription
GET/api/searchQuick lookup — job by ID, queue by name, job name, or payload
GET/api/jobs/searchAdvanced job search with combinable filters and pagination
ParameterRequiredDescription
qyesSearch term (job ID, queue name substring, job name substring, or payload text)
typeno"job" (default), "queue", "name", or "payload"
queuefor payload; optional for nameQueue name to restrict the search
ParameterDefaultDescription
nameCase-insensitive substring match on job name
queueall allowed queuesRestrict to a specific queue
stateallComma-separated JobState list (e.g. waiting,failed) — 400 if none are valid
afterISO 8601 date; jobs created at/after
beforeISO 8601 date; jobs created at/before
start0Pagination offset
end50Pagination end index (max page size: 1000)

Returns a paginated response. Results are ordered by createdAt descending across all three backends (memory, PostgreSQL, SQLite).

Metrics

MethodPathDescription
GET/api/queues/:name/metricsPer-queue metrics buckets
GET/api/metrics/sparklinesBatch sparklines for all queues
GET/api/metrics/statusCheck if metrics are enabled

Metrics Query Parameters

ParameterDefaultDescription
granularityminute"minute" or "hour"
from1 hour agoISO 8601 date string
tonowISO 8601 date string

SSE Events

MethodPathDescription
GET/api/eventsSSE stream for all queues
GET/api/queues/:name/eventsSSE stream for a single queue

The SSE stream sends a connected event on connection, then real-time events as they occur.

Event Types

EventDescription
connectedInitial connection confirmation
job:waitingJob moved to waiting state
job:activeJob picked up by a worker
job:completedJob completed successfully
job:failedJob failed
job:delayedJob delayed
job:removedJob removed
job:progressJob progress updated
job:stalledJob detected as stalled
job:cancelledActive job cancelled
queue:pausedQueue or job name paused
queue:resumedQueue or job name resumed
queue:drainedQueue drained

SSE Client Example

typescript
const events = new EventSource('/api/events');

events.addEventListener('job:completed', (e) => {
  const event = JSON.parse(e.data);
  console.log(`Job ${event.jobId} completed in queue ${event.queueName}`);
});

events.addEventListener('job:failed', (e) => {
  const event = JSON.parse(e.data);
  console.log(`Job ${event.jobId} failed: ${event.data?.reason}`);
});

Response Format

Success (single item)

json
{
  "data": { ... }
}

Success (paginated)

json
{
  "data": [ ... ],
  "meta": {
    "total": 42,
    "start": 0,
    "end": 100
  }
}

Error

json
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "state must be \"failed\" or \"completed\""
  }
}

Common error codes: BAD_REQUEST, NOT_FOUND, FORBIDDEN (read-only mode), UNAUTHORIZED (auth failed), METRICS_DISABLED.

OpenAPI Specification

The complete OpenAPI 3.1 spec is available at /openapi.json.

You can import it into tools like Swagger Editor or Scalar for an interactive API explorer.

Released under the MIT License.