{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scriptivox-com/json-schema/scriptivox-com-service-status-schema.json",
  "title": "ServiceStatus",
  "description": "What GET /v1/status returns. Every field is always present; the ones that cannot be known while `status` is `unknown` are null, never an empty list.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scriptivox-com-openapi.json#/components/schemas/ServiceStatus",
  "type": "object",
  "required": [
    "status",
    "accepting_new_jobs",
    "maintenance",
    "still_working",
    "upcoming",
    "checked_at",
    "status_page"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "operational",
        "maintenance",
        "unknown"
      ],
      "description": "`operational`: nothing that can stop an API call is paused. `maintenance`: something is paused, see `maintenance`. `unknown`: the state could not be checked just now; this does not mean the API is down."
    },
    "accepting_new_jobs": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether POST /v1/upload and POST /v1/transcribe take new jobs right now. Still true while only links to video sites are paused (scope `link`): uploads and file addresses are taken. null when `status` is `unknown`."
    },
    "maintenance": {
      "type": [
        "object",
        "null"
      ],
      "description": "What is paused, when `status` is `maintenance`; otherwise null.",
      "required": [
        "paused",
        "retry_after_seconds"
      ],
      "properties": {
        "paused": {
          "type": "array",
          "description": "One entry per pause that stops an API call. Two can be on at once, each with its own message.",
          "items": {
            "$ref": "#/$defs/ServiceStatusPause"
          }
        },
        "retry_after_seconds": {
          "type": "integer",
          "description": "How long to wait before sending a paused request again: the same seconds as the `Retry-After` of its 503. With two pauses, the sooner of their waits."
        }
      }
    },
    "still_working": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Every operation still taking calls, as \"METHOD /path\" (reading, listing, cancelling and deleting jobs, the balance, webhooks and feedback are paused only by full maintenance, when this list is empty). An operation a pause stops only in part is listed here too: `POST /v1/transcribe` while only links to video sites are paused. Jobs already accepted always finish. null when `status` is `unknown`."
    },
    "upcoming": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/ServiceStatusWindow"
      },
      "description": "Planned maintenance that has not started yet, soonest first (at most 5). Each one pauses new jobs from its start. null when the plan could not be read just now."
    },
    "checked_at": {
      "type": "string",
      "format": "date-time",
      "description": "When the state was read. The answer can be a few seconds old, so this can be a little in the past."
    },
    "status_page": {
      "type": "string",
      "format": "uri",
      "description": "The public status page, with uptime and incident history."
    }
  },
  "$defs": {
    "ServiceStatusPause": {
      "type": "object",
      "title": "ServiceStatusPause",
      "description": "One pause that stops an API call.",
      "required": [
        "scope",
        "name",
        "message",
        "routes",
        "back_by"
      ],
      "properties": {
        "scope": {
          "type": "string",
          "description": "What is paused, as a 503 MAINTENANCE names it in `error.scope`: `upload` (new jobs and uploads), `link` (a `url` to a video site on POST /v1/transcribe; uploads and other file addresses carry on) or `global` (site-wide maintenance, or full maintenance, which stops every operation: then `routes` names them all). New values may be added."
        },
        "name": {
          "type": "string",
          "description": "What is paused, in plain words."
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "The message we wrote when we paused it, or null."
        },
        "routes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The operations it stops, as \"METHOD /path\": wholly, or for scope `link` only the calls with a link to a video site (`name` says which; the operation then stays in `still_working`)."
        },
        "back_by": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When we expect this pause to end, if we set a time (ISO 8601, UTC); otherwise null. A time that has passed is never given. It is a plan: `status` says when the pause is really over."
        }
      }
    },
    "ServiceStatusWindow": {
      "type": "object",
      "title": "ServiceStatusWindow",
      "description": "Planned maintenance that has not started yet.",
      "required": [
        "title",
        "message",
        "starts_at",
        "ends_at"
      ],
      "properties": {
        "title": {
          "type": "string",
          "description": "What the maintenance is."
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "More about it, or null."
        },
        "starts_at": {
          "type": "string",
          "format": "date-time",
          "description": "When it starts. New jobs are paused from then."
        },
        "ends_at": {
          "type": "string",
          "format": "date-time",
          "description": "When it is planned to end. Work can run over: `status` says when it is really over."
        }
      }
    }
  }
}