# Get job status (/docs/api/jobs/getJob)

## OpenAPI

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Pagelet API",
    "version": "0.0.0",
    "description": "Upload documents, follow processing, and retrieve or search their content using an API key."
  },
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Send your API key in the Authorization header: Bearer <api_key>."
      }
    },
    "schemas": {
      "ApiErrorCode": {
        "type": "string",
        "enum": [
          "invalid_request",
          "unauthorized",
          "forbidden",
          "tenant_inactive",
          "not_found",
          "idempotency_conflict",
          "idempotency_key_expired",
          "upload_object_missing",
          "upload_expired",
          "upload_empty",
          "upload_not_confirmable",
          "result_not_ready",
          "classification_not_ready",
          "classification_in_progress",
          "upload_too_large",
          "capacity_exceeded",
          "tenant_page_allowance_exceeded",
          "api_key_limit_reached",
          "member_limit_reached",
          "membership_removal_pending",
          "invitation_changed",
          "tenant_membership_exists",
          "webhook_not_configured",
          "webhook_signing_unavailable",
          "storage_unavailable",
          "search_unavailable",
          "billing_unavailable",
          "billing_idempotency_conflict",
          "plan_change_unavailable",
          "requires_payment_method",
          "requires_action",
          "internal_error"
        ],
        "description": "A code identifying why the request failed."
      },
      "ApiErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "$ref": "#/components/schemas/ApiErrorCode"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string"
                  },
                  "issues": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/ApiValidationIssue"
                    }
                  }
                },
                "required": [
                  "request_id"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "code",
              "message",
              "details"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false,
        "description": "Error response. Include details.request_id when reporting a problem. Validation errors may include details.issues."
      },
      "ApiValidationIssue": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "message"
        ],
        "additionalProperties": false
      },
      "ClassificationReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed"
            ]
          }
        },
        "required": [
          "id",
          "status"
        ],
        "additionalProperties": false
      },
      "ClassificationResponse": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed"
            ]
          },
          "document_id": {
            "type": "string",
            "description": "Null until upload confirmation creates the Document."
          },
          "schema": {
            "$ref": "#/components/schemas/ClassificationSchema"
          },
          "categories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Null until completed. An empty array is a successful classification with no matches."
          },
          "evaluated_pages": {
            "type": "array",
            "items": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "description": "Original page numbers evaluated. Sampled or partially recovered content cannot establish categories on other pages."
          },
          "detail": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "classification_failed",
                  "classification_content_unavailable",
                  "classification_input_too_large"
                ]
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "document_id",
          "schema",
          "categories",
          "evaluated_pages",
          "detail",
          "created_at",
          "updated_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "ClassificationSchema": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "category": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "criteria": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1000
              },
              "minItems": 1,
              "maxItems": 10
            }
          },
          "required": [
            "category",
            "criteria"
          ],
          "additionalProperties": false
        },
        "minItems": 1,
        "maxItems": 20
      },
      "CreateUploadRequest": {
        "type": "object",
        "properties": {
          "filename": {
            "$ref": "#/components/schemas/Filename"
          },
          "classification": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "category": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "criteria": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "minItems": 1,
                  "maxItems": 10
                }
              },
              "required": [
                "category",
                "criteria"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 20,
            "description": "Omit to use the workspace default classification, or send null to skip classification for this document. An array overrides the default. Without supplied or saved criteria, only content recovery runs."
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "maxLength": 2048,
                "format": "uri"
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false,
            "description": "Omit to use the workspace default webhook, or send null to disable delivery for this document. A URL overrides the default and requires webhook signing to be configured."
          },
          "metadata": {
            "type": "object",
            "properties": {
              "external_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Your identifier for this document. Surrounding whitespace is removed; case is preserved.",
                "example": "statement-2026-09"
              },
              "external_group_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Your identifier for a group of related documents. Surrounding whitespace is removed; case is preserved.",
                "example": "account-42"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "filename"
        ],
        "additionalProperties": false
      },
      "CreateUploadResponse": {
        "type": "object",
        "properties": {
          "upload_id": {
            "type": "string",
            "description": "Upload ID returned by upload creation.",
            "example": "upl_01j00000000000000000000000"
          },
          "job_id": {
            "type": "string"
          },
          "upload": {
            "$ref": "#/components/schemas/UploadInstructions"
          }
        },
        "required": [
          "upload_id",
          "job_id",
          "upload"
        ],
        "additionalProperties": false
      },
      "DocumentDetailResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "waiting_for_upload",
              "validating",
              "processing",
              "completed",
              "completed_with_warnings",
              "failed",
              "rejected"
            ]
          },
          "progress": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "pages_total": {
                "type": "integer",
                "minimum": 0
              },
              "pages_completed": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "pages_total",
              "pages_completed"
            ],
            "additionalProperties": false
          },
          "detail": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string",
                "minLength": 1
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "stage": {
                "type": "string",
                "enum": [
                  "upload",
                  "validation",
                  "scan",
                  "planning",
                  "extraction",
                  "finalization"
                ]
              },
              "required_pages": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "filename": {
            "$ref": "#/components/schemas/Filename"
          },
          "confidence_score": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "destination": {
                "type": "string",
                "format": "uri"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "sending",
                  "delivered",
                  "failed"
                ]
              },
              "attempt_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 8
              },
              "last_http_status": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 100,
                "maximum": 599
              },
              "last_error_code": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "dns_resolution_failed",
                  "unsafe_destination",
                  "kms_unavailable",
                  "signing_key_invalid",
                  "request_timeout",
                  "network_error",
                  null
                ]
              },
              "next_attempt_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "delivered_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "required": [
              "destination",
              "status",
              "attempt_count",
              "last_http_status",
              "last_error_code",
              "next_attempt_at",
              "delivered_at"
            ],
            "additionalProperties": false
          },
          "classification": {
            "$ref": "#/components/schemas/ClassificationResponse"
          },
          "thumbnail": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "url",
              "expires_at"
            ],
            "additionalProperties": false,
            "description": "Temporary thumbnail URL and expiry, or null when unavailable."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1
          },
          "external_group_id": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1
          },
          "content_status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "available",
              "partially_available",
              "unavailable"
            ]
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "original_download": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "url",
              "expires_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "status",
          "progress",
          "detail",
          "completed_at",
          "id",
          "filename",
          "confidence_score",
          "webhook",
          "classification",
          "thumbnail",
          "created_at",
          "external_id",
          "external_group_id",
          "content_status",
          "expires_at",
          "original_download"
        ],
        "additionalProperties": false
      },
      "DocumentListResponse": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentSummary"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Categories assigned across retained Documents, deduplicated ignoring case with original spelling preserved. Independent of this page and filter."
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "required": [
          "documents",
          "categories",
          "pagination"
        ],
        "additionalProperties": false
      },
      "DocumentPageResponse": {
        "type": "object",
        "properties": {
          "page_number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "markdown": {
            "type": [
              "string",
              "null"
            ],
            "description": "Page content in Markdown, or null when unavailable."
          },
          "confidence_score": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "image": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "url",
              "expires_at"
            ],
            "additionalProperties": false,
            "description": "Temporary image URL and expiry, or null when unavailable."
          }
        },
        "required": [
          "page_number",
          "markdown",
          "confidence_score",
          "image"
        ],
        "additionalProperties": false
      },
      "DocumentSummary": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "waiting_for_upload",
              "validating",
              "processing",
              "completed",
              "completed_with_warnings",
              "failed",
              "rejected"
            ]
          },
          "progress": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "pages_total": {
                "type": "integer",
                "minimum": 0
              },
              "pages_completed": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "pages_total",
              "pages_completed"
            ],
            "additionalProperties": false
          },
          "detail": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string",
                "minLength": 1
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "stage": {
                "type": "string",
                "enum": [
                  "upload",
                  "validation",
                  "scan",
                  "planning",
                  "extraction",
                  "finalization"
                ]
              },
              "required_pages": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string"
          },
          "filename": {
            "$ref": "#/components/schemas/Filename"
          },
          "confidence_score": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "sending",
                  "delivered",
                  "failed"
                ]
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": false
          },
          "classification": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "processing",
                  "completed",
                  "failed"
                ]
              },
              "categories": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Null until completed. An empty array is a successful classification with no matches."
              }
            },
            "required": [
              "id",
              "status",
              "categories"
            ],
            "additionalProperties": false
          },
          "thumbnail": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "url",
              "expires_at"
            ],
            "additionalProperties": false,
            "description": "Temporary thumbnail URL and expiry, or null when unavailable."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "progress",
          "detail",
          "completed_at",
          "id",
          "filename",
          "confidence_score",
          "webhook",
          "classification",
          "thumbnail",
          "created_at"
        ],
        "additionalProperties": false
      },
      "Filename": {
        "type": "string",
        "minLength": 1,
        "maxLength": 255,
        "description": "Filename with its extension, without directory separators or control characters.",
        "example": "statement.pdf"
      },
      "JobResultPage": {
        "type": "object",
        "properties": {
          "page_number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "markdown": {
            "type": [
              "string",
              "null"
            ],
            "description": "Page content in Markdown, or null when unavailable."
          },
          "confidence_score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "page_extraction_failed"
                  ]
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "code",
                "message"
              ],
              "additionalProperties": false
            },
            "maxItems": 1
          }
        },
        "required": [
          "page_number",
          "markdown",
          "confidence_score",
          "warnings"
        ],
        "additionalProperties": false
      },
      "JobResultResponse": {
        "type": "object",
        "properties": {
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "completed",
                  "completed_with_warnings",
                  "failed"
                ]
              }
            },
            "required": [
              "id",
              "status"
            ],
            "additionalProperties": false
          },
          "document": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "filename": {
                "$ref": "#/components/schemas/Filename"
              },
              "media_type": {
                "type": "string",
                "minLength": 1
              },
              "page_count": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "content_status": {
                "type": "string",
                "enum": [
                  "available",
                  "partially_available",
                  "unavailable"
                ]
              },
              "confidence_score": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "id",
              "filename",
              "media_type",
              "page_count",
              "content_status",
              "confidence_score"
            ],
            "additionalProperties": false
          },
          "classification": {
            "$ref": "#/components/schemas/ClassificationResponse"
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobResultPage"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobResultWarning"
            },
            "maxItems": 4
          }
        },
        "required": [
          "job",
          "document",
          "pages",
          "pagination",
          "warnings"
        ],
        "additionalProperties": false
      },
      "JobResultWarning": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "page_extraction_failed",
              "classification_failed",
              "classification_content_unavailable",
              "classification_input_too_large"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "JobStatusResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting_for_upload",
              "validating",
              "processing",
              "completed",
              "completed_with_warnings",
              "failed",
              "rejected"
            ]
          },
          "classification": {
            "$ref": "#/components/schemas/ClassificationReference"
          },
          "document_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Document ID assigned at upload confirmation. Null before confirmation."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1
          },
          "external_group_id": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1
          },
          "progress": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "pages_total": {
                "type": "integer",
                "minimum": 0
              },
              "pages_completed": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "pages_total",
              "pages_completed"
            ],
            "additionalProperties": false
          },
          "result_available": {
            "type": "boolean",
            "description": "Whether the finalized result can be requested."
          },
          "detail": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string",
                "minLength": 1
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "stage": {
                "type": "string",
                "enum": [
                  "upload",
                  "validation",
                  "scan",
                  "planning",
                  "extraction",
                  "finalization"
                ]
              },
              "required_pages": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "document_id",
          "external_id",
          "external_group_id",
          "progress",
          "result_available",
          "detail",
          "created_at",
          "updated_at",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "page_start": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "page_limit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 50
          },
          "next_start": {
            "type": [
              "integer",
              "null"
            ],
            "exclusiveMinimum": 0,
            "description": "Use as page_start for the next request. Null when there are no more items."
          }
        },
        "required": [
          "page_start",
          "page_limit",
          "next_start"
        ],
        "additionalProperties": false
      },
      "SearchRequest": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "Text or a whole external identifier to find. Supports quoted phrases, uppercase OR, exclusions, and signed amounts.",
            "example": "closing balance"
          },
          "filters": {
            "type": "object",
            "properties": {
              "document_id": {
                "type": "string",
                "description": "Return matching pages within this document instead of document hits."
              },
              "external_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Match this external document identifier exactly after trimming surrounding whitespace. Case-sensitive; combined with other filters using AND.",
                "example": "statement-2026-09"
              },
              "external_group_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Match this external group identifier exactly after trimming surrounding whitespace. Case-sensitive; combined with other filters using AND.",
                "example": "account-42"
              }
            },
            "additionalProperties": false,
            "description": "Restrict eligible documents before search. All supplied filters combine with AND."
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 10,
            "default": 5,
            "description": "Maximum number of ranked hits to return.",
            "example": 5
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      },
      "SearchResponse": {
        "type": "object",
        "properties": {
          "hits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "document": {
                  "$ref": "#/components/schemas/DocumentSummary"
                },
                "identifier": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "field": {
                      "type": "string",
                      "enum": [
                        "external_id",
                        "external_group_id"
                      ]
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "field",
                    "value"
                  ],
                  "additionalProperties": false,
                  "description": "The exact identifier responsible for this hit, or null for filename and page matches."
                },
                "page": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "page_number": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    },
                    "excerpt": {
                      "type": "string",
                      "minLength": 1,
                      "description": "Plain-text excerpt from the source page."
                    }
                  },
                  "required": [
                    "page_number",
                    "excerpt"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "document",
                "identifier",
                "page"
              ],
              "additionalProperties": false
            },
            "maxItems": 10
          }
        },
        "required": [
          "hits"
        ],
        "additionalProperties": false
      },
      "UploadInstructions": {
        "type": "object",
        "properties": {
          "strategy": {
            "type": "string",
            "enum": [
              "presigned_put"
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "PUT"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Temporary upload URL. Send the file bytes using the returned method and headers."
          },
          "headers": {
            "$ref": "#/components/schemas/UploadRequiredHeaders"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "max_bytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 104857600,
            "description": "Maximum file size allowed for this upload, in bytes."
          }
        },
        "required": [
          "strategy",
          "method",
          "url",
          "headers",
          "expires_at",
          "max_bytes"
        ],
        "additionalProperties": false
      },
      "UploadRequiredHeaders": {
        "type": "object",
        "properties": {
          "content-type": {
            "type": "string",
            "enum": [
              "application/octet-stream"
            ]
          },
          "if-none-match": {
            "type": "string",
            "enum": [
              "*"
            ]
          }
        },
        "required": [
          "content-type",
          "if-none-match"
        ],
        "additionalProperties": false
      }
    },
    "parameters": {}
  },
  "paths": {
    "/v1/jobs/{job_id}": {
      "get": {
        "operationId": "getJob",
        "summary": "Get job status",
        "description": "Read recovery status and page progress. Check result_available before fetching the result. A requested classification has its own ID and status and can finish after recovery. API keys require the jobs:read scope.",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "Bearer": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Job ID returned by upload creation.",
              "example": "job_01j00000000000000000000000"
            },
            "required": true,
            "description": "Job ID returned by upload creation.",
            "name": "job_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Current job status",
            "content": {
              "application/json": {
                "example": {
                  "id": "job_01j00000000000000000000000",
                  "status": "completed",
                  "document_id": "doc_01j00000000000000000000000",
                  "external_id": "statement-2026-09",
                  "external_group_id": null,
                  "progress": {
                    "pages_total": 1,
                    "pages_completed": 1
                  },
                  "result_available": true,
                  "detail": null,
                  "created_at": "2026-09-18T12:00:00Z",
                  "updated_at": "2026-09-18T12:02:00Z",
                  "completed_at": "2026-09-18T12:02:00Z"
                },
                "schema": {
                  "$ref": "#/components/schemas/JobStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "The request is invalid.",
                    "details": {
                      "request_id": "req_01j00000000000000000000000"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "unauthorized",
                    "message": "The API key is missing or invalid.",
                    "details": {
                      "request_id": "req_01j00000000000000000000000"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Inactive workspace or insufficient permissions",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "forbidden",
                    "message": "The API key does not allow this operation.",
                    "details": {
                      "request_id": "req_01j00000000000000000000000"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "The requested resource was not found.",
                    "details": {
                      "request_id": "req_01j00000000000000000000000"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "An unexpected error occurred.",
                    "details": {
                      "request_id": "req_01j00000000000000000000000"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}
```

[Complete OpenAPI specification](https://api.pagelet.ai/openapi.json)