{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robowrite-ai/json-schema/robowrite-ai-public-job-status-schema.json",
  "title": "PublicJobStatus",
  "description": "Job poll result. ``content_item_id`` populates once the run targets or\ncreates an item. Reads persisted job state only (no live backend sync on\nread). Failed jobs may include ``error`` and machine-readable ``error_type``.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robowrite-ai-openapi.yml#/components/schemas/PublicJobStatus",
  "properties": {
    "brand_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Brand Id"
    },
    "brief_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Brief Id"
    },
    "content_item_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content Item Id"
    },
    "content_version_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content Version Id"
    },
    "created_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At"
    },
    "elapsed_seconds": {
      "anyOf": [
        {
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Elapsed Seconds"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "error_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Type"
    },
    "finished_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Finished At"
    },
    "generation_warnings": {
      "items": {
        "$ref": "#/$defs/PublicGenerationWarning"
      },
      "title": "Generation Warnings",
      "type": "array"
    },
    "job_id": {
      "format": "uuid",
      "title": "Job Id",
      "type": "string"
    },
    "kit_confidence": {
      "anyOf": [
        {
          "maximum": 1,
          "minimum": 0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kit Confidence"
    },
    "kit_revision": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kit Revision"
    },
    "kit_status": {
      "anyOf": [
        {
          "$ref": "#/$defs/ContentKitStatus"
        },
        {
          "type": "null"
        }
      ]
    },
    "property_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Property Id"
    },
    "queued_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Queued At"
    },
    "result": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Result"
    },
    "review_holds": {
      "items": {
        "$ref": "#/$defs/PublicReviewHold"
      },
      "title": "Review Holds",
      "type": "array"
    },
    "review_reasons": {
      "items": {
        "$ref": "#/$defs/ArticleV2ReviewReason"
      },
      "title": "Review Reasons",
      "type": "array"
    },
    "started_at": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "status": {
      "$ref": "#/$defs/JobStatus"
    },
    "type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Stored job-type name, preserved verbatim including retired types.",
      "title": "Type"
    }
  },
  "required": [
    "job_id",
    "status"
  ],
  "type": "object",
  "$defs": {
    "ArticleV2ReviewReason": {
      "description": "Why a v2 run or draft needs a person.",
      "enum": [
        "held_for_review",
        "review_expired",
        "checker_review_hold"
      ],
      "title": "ArticleV2ReviewReason",
      "type": "string"
    },
    "ContentKitStatus": {
      "enum": [
        "draft",
        "needs_review",
        "approved"
      ],
      "title": "ContentKitStatus",
      "type": "string"
    },
    "JobStatus": {
      "description": "Status of a background job.\n\nTerminal states: ``completed``, ``completed_with_errors``, ``failed``,\n``cancelled``. Active (in-progress) states: ``queued``, ``running``.\n\n``awaiting_review`` is a third class: not terminal (work may resume after a\nhuman action) and not active (no automatic progress is being made). Pollers\nshould treat it as stop-and-review rather than keep waiting for a terminal\nstatus. It is intentionally in neither ``is_terminal`` nor ``is_active``.",
      "enum": [
        "pending",
        "queued",
        "running",
        "awaiting_review",
        "completed",
        "completed_with_errors",
        "failed",
        "cancelled"
      ],
      "title": "JobStatus",
      "type": "string"
    },
    "PublicGenerationWarning": {
      "description": "Public code and stage of a recorded generation warning.",
      "properties": {
        "code": {
          "title": "Code",
          "type": "string"
        },
        "stage": {
          "title": "Stage",
          "type": "string"
        }
      },
      "required": [
        "code",
        "stage"
      ],
      "title": "PublicGenerationWarning",
      "type": "object"
    },
    "PublicReviewHold": {
      "description": "One finding that held a saved draft for review.\n\nkind is the finding kind, for example cite_lint, drift_h2_missing or a\nbrief_ rubric kind. text names what to check. For cite_lint it starts\nwith the source-page reason (fetch_failed, not_on_page, ineligible,\nnot_public or budget_exhausted), followed by the citing sentence and the\nURL.",
      "properties": {
        "kind": {
          "title": "Kind",
          "type": "string"
        },
        "text": {
          "title": "Text",
          "type": "string"
        }
      },
      "required": [
        "kind",
        "text"
      ],
      "title": "PublicReviewHold",
      "type": "object"
    }
  }
}