{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dotsy-ai/json-schema/dotsy-ai-job-schema.json",
  "title": "Job",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dotsy-ai-jobs-api-openapi.yml#/components/schemas/Job",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Public job id. Poll GET /api/v1/sites/{slug}/jobs/{id}."
    },
    "kind": {
      "type": "string",
      "enum": [
        "import",
        "content",
        "rename"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed"
      ]
    },
    "progress": {
      "type": "object",
      "properties": {
        "done": {
          "type": "number"
        },
        "total": {
          "type": "number"
        }
      },
      "required": [
        "done",
        "total"
      ]
    },
    "result": {
      "type": "object",
      "additionalProperties": {}
    },
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "`job_failed`, or the limit the job hit (`page_limit_reached`, `storage_limit_reached`) with the fields below."
        },
        "message": {
          "type": "string"
        },
        "hint": {
          "type": "string",
          "description": "A limit failure: what to do next (same text as `message`)."
        },
        "limit": {
          "type": "string",
          "enum": [
            "storage",
            "pages"
          ],
          "description": "A limit failure: which limit."
        },
        "plan": {
          "type": "string",
          "description": "A limit failure: the site's plan (`free` or `paid` today; workspace plan ids later)."
        },
        "used": {
          "type": "number",
          "description": "A limit failure: pages or bytes already used."
        },
        "max": {
          "type": "number",
          "description": "A limit failure: the site's limit."
        },
        "incoming": {
          "type": "number",
          "description": "A limit failure: what the job would have added (net new pages, or bytes)."
        },
        "partial": {
          "type": "boolean",
          "description": "A limit failure: `used` is a floor (the page count was not complete)."
        }
      },
      "required": [
        "code"
      ]
    }
  },
  "required": [
    "id",
    "kind",
    "status"
  ]
}