{
  "openapi": "3.1.0",
  "info": {
    "title": "Scheduled jobs",
    "version": "2026-10-17",
    "description": "Schedule, inspect, cancel, and retry background jobs. An **http** queue sends each job as a signed HTTPS `POST` to your endpoint. A **pull** queue holds its jobs until your workers lease them. Each lease returns a receipt used to extend the lease or report success or failure. The internal API also supports typed handlers for Motor services; internal jobs do not appear in these public routes. **Schedules** submit a job template on cron or interval timers, with missed-run and overlap policies and a dispatch and schedule-day budget. Control operations are charged separately.\n\nPaths are under `https://api.motor.dev/scheduled_jobs`. Authenticate with a secret key (`motor_sk_...`) that may use Scheduled jobs in `Authorization: Bearer ...`; publishable keys never work. Give pull workers a key of their own that only allows Scheduled jobs, with a monthly spending limit. The service is live-only: omit `Motor-Mode` or send `live`. Every `POST` except `/validate` needs an `Idempotency-Key`. Responses of resources carry `ETag: \"queues:{id}:{version}\"`; `PATCH`, `DELETE`, and the actions of jobs and schedules need it in `If-Match`, apart from lease grants and receipt operations. Lists return `{\"items\": [...], \"next_cursor\": ...}`, oldest first. IDs are opaque strings with a prefix: `que_` queues, `qjb_` jobs, `qat_` attempts, `qsc_` schedules, and `qlr_` receipts. Times are UTC RFC 3339 to the millisecond, and durations are whole seconds. Money is a decimal USD string. Unknown fields, duplicate members, invalid UTF-8, and non-finite numbers are refused. Errors are `{\"error\": {\"code\", \"message\", \"retryable\", ...}}`; only `409 request_in_progress`, `429`, and `503` are retryable as they are, and if you lose a response, retry the request with the same `Idempotency-Key`.\n\n**Jobs can be delivered more than once.** An attempt whose outcome Motor can't know, such as a timeout or a lease that ended, is `unknown`, and the job retries under its policy: make every effect idempotent by the job ID. Any 2xx succeeds; 408, 425, 429, 5xx, and network errors retry after the queue's delays plus up to 20% jitter, or a longer `Retry-After`; redirects and other 4xx fail; 410 and unsafe destinations fail and pause the queue. Motor stops starting new attempts at `deadline_at`, at most 7 days after submission. An attempt already running may still complete.\n\n**What endpoints get.** Each attempt is a `POST` of the job's exact bytes with its `Content-Type`, `User-Agent: Motor-Scheduled-Jobs/1.0`, the queue's custom headers and authorization, and Standard Webhooks headers: `webhook-id` (the job ID, the same on retries; a replay is a new job), `webhook-timestamp` (Unix seconds of the attempt), and `webhook-signature` (`v1,{signature}`, where `{signature}` is the Base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}` using the Base64-decoded signing key after removing the `whsec_` prefix; during a rotation, a signature for each key). `Motor-Attempt-Id`, `Motor-Attempt-Number`, `Motor-Queue-Id`, and `Motor-Scheduled-At` aren't signed. Verify in constant time, allow 5 minutes of clock skew, and deduplicate by `webhook-id`.\n\n**Pricing.** `queues.dispatch`: $0.00002 for each accepted job, its first attempt included, and for each further claimed attempt; an accepted job is paid whether it succeeds, fails, is canceled, or expires. `queues.operation`: $0.00002 for each read or list page, pull lease request (empty ones too), heartbeat, job rebind, and queue or schedule creation, update, rotation, or rebind; billed requests answer `Motor-Operation-Cost-USD`. `queues.schedule_day`: $0.001 for each started 24-hour period of a kept schedule, active or paused, paid in advance. Validation, cancellation, deletion, acknowledgments, job resumes, refused requests, and idempotent or deduplicated request replays have no additional charge. Resuming a schedule is a paid update and may also start a new prepaid schedule-day. A job's `max_cost_usd` caps its dispatch, and a schedule's `max_total_cost_usd` its dispatch and schedule-days; neither covers operations or replaces the key's spending limit."
  },
  "servers": [
    {
      "url": "https://api.motor.dev/scheduled_jobs"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Queues",
      "description": "Named queues with their delivery, ordering, limits, retry policy, destination, and signing key."
    },
    {
      "name": "Jobs",
      "description": "Submission, validation, reads, cancellation, replay, resumption, rebinding, and deletion."
    },
    {
      "name": "Pull workers",
      "description": "Lease grants with receipts, heartbeats, acknowledgments, and negative acknowledgments."
    },
    {
      "name": "Schedules",
      "description": "Recurring job templates on cron or interval timers."
    }
  ],
  "paths": {
    "/queues": {
      "post": {
        "operationId": "createQueue",
        "tags": [
          "Queues"
        ],
        "summary": "Create a queue",
        "description": "Creates an `http` queue, which Motor delivers as signed HTTPS `POST`s 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.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueCreate"
              },
              "example": {
                "name": "Invoices",
                "delivery": "http",
                "destination_url": "https://agent.example.com/jobs",
                "headers": {
                  "X-Team": "billing"
                },
                "authorization": "Bearer agent-token"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The queue, with its signing key if it's an HTTP queue.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The path of the resource.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queue"
                },
                "example": {
                  "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"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body or payload is too large.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body isn't `application/json`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listQueues",
        "tags": [
          "Queues"
        ],
        "summary": "List queues",
        "description": "Lists your team's queues, oldest first. Filters: `delivery` and `paused`. Costs one operation per page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "delivery",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "http",
                "pull"
              ]
            }
          },
          {
            "name": "paused",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of queues.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueList"
                },
                "example": {
                  "items": [
                    {
                      "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"
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/queues/{queue_id}": {
      "get": {
        "operationId": "getQueue",
        "tags": [
          "Queues"
        ],
        "summary": "Get a queue",
        "description": "Returns a queue with its effective limits and its counts. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/QueueId"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The queue.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queue"
                },
                "example": {
                  "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"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateQueue",
        "tags": [
          "Queues"
        ],
        "summary": "Update a queue",
        "description": "Changes the fields that you send; the others stay. `delivery` and `ordering` can't change, and `authorization: null` clears the authorization. A change of the destination, its headers, or its authorization adds one to `destination_revision` and reaches waiting jobs at their next claim. A new host needs its own `authorization` and `headers` in the same request. `paused: false` resumes a queue that Motor paused. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/QueueId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QueueUpdate"
              },
              "example": {
                "paused": false,
                "destination_url": "https://agent.example.com/v2/jobs"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The queue.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queue"
                },
                "example": {
                  "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"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body or payload is too large.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body isn't `application/json`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteQueue",
        "tags": [
          "Queues"
        ],
        "summary": "Delete a queue",
        "description": "Marks the queue as deleted immediately: it rejects new jobs, stops starting attempts, revokes its credentials, and stops its schedules. A cleanup then cancels its pending jobs and erases their contents. A request already sent can't be recalled. No additional charge.",
        "parameters": [
          {
            "$ref": "#/components/parameters/QueueId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "202": {
            "description": "The deletion receipt.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QueueDeletion"
                },
                "example": {
                  "id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "object": "queue_deletion",
                  "deleted": true,
                  "deleted_at": "2026-10-17T09:00:00.000Z",
                  "cleanup": "pending"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/queues/{queue_id}/rotate_secret": {
      "post": {
        "operationId": "rotateQueueSecret",
        "tags": [
          "Queues"
        ],
        "summary": "Rotate a signing key",
        "description": "Makes a new signing key for an HTTP queue and shows it once. The previous key keeps signing alongside it for 24 hours; another rotation in that time is `409 invalid_state`. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/QueueId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The queue with its new key.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Queue"
                },
                "example": {
                  "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"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/queues/{queue_id}/leases": {
      "post": {
        "operationId": "leaseJobs",
        "tags": [
          "Pull workers"
        ],
        "summary": "Lease jobs",
        "description": "Leases at most `max_jobs` due jobs of a pull queue for `lease_seconds`, in order of their time and submission, at most 128 KiB in all. Each lease has a `receipt`, which works only with this key, and the job's payload. A due retry costs one dispatch unit; one that the key can't afford is blocked and counted in `blocked_count`. If you lose the lease response, retry with the same `Idempotency-Key` while its leases are active. After a lease ends, the retry returns `409 lease_lost`. Each call costs one operation, an empty poll too.",
        "parameters": [
          {
            "$ref": "#/components/parameters/QueueId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeaseRequest"
              },
              "example": {
                "max_jobs": 5,
                "lease_seconds": 120
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The leases, or none and when to poll again.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaseGrant"
                },
                "example": {
                  "items": [
                    {
                      "job": {
                        "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                        "object": "job",
                        "queue_id": "que_2Tm9QxR4vB7nLpY3sK8cWf",
                        "state": "leased",
                        "reason": null,
                        "waiting_reason": null,
                        "version": "2",
                        "not_before": "2026-10-17T09:00:00.000Z",
                        "due_at": null,
                        "deadline_at": "2026-10-18T09:00:00.000Z",
                        "attempt_count": 1,
                        "max_attempts": 4,
                        "affordable_attempts": 4,
                        "retry_delays_seconds": [
                          10,
                          60,
                          300
                        ],
                        "timeout_seconds": null,
                        "lease_until": "2026-10-17T09:02:00.000Z",
                        "content_type": "application/json",
                        "payload_bytes": 21,
                        "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                        "payload_retained": true,
                        "payload_expires_at": "2026-10-18T09:00:00.000Z",
                        "group_id": null,
                        "group_sequence": null,
                        "deduplication_key": null,
                        "deduplication_expires_at": null,
                        "metadata": {
                          "run_id": "run-7"
                        },
                        "submitted_by": {
                          "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                          "principal_id": null
                        },
                        "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                        "attribution": "direct",
                        "replay_of": null,
                        "schedule_id": null,
                        "scheduled_at": null,
                        "cancel_requested": false,
                        "last_outcome": null,
                        "last_error_code": null,
                        "retryable": null,
                        "destination_revision": null,
                        "cost": {
                          "unit_usd": "0.00002",
                          "charged_usd": "0.00002",
                          "max_cost_usd": "0.00008",
                          "remaining_max_cost_usd": "0.00006",
                          "rate_version": "2026-10-20"
                        },
                        "deleted": false,
                        "deleted_at": null,
                        "terminal_at": null,
                        "created_at": "2026-10-17T09:00:00.000Z",
                        "updated_at": "2026-10-17T09:00:00.000Z"
                      },
                      "attempt_id": "qat_6NpB2xQ8rT4vLmY7kC3sWe",
                      "attempt_number": 1,
                      "receipt": "qlr_4fRm8NqZ2kLpVx7cJs9hYb3TnW6dXe5gHu1",
                      "lease_until": "2026-10-17T09:02:00.000Z",
                      "payload_base64": "eyJpbnZvaWNlIjogImludl80MiJ9",
                      "content_type": "application/json"
                    }
                  ],
                  "retry_after_seconds": 0,
                  "blocked_count": 0
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs": {
      "post": {
        "operationId": "submitJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Submit a job",
        "description": "Accepts a job and charges its admission, which includes its first attempt: $0.00002. Answers `202` once the job, its charge, and its wakeup are stored. A matching `deduplication_key` answers `200` with the original job, `deduplicated: true`, and no charge; a different input with it is `409 deduplication_conflict`. A reached capacity limit returns `409 capacity_exceeded`. Accepted jobs remain available until they finish or expire, subject to deletion.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobSubmit"
              },
              "example": {
                "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                "payload_base64": "eyJpbnZvaWNlIjogImludl80MiJ9",
                "not_before": "2026-10-17T09:00:00.000Z",
                "metadata": {
                  "run_id": "run-7"
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The accepted job.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The path of the resource.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "queued",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "deduplicated": false
                }
              }
            }
          },
          "200": {
            "description": "The original job of the deduplication key.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The path of the resource.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "queued",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "deduplicated": true
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body or payload is too large.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body isn't `application/json`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "`temporarily_unavailable`: retry after `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listJobs",
        "tags": [
          "Jobs"
        ],
        "summary": "List jobs",
        "description": "Lists your team's jobs, oldest first, without payloads. Filters: `queue_id`, `state`, `schedule_id`, `replay_of`, and `run_id` (the exact `run_id` metadata value). Costs one operation per page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "queue_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "scheduled",
                "queued",
                "leased",
                "retry_wait",
                "blocked",
                "succeeded",
                "dead",
                "canceled",
                "expired"
              ]
            }
          },
          {
            "name": "schedule_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "replay_of",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "run_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of jobs.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobList"
                },
                "example": {
                  "items": [
                    {
                      "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                      "object": "job",
                      "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                      "state": "queued",
                      "reason": null,
                      "waiting_reason": null,
                      "version": "1",
                      "not_before": "2026-10-17T09:00:00.000Z",
                      "due_at": "2026-10-17T09:00:00.000Z",
                      "deadline_at": "2026-10-18T09:00:00.000Z",
                      "attempt_count": 0,
                      "max_attempts": 4,
                      "affordable_attempts": 4,
                      "retry_delays_seconds": [
                        10,
                        60,
                        300
                      ],
                      "timeout_seconds": 10,
                      "lease_until": null,
                      "content_type": "application/json",
                      "payload_bytes": 21,
                      "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                      "payload_retained": true,
                      "payload_expires_at": "2026-10-18T09:00:00.000Z",
                      "group_id": null,
                      "group_sequence": null,
                      "deduplication_key": null,
                      "deduplication_expires_at": null,
                      "metadata": {
                        "run_id": "run-7"
                      },
                      "submitted_by": {
                        "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                        "principal_id": null
                      },
                      "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                      "attribution": "direct",
                      "replay_of": null,
                      "schedule_id": null,
                      "scheduled_at": null,
                      "cancel_requested": false,
                      "last_outcome": null,
                      "last_error_code": null,
                      "retryable": null,
                      "destination_revision": null,
                      "cost": {
                        "unit_usd": "0.00002",
                        "charged_usd": "0.00002",
                        "max_cost_usd": "0.00008",
                        "remaining_max_cost_usd": "0.00006",
                        "rate_version": "2026-10-20"
                      },
                      "deleted": false,
                      "deleted_at": null,
                      "terminal_at": null,
                      "created_at": "2026-10-17T09:00:00.000Z",
                      "updated_at": "2026-10-17T09:00:00.000Z"
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/batch": {
      "post": {
        "operationId": "submitJobs",
        "tags": [
          "Jobs"
        ],
        "summary": "Submit jobs in a batch",
        "description": "Accepts up to 10 jobs, to one or several queues, at most 640 KiB of payloads, all or nothing: one refusal refuses every job without a charge. Repeated deduplication keys in a batch give one job, paid once. Each job counts toward the submission rate.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobBatch"
              },
              "example": {
                "jobs": [
                  {
                    "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                    "payload_base64": "e30="
                  },
                  {
                    "queue_id": "que_2Tm9QxR4vB7nLpY3sK8cWf",
                    "payload_base64": "e30="
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The jobs, in order, and their total cost.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobBatchResult"
                },
                "example": {
                  "items": [
                    {
                      "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                      "object": "job",
                      "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                      "state": "queued",
                      "reason": null,
                      "waiting_reason": null,
                      "version": "1",
                      "not_before": "2026-10-17T09:00:00.000Z",
                      "due_at": "2026-10-17T09:00:00.000Z",
                      "deadline_at": "2026-10-18T09:00:00.000Z",
                      "attempt_count": 0,
                      "max_attempts": 4,
                      "affordable_attempts": 4,
                      "retry_delays_seconds": [
                        10,
                        60,
                        300
                      ],
                      "timeout_seconds": 10,
                      "lease_until": null,
                      "content_type": "application/json",
                      "payload_bytes": 21,
                      "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                      "payload_retained": true,
                      "payload_expires_at": "2026-10-18T09:00:00.000Z",
                      "group_id": null,
                      "group_sequence": null,
                      "deduplication_key": null,
                      "deduplication_expires_at": null,
                      "metadata": {
                        "run_id": "run-7"
                      },
                      "submitted_by": {
                        "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                        "principal_id": null
                      },
                      "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                      "attribution": "direct",
                      "replay_of": null,
                      "schedule_id": null,
                      "scheduled_at": null,
                      "cancel_requested": false,
                      "last_outcome": null,
                      "last_error_code": null,
                      "retryable": null,
                      "destination_revision": null,
                      "cost": {
                        "unit_usd": "0.00002",
                        "charged_usd": "0.00002",
                        "max_cost_usd": "0.00008",
                        "remaining_max_cost_usd": "0.00006",
                        "rate_version": "2026-10-20"
                      },
                      "deleted": false,
                      "deleted_at": null,
                      "terminal_at": null,
                      "created_at": "2026-10-17T09:00:00.000Z",
                      "updated_at": "2026-10-17T09:00:00.000Z",
                      "deduplicated": false
                    }
                  ],
                  "total_cost_usd": "0.00002"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body or payload is too large.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body isn't `application/json`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "`temporarily_unavailable`: retry after `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}": {
      "get": {
        "operationId": "getJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Get a job",
        "description": "Returns a job, its pull or handler `result` while retained, and with `include_payload=true`, its payload (`410 payload_expired` once it's gone). A deleted job answers its short record. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "name": "include_payload",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The job.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "queued",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "result": null
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "410": {
            "description": "`payload_expired`: the payload is gone.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Delete a job",
        "description": "Cancels the job, erases its payload and result at once, and keeps a short record for 35 days. An attempt already running may still complete its work. A repeated deletion answers the same receipt. No additional charge.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "202": {
            "description": "The deletion receipt.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobDeletion"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job_deletion",
                  "deleted": true,
                  "deleted_at": "2026-10-17T09:00:00.000Z",
                  "state": "canceled",
                  "erasure_state": "complete"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/attempts": {
      "get": {
        "operationId": "listJobAttempts",
        "tags": [
          "Jobs"
        ],
        "summary": "List a job's attempts",
        "description": "Lists a job's attempts in order. Attempt records remain for 35 days after the job finishes. Retained response headers are cleared with the job’s payload after 7 days. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The attempts.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttemptList"
                },
                "example": {
                  "items": [
                    {
                      "id": "qat_6NpB2xQ8rT4vLmY7kC3sWe",
                      "object": "attempt",
                      "job_id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                      "number": 1,
                      "delivery": "http",
                      "outcome": "succeeded",
                      "http_status": 204,
                      "error_code": null,
                      "response_headers": {
                        "x-request-id": "abc123"
                      },
                      "destination_revision": "1",
                      "destination_host": "agent.example.com",
                      "started_at": "2026-10-17T09:00:00.000Z",
                      "lease_until": "2026-10-17T09:00:40.000Z",
                      "finished_at": "2026-10-17T09:00:00.180Z",
                      "duration_ms": 180,
                      "charged_usd": "0.00",
                      "late_evidence": false
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/cancel": {
      "post": {
        "operationId": "cancelJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Cancel a job",
        "description": "Immediately marks a waiting job as `canceled`. If an attempt is running, Motor sets `cancel_requested: true` and prevents retries. The attempt can finish or run until its lease expires; if it succeeds, the job becomes `succeeded`. Canceling a finished job answers it unchanged, even with a stale `If-Match`. No additional charge.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "queued",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/replay": {
      "post": {
        "operationId": "replayJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Replay a job",
        "description": "Makes a new paid job from a dead, expired, or canceled job's retained payload, with a new ID and `replay_of`. If an attempt's outcome was unknown, send `allow_duplicate_effects: true`: the first effect may have happened (`409 duplicate_effects_possible`). A succeeded job can't replay.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobReplay"
              },
              "example": {
                "allow_duplicate_effects": true
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The new job.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The path of the resource.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "queued",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "deduplicated": false
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "410": {
            "description": "`payload_expired`: the payload is gone.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "`temporarily_unavailable`: retry after `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/resume": {
      "post": {
        "operationId": "resumeJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Resume a blocked job",
        "description": "Retries a blocked job after checking its key, its access, and its budget again; `409 still_blocked` names what still blocks it. No additional charge.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "queued",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/rebind": {
      "post": {
        "operationId": "rebindJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Rebind a job",
        "description": "Makes the authenticated key the job's billing key and authority for future charges; the submitter and earlier charges stay. A job that a key or billing refusal blocked resumes. A schedule's jobs can't rebind. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "queued",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/heartbeat": {
      "post": {
        "operationId": "heartbeatLease",
        "tags": [
          "Pull workers"
        ],
        "summary": "Extend a lease",
        "description": "Extends a lease to `extend_seconds` from now, without exceeding the job’s deadline or one hour after the attempt started, whichever comes first. It never shortens a lease, and extends a job at most once each 10 seconds (`429`). A job with a cancellation request isn't extended. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Heartbeat"
              },
              "example": {
                "receipt": "qlr_4fRm8NqZ2kLpVx7cJs9hYb3TnW6dXe5gHu1",
                "extend_seconds": 120
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The lease's new end.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HeartbeatResult"
                },
                "example": {
                  "job_id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "attempt_id": "qat_6NpB2xQ8rT4vLmY7kC3sWe",
                  "lease_until": "2026-10-17T09:04:00.000Z",
                  "extended": true,
                  "cancel_requested": false
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/ack": {
      "post": {
        "operationId": "acknowledgeLease",
        "tags": [
          "Pull workers"
        ],
        "summary": "Acknowledge a lease",
        "description": "Finishes the job as succeeded, with an optional compact JSON `result` of at most 4 KiB. Motor records your declaration and doesn't check your downstream effect. A wrong, expired, or superseded receipt is `409 lease_lost` and changes nothing. No additional charge.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Ack"
              },
              "example": {
                "receipt": "qlr_4fRm8NqZ2kLpVx7cJs9hYb3TnW6dXe5gHu1",
                "result": {
                  "width": 640
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "succeeded",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}/nack": {
      "post": {
        "operationId": "rejectLease",
        "tags": [
          "Pull workers"
        ],
        "summary": "Report a failed attempt",
        "description": "Reports a failed attempt: `retryable: true` applies the retry policy, and `false` marks the job `dead` with `error_code`. If cancellation was requested, the job ends as `canceled`. No additional charge.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Nack"
              },
              "example": {
                "receipt": "qlr_4fRm8NqZ2kLpVx7cJs9hYb3TnW6dXe5gHu1",
                "retryable": true,
                "error_code": "rate_limited"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The job.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                },
                "example": {
                  "id": "qjb_3VxQ7mK2pR9sLtY4nB6cWd",
                  "object": "job",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "state": "retry_wait",
                  "reason": null,
                  "waiting_reason": null,
                  "version": "1",
                  "not_before": "2026-10-17T09:00:00.000Z",
                  "due_at": "2026-10-17T09:00:00.000Z",
                  "deadline_at": "2026-10-18T09:00:00.000Z",
                  "attempt_count": 0,
                  "max_attempts": 4,
                  "affordable_attempts": 4,
                  "retry_delays_seconds": [
                    10,
                    60,
                    300
                  ],
                  "timeout_seconds": 10,
                  "lease_until": null,
                  "content_type": "application/json",
                  "payload_bytes": 21,
                  "payload_sha256": "1d5f8c0a6a3c9b3c4e4d2f6c8b1a7e9d0c3b5a7f9e1d3c5b7a9f1e3d5c7b9a1e",
                  "payload_retained": true,
                  "payload_expires_at": "2026-10-18T09:00:00.000Z",
                  "group_id": null,
                  "group_sequence": null,
                  "deduplication_key": null,
                  "deduplication_expires_at": null,
                  "metadata": {
                    "run_id": "run-7"
                  },
                  "submitted_by": {
                    "key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                    "principal_id": null
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "attribution": "direct",
                  "replay_of": null,
                  "schedule_id": null,
                  "scheduled_at": null,
                  "cancel_requested": false,
                  "last_outcome": null,
                  "last_error_code": null,
                  "retryable": null,
                  "destination_revision": null,
                  "cost": {
                    "unit_usd": "0.00002",
                    "charged_usd": "0.00002",
                    "max_cost_usd": "0.00008",
                    "remaining_max_cost_usd": "0.00006",
                    "rate_version": "2026-10-20"
                  },
                  "deleted": false,
                  "deleted_at": null,
                  "terminal_at": null,
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/schedules": {
      "post": {
        "operationId": "createSchedule",
        "tags": [
          "Schedules"
        ],
        "summary": "Create a schedule",
        "description": "Creates a recurring schedule of a job template on a cron expression in a time zone, or an interval from `start_at`. It charges the first schedule-day ($0.001) and one operation. Each occurrence reserves its job's maximum cost against `max_total_cost_usd`, which also pays schedule-days.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleCreate"
              },
              "example": {
                "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                "template": {
                  "payload_base64": "eyJyZXBvcnQiOiAiZGFpbHkifQ==",
                  "max_attempts": 2
                },
                "cron": "0 9 * * MON-FRI",
                "timezone": "America/New_York",
                "end_at": "2027-01-01T00:00:00Z",
                "max_total_cost_usd": "0.50"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The schedule and its next ten scheduled times.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Location": {
                "description": "The path of the resource.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                },
                "example": {
                  "id": "qsc_7KpR3xN9vT2mLqY5sB8cWd",
                  "object": "schedule",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "status": "active",
                  "reason": null,
                  "template": {
                    "content_type": "application/json",
                    "payload_bytes": 19,
                    "payload_sha256": "5a3c9b1e7d2f4c6a8b0d1e3f5a7c9b2d4f6e8a0c1b3d5f7e9a2c4b6d8f0e1a3c",
                    "payload_retained": true,
                    "group_id": null,
                    "metadata": {},
                    "max_attempts": 2,
                    "max_cost_usd": "0.00004",
                    "deadline_seconds": 86400
                  },
                  "cron": "0 9 * * 1-5",
                  "timezone": "America/New_York",
                  "interval_seconds": null,
                  "start_at": "2026-10-17T09:00:00.000Z",
                  "end_at": "2027-01-01T00:00:00.000Z",
                  "paused": false,
                  "misfire_policy": "skip",
                  "overlap_policy": "allow",
                  "max_total_cost_usd": "0.50",
                  "max_occurrences": 1000000,
                  "occurrences": 0,
                  "skipped": {
                    "count": 0,
                    "last_at": null,
                    "last_reason": null
                  },
                  "budget": {
                    "spent_usd": "0.001",
                    "reserved_usd": "0.00",
                    "remaining_usd": "0.499"
                  },
                  "periods": 1,
                  "paid_until": "2026-10-18T09:00:00.000Z",
                  "rates": {
                    "schedule_day_usd": "0.001",
                    "dispatch_usd": "0.00002",
                    "rate_version": "2026-10-20"
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "generation": "1",
                  "next_instants": [
                    "2026-10-19T13:00:00.000Z",
                    "2026-10-20T13:00:00.000Z",
                    "2026-10-21T13:00:00.000Z"
                  ],
                  "erase_at": null,
                  "version": "1",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "completed_at": null
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body or payload is too large.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body isn't `application/json`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listSchedules",
        "tags": [
          "Schedules"
        ],
        "summary": "List schedules",
        "description": "Lists your team's schedules, oldest first. Filters: `queue_id` and `status`. Costs one operation per page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          },
          {
            "name": "queue_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "blocked",
                "completed"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of schedules.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleList"
                },
                "example": {
                  "items": [
                    {
                      "id": "qsc_7KpR3xN9vT2mLqY5sB8cWd",
                      "object": "schedule",
                      "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                      "status": "active",
                      "reason": null,
                      "template": {
                        "content_type": "application/json",
                        "payload_bytes": 19,
                        "payload_sha256": "5a3c9b1e7d2f4c6a8b0d1e3f5a7c9b2d4f6e8a0c1b3d5f7e9a2c4b6d8f0e1a3c",
                        "payload_retained": true,
                        "group_id": null,
                        "metadata": {},
                        "max_attempts": 2,
                        "max_cost_usd": "0.00004",
                        "deadline_seconds": 86400
                      },
                      "cron": "0 9 * * 1-5",
                      "timezone": "America/New_York",
                      "interval_seconds": null,
                      "start_at": "2026-10-17T09:00:00.000Z",
                      "end_at": "2027-01-01T00:00:00.000Z",
                      "paused": false,
                      "misfire_policy": "skip",
                      "overlap_policy": "allow",
                      "max_total_cost_usd": "0.50",
                      "max_occurrences": 1000000,
                      "occurrences": 0,
                      "skipped": {
                        "count": 0,
                        "last_at": null,
                        "last_reason": null
                      },
                      "budget": {
                        "spent_usd": "0.001",
                        "reserved_usd": "0.00",
                        "remaining_usd": "0.499"
                      },
                      "periods": 1,
                      "paid_until": "2026-10-18T09:00:00.000Z",
                      "rates": {
                        "schedule_day_usd": "0.001",
                        "dispatch_usd": "0.00002",
                        "rate_version": "2026-10-20"
                      },
                      "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                      "generation": "1",
                      "next_instants": [
                        "2026-10-19T13:00:00.000Z",
                        "2026-10-20T13:00:00.000Z",
                        "2026-10-21T13:00:00.000Z"
                      ],
                      "erase_at": null,
                      "version": "1",
                      "created_at": "2026-10-17T09:00:00.000Z",
                      "updated_at": "2026-10-17T09:00:00.000Z",
                      "completed_at": null
                    }
                  ],
                  "next_cursor": null
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/schedules/{schedule_id}": {
      "get": {
        "operationId": "getSchedule",
        "tags": [
          "Schedules"
        ],
        "summary": "Get a schedule",
        "description": "Returns a schedule and its next ten scheduled times in UTC. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ScheduleId"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "200": {
            "description": "The schedule.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                },
                "example": {
                  "id": "qsc_7KpR3xN9vT2mLqY5sB8cWd",
                  "object": "schedule",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "status": "active",
                  "reason": null,
                  "template": {
                    "content_type": "application/json",
                    "payload_bytes": 19,
                    "payload_sha256": "5a3c9b1e7d2f4c6a8b0d1e3f5a7c9b2d4f6e8a0c1b3d5f7e9a2c4b6d8f0e1a3c",
                    "payload_retained": true,
                    "group_id": null,
                    "metadata": {},
                    "max_attempts": 2,
                    "max_cost_usd": "0.00004",
                    "deadline_seconds": 86400
                  },
                  "cron": "0 9 * * 1-5",
                  "timezone": "America/New_York",
                  "interval_seconds": null,
                  "start_at": "2026-10-17T09:00:00.000Z",
                  "end_at": "2027-01-01T00:00:00.000Z",
                  "paused": false,
                  "misfire_policy": "skip",
                  "overlap_policy": "allow",
                  "max_total_cost_usd": "0.50",
                  "max_occurrences": 1000000,
                  "occurrences": 0,
                  "skipped": {
                    "count": 0,
                    "last_at": null,
                    "last_reason": null
                  },
                  "budget": {
                    "spent_usd": "0.001",
                    "reserved_usd": "0.00",
                    "remaining_usd": "0.499"
                  },
                  "periods": 1,
                  "paid_until": "2026-10-18T09:00:00.000Z",
                  "rates": {
                    "schedule_day_usd": "0.001",
                    "dispatch_usd": "0.00002",
                    "rate_version": "2026-10-20"
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "generation": "1",
                  "next_instants": [
                    "2026-10-19T13:00:00.000Z",
                    "2026-10-20T13:00:00.000Z",
                    "2026-10-21T13:00:00.000Z"
                  ],
                  "erase_at": null,
                  "version": "1",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "completed_at": null
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateSchedule",
        "tags": [
          "Schedules"
        ],
        "summary": "Update a schedule",
        "description": "Changes the fields that you send. Timing and template changes apply only to future runs; missed runs aren’t added. `paused: false` resumes strictly after now. Any change of a blocked schedule checks it again and, if its paid time ended, starts a new prepaid day from now. `max_total_cost_usd` can't drop below what the schedule spent and reserved. A completed schedule can't change. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ScheduleId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleUpdate"
              },
              "example": {
                "paused": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The schedule.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                },
                "example": {
                  "id": "qsc_7KpR3xN9vT2mLqY5sB8cWd",
                  "object": "schedule",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "status": "active",
                  "reason": null,
                  "template": {
                    "content_type": "application/json",
                    "payload_bytes": 19,
                    "payload_sha256": "5a3c9b1e7d2f4c6a8b0d1e3f5a7c9b2d4f6e8a0c1b3d5f7e9a2c4b6d8f0e1a3c",
                    "payload_retained": true,
                    "group_id": null,
                    "metadata": {},
                    "max_attempts": 2,
                    "max_cost_usd": "0.00004",
                    "deadline_seconds": 86400
                  },
                  "cron": "0 9 * * 1-5",
                  "timezone": "America/New_York",
                  "interval_seconds": null,
                  "start_at": "2026-10-17T09:00:00.000Z",
                  "end_at": "2027-01-01T00:00:00.000Z",
                  "paused": false,
                  "misfire_policy": "skip",
                  "overlap_policy": "allow",
                  "max_total_cost_usd": "0.50",
                  "max_occurrences": 1000000,
                  "occurrences": 0,
                  "skipped": {
                    "count": 0,
                    "last_at": null,
                    "last_reason": null
                  },
                  "budget": {
                    "spent_usd": "0.001",
                    "reserved_usd": "0.00",
                    "remaining_usd": "0.499"
                  },
                  "periods": 1,
                  "paid_until": "2026-10-18T09:00:00.000Z",
                  "rates": {
                    "schedule_day_usd": "0.001",
                    "dispatch_usd": "0.00002",
                    "rate_version": "2026-10-20"
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "generation": "1",
                  "next_instants": [
                    "2026-10-19T13:00:00.000Z",
                    "2026-10-20T13:00:00.000Z",
                    "2026-10-21T13:00:00.000Z"
                  ],
                  "erase_at": null,
                  "version": "1",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "completed_at": null
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body or payload is too large.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body isn't `application/json`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSchedule",
        "tags": [
          "Schedules"
        ],
        "summary": "Delete a schedule",
        "description": "Stops future occurrences at once and erases the template. Admitted jobs stay unless you send `cancel_pending=true`. A begun schedule-day isn't refunded. No additional charge.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ScheduleId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "name": "cancel_pending",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "responses": {
          "202": {
            "description": "The deletion receipt.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDeletion"
                },
                "example": {
                  "id": "qsc_7KpR3xN9vT2mLqY5sB8cWd",
                  "object": "schedule_deletion",
                  "deleted": true,
                  "deleted_at": "2026-10-17T09:00:00.000Z",
                  "cancel_pending": false,
                  "canceled_jobs": 0
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/schedules/{schedule_id}/rebind": {
      "post": {
        "operationId": "rebindSchedule",
        "tags": [
          "Schedules"
        ],
        "summary": "Rebind a schedule",
        "description": "Makes the authenticated key the schedule's billing key for future occurrences and schedule-days; accepted jobs keep their key. A schedule that a key or billing refusal blocked is checked again and resumes. Costs one operation.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ScheduleId"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              },
              "example": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "The schedule.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "description": "`\"queues:{id}:{version}\"`, for `If-Match`.",
                "schema": {
                  "type": "string"
                }
              },
              "Idempotency-Replayed": {
                "description": "`true` when this is the recorded response of an earlier request with the same `Idempotency-Key`.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "true"
                  ]
                }
              },
              "Motor-Operation-Cost-USD": {
                "description": "The price of this operation, `0.00002`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                },
                "example": {
                  "id": "qsc_7KpR3xN9vT2mLqY5sB8cWd",
                  "object": "schedule",
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "status": "active",
                  "reason": null,
                  "template": {
                    "content_type": "application/json",
                    "payload_bytes": 19,
                    "payload_sha256": "5a3c9b1e7d2f4c6a8b0d1e3f5a7c9b2d4f6e8a0c1b3d5f7e9a2c4b6d8f0e1a3c",
                    "payload_retained": true,
                    "group_id": null,
                    "metadata": {},
                    "max_attempts": 2,
                    "max_cost_usd": "0.00004",
                    "deadline_seconds": 86400
                  },
                  "cron": "0 9 * * 1-5",
                  "timezone": "America/New_York",
                  "interval_seconds": null,
                  "start_at": "2026-10-17T09:00:00.000Z",
                  "end_at": "2027-01-01T00:00:00.000Z",
                  "paused": false,
                  "misfire_policy": "skip",
                  "overlap_policy": "allow",
                  "max_total_cost_usd": "0.50",
                  "max_occurrences": 1000000,
                  "occurrences": 0,
                  "skipped": {
                    "count": 0,
                    "last_at": null,
                    "last_reason": null
                  },
                  "budget": {
                    "spent_usd": "0.001",
                    "reserved_usd": "0.00",
                    "remaining_usd": "0.499"
                  },
                  "periods": 1,
                  "paid_until": "2026-10-18T09:00:00.000Z",
                  "rates": {
                    "schedule_day_usd": "0.001",
                    "dispatch_usd": "0.00002",
                    "rate_version": "2026-10-20"
                  },
                  "billing_key_id": "key_BWBeN28Vb7cMEx7Ym8AUzs",
                  "generation": "1",
                  "next_instants": [
                    "2026-10-19T13:00:00.000Z",
                    "2026-10-20T13:00:00.000Z",
                    "2026-10-21T13:00:00.000Z"
                  ],
                  "erase_at": null,
                  "version": "1",
                  "created_at": "2026-10-17T09:00:00.000Z",
                  "updated_at": "2026-10-17T09:00:00.000Z",
                  "completed_at": null
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "`spending_limit`: the paying key's monthly limit refuses the charge; or `billing_required`: your team doesn't have a payment card.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency, deduplication, lease, state, or capacity conflict.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "412": {
            "description": "`precondition_failed`: the `If-Match` ETag is stale.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "428": {
            "description": "`If-Match` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/validate": {
      "post": {
        "operationId": "validate",
        "tags": [
          "Jobs"
        ],
        "summary": "Validate a job or schedule",
        "description": "Checks a job or schedule as its submission would, and answers its normalized parameters, its exact prices, a schedule's next ten scheduled times, and warnings. It doesn't store, send, or charge anything, and doesn't need an `Idempotency-Key`. Motor checks these constraints again when you submit the job or schedule.",
        "parameters": [
          {
            "$ref": "#/components/parameters/MotorMode"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Validation"
              },
              "example": {
                "job": {
                  "queue_id": "que_8Fq2RkV7xYz3LmN4pQs9Td",
                  "payload_base64": "e30=",
                  "max_attempts": 3
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The checked job or schedule.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ValidatedJob"
                    },
                    {
                      "$ref": "#/components/schemas/ValidatedSchedule"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body isn't JSON or is a duplicate-member object, or the `Idempotency-Key` is missing.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "The key is missing, invalid, or revoked.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The key can't use Scheduled jobs, is a publishable key, or the team is suspended.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The resource doesn't exist, or belongs to another team.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "413": {
            "description": "The body or payload is too large.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "415": {
            "description": "The body isn't `application/json`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "A field or the mode is invalid.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`.",
            "headers": {
              "Request-Id": {
                "description": "Motor's ID of the request, for support.",
                "schema": {
                  "type": "string"
                }
              },
              "Motor-Request-Id": {
                "description": "The same ID; a billed operation's charge uses it.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A secret key, `motor_sk_...`, that may use Scheduled jobs."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "description": "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`.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        }
      },
      "IfMatch": {
        "name": "If-Match",
        "in": "header",
        "required": true,
        "description": "The resource's ETag, `\"queues:{id}:{version}\"`. A missing header is `428 precondition_required`, and a stale one `412 precondition_failed`.",
        "schema": {
          "type": "string"
        }
      },
      "MotorMode": {
        "name": "Motor-Mode",
        "in": "header",
        "required": false,
        "description": "Scheduled jobs is live-only. Omit this header or send `live`; `test` gives `422 unsupported_mode` before anything else happens.",
        "schema": {
          "type": "string",
          "enum": [
            "live"
          ]
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Items per page: 1 to 100, 50 by default. A page also stops before 128 KiB.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        }
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "description": "The `next_cursor` of the previous page. It's bound to your team, the route, and its filters, works for an hour, and doesn't see items created after the first page.",
        "schema": {
          "type": "string"
        }
      },
      "QueueId": {
        "name": "queue_id",
        "in": "path",
        "required": true,
        "description": "`que_...`",
        "schema": {
          "type": "string"
        }
      },
      "JobId": {
        "name": "job_id",
        "in": "path",
        "required": true,
        "description": "`qjb_...`",
        "schema": {
          "type": "string"
        }
      },
      "ScheduleId": {
        "name": "schedule_id",
        "in": "path",
        "required": true,
        "description": "`qsc_...`",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Time": {
        "type": "string",
        "format": "date-time",
        "description": "UTC in RFC 3339, to the millisecond, such as `2026-10-17T09:00:00.000Z`."
      },
      "Money": {
        "type": "string",
        "pattern": "^[0-9]+\\.[0-9]{2,12}$",
        "description": "A decimal amount of US dollars, such as `0.00001`. Never a binary floating-point number."
      },
      "Version": {
        "type": "string",
        "pattern": "^[0-9]+$",
        "description": "A decimal version number."
      },
      "Metadata": {
        "type": "object",
        "maxProperties": 16,
        "additionalProperties": {
          "type": "string",
          "maxLength": 256
        },
        "description": "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."
      },
      "JsonValue": {
        "description": "Any JSON value."
      },
      "Problem": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "A stable code for programs, such as `capacity_exceeded`."
              },
              "message": {
                "type": "string",
                "description": "What happened and what to do, for people."
              },
              "retryable": {
                "type": "boolean",
                "description": "Whether a retry of the same request can succeed: true for `409 request_in_progress`, `429`, and `503`."
              },
              "retry_after_seconds": {
                "type": "integer",
                "description": "The seconds to wait before a retry, when known."
              },
              "resource_id": {
                "type": "string",
                "description": "The ID of the resource that the problem concerns, when your team owns it."
              },
              "limit": {
                "type": "string",
                "description": "The limit that a `capacity_exceeded` problem reached, such as `max_pending_jobs`."
              },
              "field": {
                "type": "string",
                "description": "The field that failed validation."
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Queue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "`que_...`"
          },
          "object": {
            "type": "string",
            "enum": [
              "queue"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "delivery": {
            "type": "string",
            "enum": [
              "http",
              "pull"
            ]
          },
          "ordering": {
            "type": "string",
            "enum": [
              "unordered",
              "fifo"
            ]
          },
          "concurrency": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "rate_per_second": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "paused": {
            "type": "boolean"
          },
          "pause_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why Motor paused the queue, such as `destination_gone` or `unsafe_destination`, or `null` for your pause."
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "destination": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The origin and path of an HTTP queue's destination. The full URL is write-only."
          },
          "destination_revision": {
            "$ref": "#/components/schemas/Version",
            "description": "One more for each change of the destination or its credentials."
          },
          "headers": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "An HTTP queue's custom headers. Values of names that look like credentials are `[redacted]`."
          },
          "has_authorization": {
            "type": "boolean"
          },
          "timeout_seconds": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 30
              },
              {
                "type": "null"
              }
            ]
          },
          "retry_delays_seconds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 86400
            },
            "maxItems": 9
          },
          "signing_secret_version": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_secret_expires_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "limits": {
            "type": "object",
            "properties": {
              "max_attempts": {
                "type": "integer",
                "description": "The maximum number of attempts per job: one more than the number of retry delays."
              },
              "default_attempts": {
                "type": "integer",
                "description": "The default number of attempts when a job omits `max_attempts`."
              },
              "max_payload_bytes": {
                "type": "integer"
              },
              "max_delivery_horizon_seconds": {
                "type": "integer"
              },
              "team_concurrency": {
                "type": "integer",
                "description": "Your team's attempts in flight at once."
              },
              "team_dispatch_rate": {
                "type": "integer",
                "description": "Your team's attempts per second."
              },
              "team_pending_jobs": {
                "type": "integer",
                "description": "The maximum number of unfinished jobs for your team."
              }
            },
            "required": [
              "max_attempts",
              "default_attempts",
              "max_payload_bytes",
              "max_delivery_horizon_seconds",
              "team_concurrency",
              "team_dispatch_rate",
              "team_pending_jobs"
            ],
            "additionalProperties": false
          },
          "counts": {
            "type": "object",
            "description": "Counts at `counted_at`; they're eventually consistent.",
            "properties": {
              "depth": {
                "type": "integer",
                "description": "Unfinished jobs without an active attempt."
              },
              "leased": {
                "type": "integer",
                "description": "Attempts in flight."
              },
              "oldest_due_age_seconds": {
                "type": "integer",
                "description": "Seconds since the oldest due job became due."
              },
              "counted_at": {
                "$ref": "#/components/schemas/Time"
              }
            },
            "required": [
              "depth",
              "leased",
              "oldest_due_age_seconds",
              "counted_at"
            ],
            "additionalProperties": false
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "created_at": {
            "$ref": "#/components/schemas/Time"
          },
          "updated_at": {
            "$ref": "#/components/schemas/Time"
          },
          "signing_secret": {
            "type": "string",
            "description": "The signing key, `whsec_...`. Only the creation of an HTTP queue and a rotation show it, once."
          }
        },
        "required": [
          "id",
          "object",
          "name",
          "delivery",
          "ordering",
          "concurrency",
          "rate_per_second",
          "paused",
          "pause_reason",
          "metadata",
          "destination",
          "destination_revision",
          "headers",
          "has_authorization",
          "timeout_seconds",
          "retry_delays_seconds",
          "signing_secret_version",
          "previous_secret_expires_at",
          "limits",
          "counts",
          "version",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "QueueList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Queue"
            }
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "QueueCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "delivery": {
            "type": "string",
            "enum": [
              "http",
              "pull"
            ],
            "description": "Immutable."
          },
          "ordering": {
            "type": "string",
            "enum": [
              "unordered",
              "fifo"
            ],
            "default": "unordered",
            "description": "Immutable."
          },
          "concurrency": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 10
          },
          "rate_per_second": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 10
          },
          "paused": {
            "type": "boolean",
            "default": false
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "destination_url": {
            "type": "string",
            "maxLength": 2048,
            "description": "HTTP queues only, and required for them: HTTPS on port 443 to a public host, without user information, a query, or a fragment."
          },
          "headers": {
            "type": "object",
            "maxProperties": 16,
            "additionalProperties": {
              "type": "string"
            },
            "description": "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": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 2048,
            "description": "HTTP queues only: the write-only `Authorization` value of each request. `null` clears it."
          },
          "timeout_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30,
            "default": 10
          },
          "retry_delays_seconds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 86400
            },
            "maxItems": 9,
            "default": [
              10,
              60,
              300
            ]
          }
        },
        "required": [
          "name",
          "delivery"
        ],
        "additionalProperties": false
      },
      "QueueUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "concurrency": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 10
          },
          "rate_per_second": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 10
          },
          "paused": {
            "type": "boolean",
            "default": false
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "destination_url": {
            "type": "string",
            "maxLength": 2048,
            "description": "HTTP queues only, and required for them: HTTPS on port 443 to a public host, without user information, a query, or a fragment."
          },
          "headers": {
            "type": "object",
            "maxProperties": 16,
            "additionalProperties": {
              "type": "string"
            },
            "description": "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": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 2048,
            "description": "HTTP queues only: the write-only `Authorization` value of each request. `null` clears it."
          },
          "timeout_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30,
            "default": 10
          },
          "retry_delays_seconds": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 86400
            },
            "maxItems": 9,
            "default": [
              10,
              60,
              300
            ]
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "QueueDeletion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "queue_deletion"
            ]
          },
          "deleted": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "deleted_at": {
            "$ref": "#/components/schemas/Time"
          },
          "cleanup": {
            "type": "string",
            "enum": [
              "pending"
            ]
          }
        },
        "required": [
          "id",
          "object",
          "deleted",
          "deleted_at",
          "cleanup"
        ],
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "`qjb_...`, the `webhook-id` of each attempt."
          },
          "object": {
            "type": "string",
            "enum": [
              "job"
            ]
          },
          "queue_id": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "queued",
              "leased",
              "retry_wait",
              "blocked",
              "succeeded",
              "dead",
              "canceled",
              "expired"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the job is blocked or finished, such as `attempts_exhausted`, `budget_exhausted`, `deadline_passed`, `destination_gone`, `http_404`, `billing_limit`, or `key_revoked`."
          },
          "waiting_reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why a waiting job waits, such as `queue_paused`, `fifo_blocked`, `queue_rate`, or `team_concurrency`."
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "not_before": {
            "$ref": "#/components/schemas/Time"
          },
          "due_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When a waiting job can next be claimed, or `null` while it waits for its FIFO group or a concurrency slot."
          },
          "deadline_at": {
            "$ref": "#/components/schemas/Time"
          },
          "attempt_count": {
            "type": "integer"
          },
          "max_attempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "affordable_attempts": {
            "type": "integer",
            "description": "The number of attempts the dispatch budget permits, capped at `max_attempts`."
          },
          "retry_delays_seconds": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "timeout_seconds": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "lease_until": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_type": {
            "type": "string"
          },
          "payload_bytes": {
            "type": "integer"
          },
          "payload_sha256": {
            "type": "string"
          },
          "payload_retained": {
            "type": "boolean"
          },
          "payload_expires_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "group_sequence": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Version"
              },
              {
                "type": "null"
              }
            ]
          },
          "deduplication_key": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "deduplication_expires_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          },
          "submitted_by": {
            "type": "object",
            "properties": {
              "key_id": {
                "type": "string"
              },
              "principal_id": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "key_id",
              "principal_id"
            ],
            "additionalProperties": false
          },
          "billing_key_id": {
            "type": "string",
            "description": "The key that pays future charges."
          },
          "attribution": {
            "type": "string",
            "enum": [
              "direct",
              "bundled",
              "platform"
            ]
          },
          "replay_of": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule_id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduled_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancel_requested": {
            "type": "boolean"
          },
          "last_outcome": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "succeeded",
                  "failed",
                  "retryable",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The outcome of the last attempt. `unknown` means its effect may have happened."
          },
          "last_error_code": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "retryable": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "destination_revision": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Version"
              },
              {
                "type": "null"
              }
            ]
          },
          "cost": {
            "type": "object",
            "properties": {
              "unit_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "charged_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "max_cost_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "remaining_max_cost_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "rate_version": {
                "type": "string"
              }
            },
            "required": [
              "unit_usd",
              "charged_usd",
              "max_cost_usd",
              "remaining_max_cost_usd",
              "rate_version"
            ],
            "additionalProperties": false
          },
          "deleted": {
            "type": "boolean"
          },
          "deleted_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "terminal_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/Time"
          },
          "updated_at": {
            "$ref": "#/components/schemas/Time"
          },
          "deduplicated": {
            "type": "boolean",
            "description": "In a submission's answer: whether it returned the original job of its `deduplication_key`."
          },
          "result": {
            "$ref": "#/components/schemas/JsonValue",
            "description": "In `GET /jobs/{job_id}`: the compact JSON result of a pull acknowledgment or a handler, or `null`."
          },
          "payload_base64": {
            "type": "string",
            "description": "With `include_payload=true`: the payload."
          }
        },
        "required": [
          "id",
          "object",
          "queue_id",
          "state",
          "reason",
          "waiting_reason",
          "version",
          "not_before",
          "due_at",
          "deadline_at",
          "attempt_count",
          "max_attempts",
          "affordable_attempts",
          "retry_delays_seconds",
          "timeout_seconds",
          "lease_until",
          "content_type",
          "payload_bytes",
          "payload_sha256",
          "payload_retained",
          "payload_expires_at",
          "group_id",
          "group_sequence",
          "deduplication_key",
          "deduplication_expires_at",
          "metadata",
          "submitted_by",
          "billing_key_id",
          "attribution",
          "replay_of",
          "schedule_id",
          "scheduled_at",
          "cancel_requested",
          "last_outcome",
          "last_error_code",
          "retryable",
          "destination_revision",
          "cost",
          "deleted",
          "deleted_at",
          "terminal_at",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "JobList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "Attempt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "`qat_...`, the `Motor-Attempt-Id` header."
          },
          "object": {
            "type": "string",
            "enum": [
              "attempt"
            ]
          },
          "job_id": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "delivery": {
            "type": "string",
            "enum": [
              "http",
              "pull",
              "internal"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "retryable",
              "unknown"
            ]
          },
          "http_status": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_code": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "response_headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "The response's `content-type`, `retry-after`, and `x-request-id`, at most 2 KiB. Motor never keeps response bodies."
          },
          "destination_revision": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Version"
              },
              {
                "type": "null"
              }
            ]
          },
          "destination_host": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "$ref": "#/components/schemas/Time"
          },
          "lease_until": {
            "$ref": "#/components/schemas/Time"
          },
          "finished_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "charged_usd": {
            "$ref": "#/components/schemas/Money"
          },
          "late_evidence": {
            "type": "boolean",
            "description": "Whether a result arrived after the attempt was settled as unknown."
          }
        },
        "required": [
          "id",
          "object",
          "job_id",
          "number",
          "delivery",
          "outcome",
          "http_status",
          "error_code",
          "response_headers",
          "destination_revision",
          "destination_host",
          "started_at",
          "lease_until",
          "finished_at",
          "duration_ms",
          "charged_usd",
          "late_evidence"
        ],
        "additionalProperties": false
      },
      "AttemptList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attempt"
            }
          },
          "next_cursor": {
            "type": "null"
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "JobSubmit": {
        "type": "object",
        "properties": {
          "queue_id": {
            "type": "string"
          },
          "payload_base64": {
            "type": "string",
            "description": "Standard Base64 of at most 64 KiB of bytes. Motor sends these exact bytes."
          },
          "content_type": {
            "type": "string",
            "default": "application/json",
            "description": "`application/json` (the payload must be valid JSON), `text/plain` (UTF-8), or `application/octet-stream`; text types may add `; charset=utf-8`."
          },
          "not_before": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Time"
              }
            ],
            "description": "When the job may start: now by default, at most 7 days away, never in the past."
          },
          "deadline_at": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Time"
              }
            ],
            "description": "When new attempts stop: 24 hours from now by default, after `not_before`, at most 7 days away."
          },
          "max_attempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "description": "The attempts, the first included: at most one more than the queue's retry delays, 4 or fewer by default."
          },
          "max_cost_usd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "The maximum dispatch cost: `max_attempts` × $0.00002 by default. It must cover the admission; a smaller budget lowers `affordable_attempts`."
          },
          "group_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Required on fifo queues, refused on unordered ones."
          },
          "deduplication_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "description": "Returns the original job for the same input in this queue for 7 days."
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        },
        "required": [
          "queue_id",
          "payload_base64"
        ],
        "additionalProperties": false
      },
      "JobBatch": {
        "type": "object",
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobSubmit"
            },
            "minItems": 1,
            "maxItems": 10
          }
        },
        "required": [
          "jobs"
        ],
        "additionalProperties": false
      },
      "JobBatchResult": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          },
          "total_cost_usd": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "required": [
          "items",
          "total_cost_usd"
        ],
        "additionalProperties": false
      },
      "JobReplay": {
        "type": "object",
        "properties": {
          "queue_id": {
            "type": "string",
            "description": "Another queue of your team. The job's group joins a fifo queue's group; an unordered queue drops it."
          },
          "not_before": {
            "$ref": "#/components/schemas/Time"
          },
          "deadline_at": {
            "$ref": "#/components/schemas/Time"
          },
          "max_attempts": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "max_cost_usd": {
            "$ref": "#/components/schemas/Money"
          },
          "allow_duplicate_effects": {
            "type": "boolean",
            "default": false,
            "description": "Required when an attempt's outcome was unknown."
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Empty": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "JobDeletion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "job_deletion"
            ]
          },
          "deleted": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "deleted_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "scheduled",
              "queued",
              "leased",
              "retry_wait",
              "blocked",
              "succeeded",
              "dead",
              "canceled",
              "expired"
            ]
          },
          "erasure_state": {
            "type": "string",
            "enum": [
              "complete",
              "pending"
            ],
            "description": "`pending` while an active attempt finishes."
          }
        },
        "required": [
          "id",
          "object",
          "deleted",
          "deleted_at",
          "state",
          "erasure_state"
        ],
        "additionalProperties": false
      },
      "LeaseRequest": {
        "type": "object",
        "properties": {
          "max_jobs": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 1
          },
          "lease_seconds": {
            "type": "integer",
            "minimum": 10,
            "maximum": 300,
            "default": 60
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "Lease": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/Job"
          },
          "attempt_id": {
            "type": "string"
          },
          "attempt_number": {
            "type": "integer"
          },
          "receipt": {
            "type": "string",
            "description": "`qlr_...`: the secret that settles the lease, with the key that leased it."
          },
          "lease_until": {
            "$ref": "#/components/schemas/Time"
          },
          "payload_base64": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "content_type": {
            "type": "string"
          }
        },
        "required": [
          "job",
          "attempt_id",
          "attempt_number",
          "receipt",
          "lease_until",
          "payload_base64",
          "content_type"
        ],
        "additionalProperties": false
      },
      "LeaseGrant": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Lease"
            },
            "maxItems": 10
          },
          "retry_after_seconds": {
            "type": "integer",
            "description": "With no items: the seconds to wait before the next poll."
          },
          "blocked_count": {
            "type": "integer",
            "description": "Due retries that the paying key couldn't afford: they're blocked."
          }
        },
        "required": [
          "items",
          "retry_after_seconds",
          "blocked_count"
        ],
        "additionalProperties": false
      },
      "Heartbeat": {
        "type": "object",
        "properties": {
          "receipt": {
            "type": "string"
          },
          "extend_seconds": {
            "type": "integer",
            "minimum": 10,
            "maximum": 300,
            "default": 60
          }
        },
        "required": [
          "receipt"
        ],
        "additionalProperties": false
      },
      "HeartbeatResult": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string"
          },
          "attempt_id": {
            "type": "string"
          },
          "lease_until": {
            "$ref": "#/components/schemas/Time"
          },
          "extended": {
            "type": "boolean"
          },
          "cancel_requested": {
            "type": "boolean"
          }
        },
        "required": [
          "job_id",
          "attempt_id",
          "lease_until",
          "extended",
          "cancel_requested"
        ],
        "additionalProperties": false
      },
      "Ack": {
        "type": "object",
        "properties": {
          "receipt": {
            "type": "string"
          },
          "result": {
            "$ref": "#/components/schemas/JsonValue",
            "description": "Any JSON value, at most 4 KiB compact."
          }
        },
        "required": [
          "receipt"
        ],
        "additionalProperties": false
      },
      "Nack": {
        "type": "object",
        "properties": {
          "receipt": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "error_code": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.-]{1,64}$"
          }
        },
        "required": [
          "receipt",
          "retryable"
        ],
        "additionalProperties": false
      },
      "Schedule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "`qsc_...`"
          },
          "object": {
            "type": "string",
            "enum": [
              "schedule"
            ]
          },
          "queue_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "blocked",
              "completed"
            ]
          },
          "reason": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the schedule is blocked or completed, such as `billing_limit`, `capacity`, `renewal_missed`, `ended`, `max_occurrences`, or `budget_exhausted`."
          },
          "template": {
            "type": "object",
            "properties": {
              "content_type": {
                "type": "string"
              },
              "payload_bytes": {
                "type": "integer"
              },
              "payload_sha256": {
                "type": "string"
              },
              "payload_retained": {
                "type": "boolean"
              },
              "group_id": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              },
              "max_attempts": {
                "type": "integer"
              },
              "max_cost_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "deadline_seconds": {
                "type": "integer"
              }
            },
            "required": [
              "content_type",
              "payload_bytes",
              "payload_sha256",
              "payload_retained",
              "group_id",
              "metadata",
              "max_attempts",
              "max_cost_usd",
              "deadline_seconds"
            ],
            "additionalProperties": false
          },
          "cron": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The canonical five-field expression."
          },
          "timezone": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "interval_seconds": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "start_at": {
            "$ref": "#/components/schemas/Time"
          },
          "end_at": {
            "$ref": "#/components/schemas/Time"
          },
          "paused": {
            "type": "boolean"
          },
          "misfire_policy": {
            "type": "string",
            "enum": [
              "skip",
              "latest",
              "catch_up"
            ]
          },
          "overlap_policy": {
            "type": "string",
            "enum": [
              "allow",
              "skip"
            ]
          },
          "max_total_cost_usd": {
            "$ref": "#/components/schemas/Money"
          },
          "max_occurrences": {
            "type": "integer"
          },
          "occurrences": {
            "type": "integer"
          },
          "skipped": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer"
              },
              "last_at": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_reason": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "count",
              "last_at",
              "last_reason"
            ],
            "additionalProperties": false
          },
          "budget": {
            "type": "object",
            "description": "Schedule-days and finished jobs' charges, and what unfinished jobs can still cost.",
            "properties": {
              "spent_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "reserved_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "remaining_usd": {
                "$ref": "#/components/schemas/Money"
              }
            },
            "required": [
              "spent_usd",
              "reserved_usd",
              "remaining_usd"
            ],
            "additionalProperties": false
          },
          "periods": {
            "type": "integer"
          },
          "paid_until": {
            "$ref": "#/components/schemas/Time"
          },
          "rates": {
            "type": "object",
            "properties": {
              "schedule_day_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "dispatch_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "rate_version": {
                "type": "string"
              }
            },
            "required": [
              "schedule_day_usd",
              "dispatch_usd",
              "rate_version"
            ],
            "additionalProperties": false
          },
          "billing_key_id": {
            "type": "string"
          },
          "generation": {
            "$ref": "#/components/schemas/Version"
          },
          "next_instants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Time"
            },
            "maxItems": 10
          },
          "erase_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          },
          "version": {
            "$ref": "#/components/schemas/Version"
          },
          "created_at": {
            "$ref": "#/components/schemas/Time"
          },
          "updated_at": {
            "$ref": "#/components/schemas/Time"
          },
          "completed_at": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "queue_id",
          "status",
          "reason",
          "template",
          "cron",
          "timezone",
          "interval_seconds",
          "start_at",
          "end_at",
          "paused",
          "misfire_policy",
          "overlap_policy",
          "max_total_cost_usd",
          "max_occurrences",
          "occurrences",
          "skipped",
          "budget",
          "periods",
          "paid_until",
          "rates",
          "billing_key_id",
          "generation",
          "next_instants",
          "erase_at",
          "version",
          "created_at",
          "updated_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "ScheduleList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Schedule"
            }
          },
          "next_cursor": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ScheduleCreate": {
        "type": "object",
        "properties": {
          "queue_id": {
            "type": "string"
          },
          "template": {
            "type": "object",
            "properties": {
              "payload_base64": {
                "type": "string",
                "description": "At most 64 KiB decoded."
              },
              "content_type": {
                "type": "string",
                "default": "application/json"
              },
              "group_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "Required for a fifo queue."
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              },
              "max_attempts": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              },
              "max_cost_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "deadline_seconds": {
                "type": "integer",
                "minimum": 60,
                "maximum": 604800,
                "default": 86400,
                "description": "Each job's deadline after its scheduled instant."
              }
            },
            "required": [
              "payload_base64"
            ],
            "additionalProperties": false
          },
          "cron": {
            "type": "string",
            "description": "Five fields or a macro such as `@daily`. Exactly one of `cron` and `interval_seconds`."
          },
          "interval_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 604800
          },
          "timezone": {
            "type": "string",
            "default": "UTC",
            "description": "An IANA time zone, for cron only."
          },
          "start_at": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Time"
              }
            ],
            "description": "Now by default. An interval counts from it."
          },
          "end_at": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Time"
              }
            ],
            "description": "Must be after `start_at` and no more than 366 days after schedule creation."
          },
          "paused": {
            "type": "boolean",
            "default": false
          },
          "misfire_policy": {
            "type": "string",
            "enum": [
              "skip",
              "latest",
              "catch_up"
            ],
            "default": "skip"
          },
          "overlap_policy": {
            "type": "string",
            "enum": [
              "allow",
              "skip"
            ],
            "default": "allow"
          },
          "max_total_cost_usd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "The maximum combined cost of dispatch and schedule-days: at least $0.001."
          },
          "max_occurrences": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "default": 1000000
          }
        },
        "required": [
          "queue_id",
          "template",
          "end_at",
          "max_total_cost_usd"
        ],
        "additionalProperties": false
      },
      "ScheduleUpdate": {
        "type": "object",
        "properties": {
          "template": {
            "type": "object",
            "properties": {
              "payload_base64": {
                "type": "string",
                "description": "At most 64 KiB decoded."
              },
              "content_type": {
                "type": "string",
                "default": "application/json"
              },
              "group_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "description": "Required for a fifo queue."
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              },
              "max_attempts": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              },
              "max_cost_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "deadline_seconds": {
                "type": "integer",
                "minimum": 60,
                "maximum": 604800,
                "default": 86400,
                "description": "Each job's deadline after its scheduled instant."
              }
            },
            "required": [
              "payload_base64"
            ],
            "additionalProperties": false
          },
          "cron": {
            "type": "string",
            "description": "Five fields or a macro such as `@daily`. Exactly one of `cron` and `interval_seconds`."
          },
          "interval_seconds": {
            "type": "integer",
            "minimum": 60,
            "maximum": 604800
          },
          "timezone": {
            "type": "string",
            "default": "UTC",
            "description": "An IANA time zone, for cron only."
          },
          "start_at": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Time"
              }
            ],
            "description": "The interval anchor. Omit it to keep the current start time."
          },
          "end_at": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Time"
              }
            ],
            "description": "Must be after `start_at` and no more than 366 days after schedule creation."
          },
          "paused": {
            "type": "boolean",
            "default": false
          },
          "misfire_policy": {
            "type": "string",
            "enum": [
              "skip",
              "latest",
              "catch_up"
            ],
            "default": "skip"
          },
          "overlap_policy": {
            "type": "string",
            "enum": [
              "allow",
              "skip"
            ],
            "default": "allow"
          },
          "max_total_cost_usd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "The maximum combined cost of dispatch and schedule-days: at least $0.001."
          },
          "max_occurrences": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "default": 1000000
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "ScheduleDeletion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "schedule_deletion"
            ]
          },
          "deleted": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "deleted_at": {
            "$ref": "#/components/schemas/Time"
          },
          "cancel_pending": {
            "type": "boolean"
          },
          "canceled_jobs": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "object",
          "deleted",
          "deleted_at",
          "cancel_pending",
          "canceled_jobs"
        ],
        "additionalProperties": false
      },
      "Validation": {
        "type": "object",
        "description": "Exactly one of `job` and `schedule`.",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/JobSubmit"
          },
          "schedule": {
            "$ref": "#/components/schemas/ScheduleCreate"
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "ValidatedJob": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "job"
            ]
          },
          "valid": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "normalized": {
            "type": "object",
            "properties": {
              "queue_id": {
                "type": "string"
              },
              "content_type": {
                "type": "string"
              },
              "payload_bytes": {
                "type": "integer"
              },
              "payload_sha256": {
                "type": "string"
              },
              "not_before": {
                "$ref": "#/components/schemas/Time"
              },
              "deadline_at": {
                "$ref": "#/components/schemas/Time"
              },
              "max_attempts": {
                "type": "integer"
              },
              "affordable_attempts": {
                "type": "integer"
              },
              "max_cost_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "group_id": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "deduplication_key": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "metadata": {
                "$ref": "#/components/schemas/Metadata"
              }
            },
            "required": [
              "queue_id",
              "content_type",
              "payload_bytes",
              "payload_sha256",
              "not_before",
              "deadline_at",
              "max_attempts",
              "affordable_attempts",
              "max_cost_usd",
              "group_id",
              "deduplication_key",
              "metadata"
            ],
            "additionalProperties": false
          },
          "price": {
            "type": "object",
            "properties": {
              "unit_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "initial_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "maximum_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "rate_version": {
                "type": "string"
              }
            },
            "required": [
              "unit_usd",
              "initial_usd",
              "maximum_usd",
              "rate_version"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "fifo_blocking",
                "ambiguous_retry_possible"
              ]
            }
          }
        },
        "required": [
          "kind",
          "valid",
          "normalized",
          "price",
          "warnings"
        ],
        "additionalProperties": false
      },
      "ValidatedSchedule": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "schedule"
            ]
          },
          "valid": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "normalized": {
            "type": "object",
            "properties": {
              "queue_id": {
                "type": "string"
              },
              "cron": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "timezone": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "interval_seconds": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Version"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "start_at": {
                "$ref": "#/components/schemas/Time"
              },
              "end_at": {
                "$ref": "#/components/schemas/Time"
              },
              "paused": {
                "type": "boolean"
              },
              "misfire_policy": {
                "type": "string"
              },
              "overlap_policy": {
                "type": "string"
              },
              "max_total_cost_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "max_occurrences": {
                "type": "integer"
              },
              "template_max_attempts": {
                "type": "integer"
              },
              "template_max_cost_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "template_deadline_seconds": {
                "type": "integer"
              }
            },
            "required": [
              "queue_id",
              "cron",
              "timezone",
              "interval_seconds",
              "start_at",
              "end_at",
              "paused",
              "misfire_policy",
              "overlap_policy",
              "max_total_cost_usd",
              "max_occurrences",
              "template_max_attempts",
              "template_max_cost_usd",
              "template_deadline_seconds"
            ],
            "additionalProperties": false
          },
          "next_instants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Time"
            },
            "maxItems": 10
          },
          "price": {
            "type": "object",
            "properties": {
              "creation_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "schedule_day_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "occurrence_initial_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "occurrence_maximum_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "max_total_usd": {
                "$ref": "#/components/schemas/Money"
              },
              "rate_version": {
                "type": "string"
              }
            },
            "required": [
              "creation_usd",
              "schedule_day_usd",
              "occurrence_initial_usd",
              "occurrence_maximum_usd",
              "max_total_usd",
              "rate_version"
            ],
            "additionalProperties": false
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "fifo_blocking",
                "ambiguous_retry_possible"
              ]
            }
          }
        },
        "required": [
          "kind",
          "valid",
          "normalized",
          "next_instants",
          "price",
          "warnings"
        ],
        "additionalProperties": false
      }
    }
  }
}
