PaperOffice AI Document AI — HITL API
Human-in-the-loop review: configurations, review queue, claim, approve or reject review tasks.
Human-in-the-loop review: configurations, review queue, claim, approve or reject review tasks.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/paperoffice-ai:paperoffice-ai-document-ai-hitl-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PaperOffice AI Document AI — HITL API
version: R20261120.1802
summary: 'PaperOffice AI, the Document Operations Platform: OCR, IDP, DMS, PDF, e-signatures, anonymization, workflows, translation, voice.'
description: 'Generated from the PaperOffice API SOT (release `R20261120.1802`). Agent documentation: llms.txt (index), integration guide and llms-full.txt. Check each response media type; downloads may be binary.
JSON success envelopes commonly carry `status: "success"`; JSON errors commonly carry `status: "error"`, `code` and `message`. Job endpoints hold the connection while `client_wait=true` (default) and answer HTTP 202 with `poll_url` when the hold window ends — poll `GET /job/get/{job_id}`. Operations that share one method and path list their documented variants in `x-paperoffice-variants`.'
servers:
- url: https://api.paperoffice.ai/latest
security:
- bearerAuth: []
tags:
- name: Document AI — HITL
description: 'Human-in-the-loop review: configurations, review queue, claim, approve or reject review tasks.'
paths:
/hitl_config/enqueue:
post:
operationId: po-hitl-config-enqueue
summary: 'HITL: Enqueue document for review'
tags:
- Document AI — HITL
description: 'Queue documents for human review (HITL) with a HITL agent: config_uuid (agent UUID from the app or po_hitl_config_get) plus pofid, document_id, pofids or document_ids. Needs write access to every document workspace; one denied document...'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-config-enqueue.md
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
config_uuid:
type: string
description: UUID of the HITL agent (required). Create the agent in the app under Workflow AI → HITL agents; read it with po_hitl_config_get.
pofid:
type: string
description: POFID of one document. Provide one of pofid, document_id, pofids, document_ids.
pofids:
type: array
description: POFIDs of several documents (all or nothing on access errors).
items:
type: string
document_id:
type: integer
description: Numeric documents_id of one document (Alternative to pofid).
document_ids:
type: array
description: Numeric documents_id values of several documents (all or nothing on access errors).
items:
type: integer
source:
type: string
description: 'Optional provenance label: api (default), mcp. Stored with the task.'
force:
type: boolean
description: 'Single document only: queue even if an open task of this agent exists for the document.'
required:
- config_uuid
application/x-www-form-urlencoded:
schema:
type: object
properties:
config_uuid:
type: string
description: UUID of the HITL agent (required). Create the agent in the app under Workflow AI → HITL agents; read it with po_hitl_config_get.
pofid:
type: string
description: POFID of one document. Provide one of pofid, document_id, pofids, document_ids.
pofids:
type: array
description: POFIDs of several documents (all or nothing on access errors).
items:
type: string
document_id:
type: integer
description: Numeric documents_id of one document (Alternative to pofid).
document_ids:
type: array
description: Numeric documents_id values of several documents (all or nothing on access errors).
items:
type: integer
source:
type: string
description: 'Optional provenance label: api (default), mcp. Stored with the task.'
force:
type: boolean
description: 'Single document only: queue even if an open task of this agent exists for the document.'
required:
- config_uuid
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessEnvelope'
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_config/get:
get:
operationId: po-hitl-config-get
summary: Get HITL Config
tags:
- Document AI — HITL
description: 'Load one HITL agent (human review configuration) by uuid/config_uuid or config_id: workspace/document-type binding, review fields, checks, reject reasons, SLA, reviews_required, webhook settings (never the secret). For API/MCP callers...'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-config-get.md
parameters:
- name: uuid
in: query
required: false
schema:
type: string
description: UUID of the human-in-the-loop configuration (alias config_uuid). Provide uuid or config_id.
- name: config_id
in: query
required: false
schema:
type: integer
description: Numeric ID of the human-in-the-loop configuration (alias id). Provide uuid or config_id.
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
data:
type: object
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_config/list:
get:
operationId: po-hitl-config-list
summary: List HITL Configs
tags:
- Document AI — HITL
description: 'List the account''s HITL agents (human review configurations): uuid (= config_uuid for po_hitl_config_enqueue), name, workspace/document-type binding, review fields, checks, SLA, reviews_required, webhook settings (URL shortened for API...'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-config-list.md
parameters:
- name: include_inactive
in: query
required: false
schema:
type: boolean
description: Also list deactivated configurations (default false).
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
_billing:
type: object
properties:
credits:
type: object
properties:
total_monthly:
type: integer
remaining_monthly:
type: integer
credit_source:
type: string
api_handler:
type: string
tier_info:
type: object
properties:
tier:
type: string
name:
type: string
initial_credits:
type: integer
price_monthly:
type: integer
price_overage_per_credit:
type: integer
notice:
type: string
renewal_days:
type: integer
subscription_status:
type: string
job:
type: object
properties:
api_job_name:
type: string
app:
type: string
action:
type: string
default_credits:
type: integer
credits_billed:
type: integer
pricing:
type: object
properties:
credits_per_unit:
type: integer
unit:
type: string
unit_count:
type: integer
addons:
type: string
requests:
type: object
properties:
limits:
type: object
properties:
second:
type: integer
minute:
type: integer
hour:
type: integer
day:
type: integer
current:
type: object
properties:
second:
type: integer
minute:
type: integer
hour:
type: integer
day:
type: integer
remaining:
type: object
properties:
second:
type: integer
minute:
type: integer
hour:
type: integer
day:
type: integer
next_possible_request_seconds:
type: integer
remaining_credits:
type: integer
total_monthly:
type: integer
effective_token:
type: string
account_id:
type: integer
plan:
type: object
properties:
tier:
type: string
name:
type: string
user:
type: object
properties:
ip:
type: string
data:
type: array
processing_time:
type: string
status:
type: string
total:
type: integer
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_config/queue_stats:
get:
operationId: po-hitl-config-queue-stats
summary: 'HITL: Document queue status counts'
tags:
- Document AI — HITL
description: 'Count HITL review queue documents by status (to_review, reviewing, postponed, confirmed, rejected, total_active), optionally for one HITL agent via queue_uuid (agent uuid). Keywords: HITL, review queue, backlog, statistics.'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-config-queue-stats.md
parameters:
- name: queue_uuid
in: query
required: false
schema:
type: string
description: 'Optional: uuid of one HITL agent; counts only its queue.'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessEnvelope'
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_review/approve:
post:
operationId: po-hitl-approve
summary: Approve Task (Legacy)
tags:
- Document AI — HITL
description: 'Legacy alias of po_tasks_resolve_task with decision=approve. Uses the same HITL consensus kernel as POST /workflow_tasks/resolve (including reviews_required > 1). Prefer po_tasks_resolve_task for new integrations. REST: POST...'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-approve.md
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
task_uuid:
type: string
description: Task UUID (required).
result:
type: object
description: Optional structured review result payload.
required:
- task_uuid
application/x-www-form-urlencoded:
schema:
type: object
properties:
task_uuid:
type: string
description: Task UUID (required).
result:
type: object
description: Optional structured review result payload.
required:
- task_uuid
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: Review genehmigt
properties:
status:
type: string
enum:
- success
- error
message:
type: string
description: Status message
review:
type: object
properties:
review_id:
type: string
document_id:
type: string
status:
type: string
enum:
- pending
- claimed
- approved
- rejected
- completed
reviewer:
type: string
confidence:
type: number
created_at:
type: string
format: date-time
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_review/check:
get:
operationId: po-hitl-check
summary: HITL Health Check
tags:
- Document AI — HITL
description: 'HITL review service health check. Reports whether the HITL review service is reachable and operational. Keywords: health, status, ping.'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-check.md
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
service:
type: string
version:
type: string
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_review/claim:
post:
operationId: po-hitl-claim
summary: Claim Review Task
tags:
- Document AI — HITL
description: 'Claim a HITL task (optimistic lock). Status pending or awaiting_reviews. Blind-review protection: already reviewed tasks cannot be claimed again.'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-claim.md
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
task_uuid:
type: string
description: Task UUID (required).
required:
- task_uuid
application/x-www-form-urlencoded:
schema:
type: object
properties:
task_uuid:
type: string
description: Task UUID (required).
required:
- task_uuid
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: Review beansprucht
properties:
status:
type: string
enum:
- success
- error
message:
type: string
description: Status message
review:
type: object
properties:
review_id:
type: string
document_id:
type: string
status:
type: string
enum:
- pending
- claimed
- approved
- rejected
- completed
reviewer:
type: string
confidence:
type: number
created_at:
type: string
format: date-time
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_review/complete:
post:
operationId: po-hitl-complete
summary: Complete Task (Legacy)
tags:
- Document AI — HITL
description: 'Legacy alias of po_tasks_resolve_task with decision=approve (complete). Same consensus kernel as POST /workflow_tasks/resolve. Prefer po_tasks_resolve_task. REST: POST /hitl_review/complete. There is no MCP tool named po_hitl_submit_review.'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-complete.md
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
task_uuid:
type: string
description: Task UUID (required).
result:
type: object
description: Optional structured review result payload.
required:
- task_uuid
application/x-www-form-urlencoded:
schema:
type: object
properties:
task_uuid:
type: string
description: Task UUID (required).
result:
type: object
description: Optional structured review result payload.
required:
- task_uuid
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: Review abgeschlossen
properties:
status:
type: string
enum:
- success
- error
message:
type: string
description: Status message
review:
type: object
properties:
review_id:
type: string
document_id:
type: string
status:
type: string
enum:
- pending
- claimed
- approved
- rejected
- completed
reviewer:
type: string
confidence:
type: number
created_at:
type: string
format: date-time
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_review/get:
post:
operationId: po-hitl-get-task
summary: Get HITL task details
tags:
- Document AI — HITL
description: 'Load HITL task details. Full task data by UUID including meta_fields_snapshot, OCR bounding boxes, consensus progress, account name. Cross-tenant search. Keywords: task details, load, UUID.'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-get-task.md
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
task_uuid:
type: string
description: UUID of the Tasks (Required)
required:
- task_uuid
application/x-www-form-urlencoded:
schema:
type: object
properties:
task_uuid:
type: string
description: UUID of the Tasks (Required)
required:
- task_uuid
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum:
- success
- error
data:
type: object
task:
type: object
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_review/queue:
post:
operationId: po-hitl-queue
summary: HITL Review Queue
tags:
- Document AI — HITL
description: 'Lists open human-in-the-loop review tasks for the current account. Filters: status (pending|in_progress|awaiting_reviews), limit, search, account_id (own root only). Read-only.'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-queue.md
requestBody:
required: false
content:
multipart/form-data:
schema:
type: object
properties:
limit:
type: integer
description: Max rows (default 50)
status:
type: string
description: pending | in_progress | awaiting_reviews
search:
type: string
description: Free-text filter on title/document
account_id:
type: integer
description: Own root account (optional)
compact:
type: boolean
description: 'true (default): one compact entry per task (uuid, title, status, priority, step, assignee, timestamps). false: full task_data, form fields and instructions per task (large). Use po_hitl_get_task for one task in full.'
default: true
required: []
application/x-www-form-urlencoded:
schema:
type: object
properties:
limit:
type: integer
description: Max rows (default 50)
status:
type: string
description: pending | in_progress | awaiting_reviews
search:
type: string
description: Free-text filter on title/document
account_id:
type: integer
description: Own root account (optional)
compact:
type: boolean
description: 'true (default): one compact entry per task (uuid, title, status, priority, step, assignee, timestamps). false: full task_data, form fields and instructions per task (large). Use po_hitl_get_task for one task in full.'
default: true
required: []
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
tasks:
type: array
counts:
type: object
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
/hitl_review/reject:
post:
operationId: po-hitl-reject
summary: Reject Task (Legacy)
tags:
- Document AI — HITL
description: 'Legacy alias of po_tasks_resolve_task with decision=reject. Requires a reason. Same consensus kernel as POST /workflow_tasks/resolve. Prefer po_tasks_resolve_task. REST: POST /hitl_review/reject. There is no MCP tool named...'
externalDocs:
url: https://api.paperoffice.ai/latest/docs/endpoints/po-hitl-reject.md
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
task_uuid:
type: string
description: Task UUID (required).
reason:
type: string
description: Rejection reason (required).
required:
- task_uuid
application/x-www-form-urlencoded:
schema:
type: object
properties:
task_uuid:
type: string
description: Task UUID (required).
reason:
type: string
description: Rejection reason (required).
required:
- task_uuid
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
description: Review abgelehnt
properties:
status:
type: string
enum:
- success
- error
message:
type: string
description: Status message
review:
type: object
properties:
review_id:
type: string
document_id:
type: string
status:
type: string
enum:
- pending
- claimed
- approved
- rejected
- completed
reviewer:
type: string
confidence:
type: number
created_at:
type: string
format: date-time
4XX:
$ref: '#/components/responses/Error'
5XX:
$ref: '#/components/responses/Error'
components:
schemas:
SuccessEnvelope:
type: object
description: Success envelope. Payload fields are endpoint-specific (top-level fields, `result`/`job_result` for jobs, `data` on some account endpoints).
properties:
status:
type: string
const: success
processing_time:
type:
- string
- number
_billing:
type: object
additionalProperties: true
required:
- status
additionalProperties: true
ErrorEnvelope:
type: object
properties:
status:
type: string
const: error
code:
type: string
message:
type: string
retryable:
type: boolean
required:
- status
- message
additionalProperties: true
responses:
Error:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
securitySchemes:
signingToken:
type: apiKey
in: query
name: token
description: Signer capability from the signing link. Protect it as a credential.
bearerAuth:
type: http
scheme: bearer
description: '`po_sk_` (secret key) or `po_ut_` (user token) server-side; `po_pk_` is public, scope/budget-capped and host-allowlisted. Origin can be forged outside browsers and is not caller authentication. Documentation routes under `/docs/` also answer without a Bearer (visitor tier).'
externalDocs:
description: Agent documentation (llms.txt)
url: https://api.paperoffice.ai/latest/docs/llms.txt