POST/scheduled_jobs/queues
Create a queue
Creates an http queue, which Motor delivers as signed HTTPS POSTs to destination_url, or a pull queue, which your workers lease. The answer to an HTTP queue's creation shows its signing_secret once; an identical retry shows it again only to the same key while the queue keeps that key. Costs one operation. At most 100 queues by default.
| Parameter | Location | Description |
|---|---|---|
| Idempotency-Key | header | 1 to 128 printable ASCII characters that you choose for this operation. An identical retry returns the first response with Idempotency-Replayed: true for 35 days, without a new charge; a different request with the key is 409 idempotency_conflict, and a retry while the first runs is 409 request_in_progress. A missing key is 400 idempotency_key_required. |
| Motor-Mode | header | Scheduled jobs is live-only. Omit this header or send live; test gives 422 unsupported_mode before anything else happens. |
{
"name": "Invoices",
"delivery": "http",
"destination_url": "https://agent.example.com/jobs",
"headers": {
"X-Team": "billing"
},
"authorization": "Bearer agent-token"
}| Field | Type | Description |
|---|---|---|
namerequired | string | |
deliveryrequired | string | Immutable. |
ordering | string | Immutable. |
concurrency | integer | |
rate_per_second | integer | |
paused | boolean | |
metadata | object | At most 16 string pairs: keys of 1 to 64 bytes, values of at most 256, at most 2 KiB in all. A job's run_id value is filterable. |
destination_url | string | HTTP queues only, and required for them: HTTPS on port 443 to a public host, without user information, a query, or a fragment. |
headers | object | At most 16 custom headers, 4 KiB in all. Motor's own headers, hop-by-hop headers, Authorization, Cookie, Proxy-Authorization, and webhook-*, motor-*, and x-forwarded-* names aren't allowed. |
authorization | string or null | HTTP queues only: the write-only Authorization value of each request. null clears it. |
timeout_seconds | integer | |
retry_delays_seconds | array |
Responses
201The queue, with its signing key if it's an HTTP queue.
{
"id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
"object": "queue",
"name": "Invoices",
"delivery": "http",
"ordering": "unordered",
"concurrency": 10,
"rate_per_second": 10,
"paused": false,
"pause_reason": null,
"metadata": {},
"destination": "https://agent.example.com/jobs",
"destination_revision": "1",
"headers": {
"x-team": "billing"
},
"has_authorization": true,
"timeout_seconds": 10,
"retry_delays_seconds": [
10,
60,
300
],
"signing_secret_version": 1,
"previous_secret_expires_at": null,
"limits": {
"max_attempts": 4,
"default_attempts": 4,
"max_payload_bytes": 65536,
"max_delivery_horizon_seconds": 604800,
"team_concurrency": 100,
"team_dispatch_rate": 100,
"team_pending_jobs": 10000
},
"counts": {
"depth": 0,
"leased": 0,
"oldest_due_age_seconds": 0,
"counted_at": "2026-10-17T09:00:00.000Z"
},
"version": "1",
"created_at": "2026-10-17T09:00:00.000Z",
"updated_at": "2026-10-17T09:00:00.000Z",
"signing_secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
}