{"openapi":"3.1.0","info":{"title":"PaperOffice AI API","version":"R20261119.0603","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 `R20261119.0603`). Agent documentation: [llms.txt](https://api.paperoffice.ai/latest/docs/llms.txt) (index with one Markdown page per endpoint) and [llms-full.txt](https://api.paperoffice.ai/latest/docs/llms-full.txt).\n\nSuccess responses carry `status: \"success\"`; errors 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`."},"externalDocs":{"description":"Agent documentation (llms.txt)","url":"https://api.paperoffice.ai/latest/docs/llms.txt"},"servers":[{"url":"https://api.paperoffice.ai/latest"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Document AI — OCR & IDP","description":"OCR, handwriting and form recognition, plus structured IDP extraction (invoices, receipts, IDs, contracts, payroll and more). OCR runs on `POST /job/add/paperoffice_aiocr___generate`; structured IDP runs on `POST /job/add/workflow` with an IDP collection."},{"name":"Workflow AI — Job Management","description":"Job lifecycle after submission: poll `GET /job/get/{job_id}` until `job_status` is `completed`, read `result ?? job_result`, and download result files. Also the job pricelist and a health ping."},{"name":"Document AI — DMS","description":"Document management: workspaces, documents, folders, tags, notes, versions, sharing, retention and trash. Documents are addressed by `pofid`."},{"name":"Document AI — AI Document Operations","description":"AI data of stored documents: metadata, summaries, canonical entities, vision data and embeddings (read and search)."},{"name":"Document AI — PDF","description":"PDF Studio jobs. `image_to_pdf`: `merge=false`/`0` = one PDF per image; `fit_to_a4` = A4 MediaBox (~595×842 pt). `pdf_to_jpg` default `max_size=2000`. `pdf_to_pdfa` level `pdfa-1b`/`pdfa-2b`/`pdfa-3b`. `edit_metadata` `operation=edit` needs title/author/subject/keywords. Multipart split ranges: `splits[0][pages]`."},{"name":"Document AI — E-Signatures","description":"Electronic signatures: signature requests (eSignatures API), signing links with OTP, reminders, status checks and signed-document downloads."},{"name":"Document AI — Anonymization","description":"PII detection, redaction preview and anonymized PDF output, either single-step or preview followed by apply."},{"name":"Document AI — Workflow Orchestration","description":"Workflow templates and workflow agents that run multi-step document processing."},{"name":"Document AI — HITL","description":"Human-in-the-loop review: configurations, review queue, claim, approve or reject review tasks."},{"name":"Document AI — Tasks & Substitutes","description":"Workflow tasks for users: list, claim, complete, reject, escalate and resolve."},{"name":"Document AI — Import & Migration","description":"Bulk import of existing archives: upload or scan a source, then create, start and monitor import jobs."},{"name":"Document AI — Storage Mounts","description":"External storage mounts (NAS, cloud, file systems): connect, test, browse, create directories and mirror into workspaces."},{"name":"Document AI — Webhooks","description":"Webhook subscriptions for document and job events: create, update, test and delete."},{"name":"Media AI — Translation","description":"JSON `text` as string, string[], or object. `preserve_terms` (all tiers) keeps names verbatim. `client_wait=false` returns `async=true` + `job_id`; poll `GET /job/get/{job_id}` until `job_status` is `completed`."},{"name":"Media AI — Voice","description":"STT `audio_duration_seconds` and character counts apply to `json` and `srt` alike. Poll `GET /job/get/{job_id}` until `job_status` is `completed`."},{"name":"Media AI — Image Studio","description":"Image Studio jobs: image generation and background removal."},{"name":"Analytics AI — Analytics & BI","description":"Analytics over documents and workspaces: overviews, trends, activity, financial flows, due dates, meta-field analysis, audit findings and embedding clusters."},{"name":"Analytics AI — Knowledge Graph","description":"Knowledge graph built from documents: entities, business partners, publishers, relations, topics, reference numbers and timelines."},{"name":"Relations AI — CRM","description":"CRM signals derived from documents: account insights, upsell opportunities, at-risk accounts, sentiment history and linked documents."},{"name":"Data AI — Validation & VAT","description":"Validation of e-mail addresses, phone numbers and websites, EU VAT IDs and rates, and global tax quotes."},{"name":"Data AI — Currency Exchange","description":"ISO 4217 convert/rates. Unknown or unsupported codes return HTTP 400 (`INVALID_CURRENCY_CODE` or `CURRENCY_NOT_AVAILABLE`), not HTTP 500."},{"name":"Data AI — Geocoding","description":"Address and place lookup (`/geocoding/*`). Distinct from IP geolocation (`/ip2location/*`) and from weather. Reverse: `lat` −90…90 and `lng` −180…180; out-of-range values return HTTP 400 `INVALID_COORDINATES` (0,0 is valid)."},{"name":"Data AI — IP Geolocation","description":"IP-derived location. **IP-based weather** is `/ip2location/weather`. City/GPS weather lives under **Data AI — Weather** (`/weather`, `/location2weather`)."},{"name":"Data AI — Weather","description":"City/GPS weather (`/weather`, `/location2weather`). IP-derived weather is under **Data AI — IP Geolocation** (`/ip2location/weather`)."},{"name":"Data AI — Map Tiles","description":"Map tiles, style JSON and static maps by coordinates or IP address."},{"name":"Security AI — Fingerprint","description":"Device fingerprinting: identify and verify devices, find similar or linked devices."},{"name":"Security AI — Fake Email","description":"Detection of disposable and fake e-mail addresses, single or batch."},{"name":"Documentation & Discovery","description":"Machine-readable documentation exports: Postman collection and MCP server integration info."}],"paths":{"/analytics/activity-document":{"get":{"operationId":"po-analytics-document-activity-get","summary":"Get document activity history","tags":["Analytics AI — Analytics & BI"],"description":"Complete activity history for a single document — revisions, processing events, and user actions where logged. Requires a document identifier (pofid or documents_id). Permissions: Requires Analytics AI module access on the bearer token.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-document-activity-get.md"},"parameters":[{"name":"pofid","in":"query","required":false,"schema":{"type":"string"},"description":"POFID of the document (required unless documents_id is provided)."},{"name":"documents_id","in":"query","required":false,"schema":{"type":["string","number"]},"description":"Numeric document ID (required unless pofid is provided)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/activity-heatmap":{"get":{"operationId":"po-analytics-heatmap-get","summary":"Get activity heatmap","tags":["Analytics AI — Analytics & BI"],"description":"Activity heatmap — daily upload/change intensity over a year (or selected window) for capacity planning. Permissions: Requires Analytics AI module access on the bearer token.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-heatmap-get.md"},"parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"number"},"description":"Year (default: current year)"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"daily_counts":{"type":"object","properties":{"2026-03-19":{"type":"integer"}}},"date_basis":{"type":"string"},"metric_basis":{"type":"string"},"period":{"type":"string"},"processing_time":{"type":"string"},"scope_contract":{"type":"string"},"stats":{"type":"object","properties":{"total_documents":{"type":"integer"},"max_per_day":{"type":"integer"},"active_days":{"type":"integer"},"avg_per_day":{"type":"integer"}}},"status":{"type":"string"},"workspace_id":{"type":"string"},"workspace_scope":{"type":"string"},"year":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/activity-users":{"get":{"operationId":"po-analytics-user-activity-get","summary":"Get user activity ranking","tags":["Analytics AI — Analytics & BI"],"description":"Rank users by uploads and document revisions in the selected time period (not login events).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-user-activity-get.md"},"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["7d","30d","90d","365d","all"],"default":"30d"},"description":"Time period for activity counters"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Optional workspace filter (required for sub-users). Omit for account-wide scope (root/administrator only)."}],"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"},"token":{"type":"string"},"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"}}}}},"date_basis":{"type":"string"},"metric_basis":{"type":"string"},"period":{"type":"string"},"processing_time":{"type":"string"},"scope_contract":{"type":"string"},"status":{"type":"string"},"user_count":{"type":"integer"},"users":{"type":"array","items":{}},"workspace_id":{"type":"string"},"workspace_scope":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/audit-center":{"get":{"operationId":"po-analytics-audit-center-get","summary":"Get audit center findings","tags":["Analytics AI — Analytics & BI"],"description":"Workflow audit center — compliance-oriented findings with severity (low/medium/high/critical) and review flags. Monitoring view for potential compliance issues (GDPR/GoBD-oriented signals) — not a legal certification. Permissions...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-audit-center-get.md"},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":100},"description":"Max results (1-500)"},{"name":"offset","in":"query","required":false,"schema":{"type":"number","default":0},"description":"Pagination offset"},{"name":"severity","in":"query","required":false,"schema":{"type":"string","enum":["low","medium","high","critical"]},"description":"Filter by severity"},{"name":"require_review","in":"query","required":false,"schema":{"type":"boolean"},"description":"Only entries requiring review"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"audit_timeline":{"type":"array","items":{}},"date_basis":{"type":"string"},"findings":{"type":"array","items":{}},"limit":{"type":"integer"},"metric_basis":{"type":"string"},"offset":{"type":"integer"},"period":{"type":"string"},"processing_time":{"type":"string"},"scope_contract":{"type":"string"},"stats":{"type":"object","properties":{"audited_total":{"type":"integer"},"with_findings_count":{"type":"integer"},"protected_count":{"type":"integer"},"severity_breakdown":{"type":"object","properties":{"critical":{"type":"integer"},"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"}}},"require_human_review":{"type":"integer"}}},"status":{"type":"string"},"total":{"type":"integer"},"workspace_id":{"type":"string"},"workspace_scope":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/calendar-due-dates":{"get":{"operationId":"po-analytics-due-dates-get","summary":"Get upcoming due dates","tags":["Analytics AI — Analytics & BI"],"description":"Upcoming and past due dates from documents — invoice due dates, contract deadlines, recall dates, and similar date-driven workflows. Permissions: Requires Analytics AI module access on the bearer token.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-due-dates-get.md"},"parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"number"},"description":"Year (default: current year)"},{"name":"show_overdue","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"Include overdue entries"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"event_count":{"type":"integer"},"events":{"type":"array","items":{}},"overdue_count":{"type":"integer"},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/contact-stats":{"get":{"operationId":"po-analytics-contacts-stats-get","summary":"Get contact statistics","tags":["Analytics AI — Analytics & BI"],"description":"Business partner / contact statistics — document counts, storage, first/last document dates, and optional addresses (include_addresses=true).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-contacts-stats-get.md"},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":50},"description":"Max results (1-500)"},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["7d","30d","90d","365d","all"],"default":"30d"},"description":"Time period"},{"name":"include_addresses","in":"query","required":false,"schema":{"type":"boolean"},"description":"Include address data"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"contacts":{"type":"array","items":{}},"financial_endpoint":{"type":"string"},"has_custom_meta_keys":{"type":"boolean"},"meta_mapping":{"type":"object","properties":{"contacts":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}},"location":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}},"amounts":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}}}},"processing_time":{"type":"string"},"status":{"type":"string"},"total_contacts":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/contact-stats-financial":{"get":{"operationId":"po-analytics-contacts-financial-get","summary":"Get contact financial statistics","tags":["Analytics AI — Analytics & BI"],"description":"Financial totals per business contact — total_amount, invoice_count, and amounts_available from extracted IDP meta fields.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-contacts-financial-get.md"},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":50},"description":"Max contacts to return (1-500). Should match contact-stats limit when merging client-side."}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"contacts":{"type":"array","items":{}},"has_custom_meta_keys":{"type":"boolean"},"meta_mapping":{"type":"object","properties":{"contacts":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}},"location":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}},"amounts":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}}}},"note":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"total_contacts":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/distribution":{"get":{"operationId":"po-analytics-distribution-get","summary":"Get document distribution stats","tags":["Analytics AI — Analytics & BI"],"description":"Document distribution breakdown — by document type, workspace, processing state, or other dimensions available in your estate. Helpful for portfolio analysis and data-quality reviews before BI exports. Permissions: Requires Analytics...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-distribution-get.md"},"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["document_type","workspace","dms_tier","file_extension"],"default":"document_type"},"description":"Distribution criterion"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"aggregation_scope":{"type":"object","properties":{"period":{"type":"string"},"workspace_scope":{"type":"string"},"workspace_id":{"type":"string"},"date_basis":{"type":"string"},"scope_contract":{"type":"string"}}},"distribution":{"type":"array","items":{}},"metrics_scope":{"type":"string"},"period":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"type":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/embedding-stats":{"get":{"operationId":"po-embeddings-stats-get","summary":"Get embedding statistics","tags":["Analytics AI — Analytics & BI"],"description":"Embedding statistics — count per type, coverage rate, average quality. Shows semantic index processing status.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-embeddings-stats-get.md"},"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"processing_time":{"type":"string"},"stats":{"type":"object","properties":{"total_embeddings":{"type":"integer"},"total_entities":{"type":"integer"},"embedding_models":{"type":"array","items":{}},"embeddings_by_type":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"integer"},"document_count":{"type":"integer"},"avg_text_length":{"type":"integer"}}}},"entities_by_type":{"type":"array","items":{}}}},"status":{"type":"string"},"tables_available":{"type":"object","properties":{"embeddings":{"type":"boolean"},"entities":{"type":"boolean"}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/embeddings-clusters":{"get":{"operationId":"po-embeddings-clusters-get","summary":"Get embedding clusters","tags":["Analytics AI — Analytics & BI"],"description":"Returns embedding counts grouped by type (summary, page, paragraph, entity, metadata). For semantic document grouping use advanced search with mode=semantic.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-embeddings-clusters-get.md"},"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"clusters":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"model":{"type":"string"},"count":{"type":"integer"},"documents":{"type":"integer"}}}},"note":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/embeddings-topics":{"get":{"operationId":"po-embeddings-topics-get","summary":"Get embedding topics","tags":["Analytics AI — Analytics & BI"],"description":"Topic distribution based on embeddings — how documents are distributed across detected topics. Shows confidence scores.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-embeddings-topics-get.md"},"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"processing_time":{"type":"string"},"status":{"type":"string"},"topics":{"type":"array","items":{"type":"object","properties":{"topic":{"type":"string"},"count":{"type":"integer"}}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/entities-network":{"get":{"operationId":"po-entities-network-get","summary":"Get entity network graph","tags":["Analytics AI — Analytics & BI"],"description":"Entity network graph — connections between persons, companies, and organizations based on shared documents. Returns nodes and edges for interactive graph visualization.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-entities-network-get.md"},"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by entity type: person, company, location, amount, date, email, phone, iban, invoice_number, contract_number (also accepts PERSON, ORGANIZATION, LOCATION)"},{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":100},"description":"Max nodes (1-500)"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{}},"edges":{"type":"array","items":{}}}},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/financial-flow":{"get":{"operationId":"po-analytics-financial-flow-get","summary":"Get financial flow analytics","tags":["Analytics AI — Analytics & BI"],"description":"Cash-flow style analysis — money movement between business partners (Sankey-style aggregates) for the selected period. Permissions: Requires Analytics AI module access on the bearer token.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-financial-flow-get.md"},"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["7d","30d","90d","365d","all"],"default":"30d"},"description":"Time period"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"date_basis":{"type":"string"},"flow_rows":{"type":"array","items":{}},"has_custom_meta_keys":{"type":"boolean"},"meta_mapping":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}},"metric_basis":{"type":"string"},"period":{"type":"string"},"processing_time":{"type":"string"},"sankey":{"type":"object","properties":{"nodes":{"type":"array","items":{}},"links":{"type":"array","items":{}}}},"scope_contract":{"type":"string"},"status":{"type":"string"},"workspace_id":{"type":"string"},"workspace_scope":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/financial-overdue":{"get":{"operationId":"po-analytics-financial-overdue-get","summary":"Get overdue financial items","tags":["Analytics AI — Analytics & BI"],"description":"Overdue invoices — documents past due date with amounts, aging buckets, and partner references where extracted. Permissions: Requires Analytics AI module access on the bearer token.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-financial-overdue-get.md"},"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"as_of_date":{"type":"string"},"count":{"type":"integer"},"date_basis":{"type":"string"},"documents":{"type":"array","items":{}},"has_custom_meta_keys":{"type":"boolean"},"meta_mapping":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}},"metric_basis":{"type":"string"},"period":{"type":"string"},"processing_time":{"type":"string"},"scope_contract":{"type":"string"},"status":{"type":"string"},"total_overdue_amount":{"type":"integer"},"workspace_id":{"type":"string"},"workspace_scope":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/financial-summary":{"get":{"operationId":"po-analytics-financial-summary-get","summary":"Get financial summary","tags":["Analytics AI — Analytics & BI"],"description":"Financial summary — incoming/outgoing invoice totals, top partners, and period aggregates derived from extracted document fields.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-financial-summary-get.md"},"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["7d","30d","90d","365d","all"],"default":"30d"},"description":"Time period"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"aggregation_scope":{"type":"object","properties":{"period":{"type":"string"},"workspace_scope":{"type":"string"},"workspace_id":{"type":"string"},"date_basis":{"type":"string"},"scope_contract":{"type":"string"},"amount_definition":{"type":"string"},"invoice_count_definition":{"type":"string"},"currency_scope":{"type":"string"}}},"financial_meta_config":{"type":"object","properties":{"amount_keys":{"type":"array","items":{}},"partner_keys":{"type":"array","items":{}},"due_date_keys":{"type":"array","items":{}},"document_type_keys":{"type":"array","items":{}},"location_address_keys":{"type":"array","items":{}},"location_city_keys":{"type":"array","items":{}},"location_postal_keys":{"type":"array","items":{}},"location_country_keys":{"type":"array","items":{}},"meta_key_normalization":{"type":"string"}}},"has_custom_meta_keys":{"type":"boolean"},"meta_mapping":{"type":"object","properties":{"configured":{"type":"boolean"},"ready":{"type":"object","properties":{"amounts":{"type":"boolean"},"partners":{"type":"boolean"},"due_dates":{"type":"boolean"},"document_types":{"type":"boolean"},"location":{"type":"boolean"}}},"feature_ready":{"type":"boolean"},"reason":{"type":"string"}}},"period":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"summary":{"type":"object","properties":{"total_amount":{"type":"integer"},"total_amount_scope":{"type":"string"},"invoice_count":{"type":"integer"},"average_amount":{"type":"integer"},"min_amount":{"type":"integer"},"max_amount":{"type":"integer"}}},"top_partners":{"type":"array","items":{}},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/meta-fields-analysis":{"get":{"operationId":"po-analytics-meta-fields-get","summary":"Get meta field analysis","tags":["Analytics AI — Analytics & BI"],"description":"Meta field usage analysis — which IDP extraction fields appear across documents, with coverage and quality metrics.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-meta-fields-get.md"},"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"by_category":{"type":"object","properties":{"other":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"usage_count":{"type":"integer"},"document_count":{"type":"integer"},"unique_values":{"type":"integer"}}}},"content":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"usage_count":{"type":"integer"},"document_count":{"type":"integer"},"unique_values":{"type":"integer"}}}},"identity":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"usage_count":{"type":"integer"},"document_count":{"type":"integer"},"unique_values":{"type":"integer"}}}},"dates":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"usage_count":{"type":"integer"},"document_count":{"type":"integer"},"unique_values":{"type":"integer"}}}},"financial":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"usage_count":{"type":"integer"},"document_count":{"type":"integer"},"unique_values":{"type":"integer"}}}},"parties":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"usage_count":{"type":"integer"},"document_count":{"type":"integer"},"unique_values":{"type":"integer"}}}},"references":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"usage_count":{"type":"integer"},"document_count":{"type":"integer"},"unique_values":{"type":"integer"}}}}}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"category":{"type":"string"},"usage_count":{"type":"integer"},"document_count":{"type":"integer"},"unique_values":{"type":"integer"}}}},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"pages":{"type":"integer"},"min_usage":{"type":"integer"},"category_filter":{"type":"string"},"include_config":{"type":"boolean"}}},"processing_time":{"type":"string"},"status":{"type":"string"},"total_fields":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/overview":{"get":{"operationId":"po-analytics-overview-get","summary":"Get analytics overview","tags":["Analytics AI — Analytics & BI"],"description":"WHEN TO USE: current operational snapshot of the document estate (counts, storage, DMS distribution, module state). For growth over time, processing rate and top document types use po_bi_dashboard_get instead. Do not call both for the...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-overview-get.md"},"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["7d","30d","90d","365d","all"],"default":"30d"},"description":"Time period"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"aggregation_scope":{"type":"object","properties":{"period":{"type":"string"},"workspace_scope":{"type":"string"},"workspace_id":{"type":"string"},"date_basis":{"type":"string"},"scope_contract":{"type":"string"},"primary_basis":{"type":"string"},"stock_fields_suffix":{"type":"string"}}},"metric_definitions":{"type":"object","properties":{"documents.in_period":{"type":"string"},"documents.total_all_time":{"type":"string"},"partners":{"type":"string"},"partners_all_time":{"type":"string"},"distinct_publisher_names":{"type":"string"},"canonical_partners":{"type":"string"},"relations":{"type":"string"},"relations_all_time":{"type":"string"},"entities":{"type":"string"},"entities_all_time":{"type":"string"},"embeddings":{"type":"string"},"embeddings_all_time":{"type":"string"},"dms_intelligence.processed_pct":{"type":"string"},"dms_intelligence.not_searchable_pct":{"type":"string"},"dms_intelligence.embedding_searchable_pct":{"type":"string"},"dms_intelligence.embedding_not_searchable_pct":{"type":"string"}}},"metrics_scope":{"type":"string"},"overview":{"type":"object","properties":{"documents":{"type":"object","properties":{"in_period":{"type":"integer"},"pages_in_period":{"type":"integer"},"total_all_time":{"type":"integer"},"total":{"type":"integer"},"total_pages_all_time":{"type":"integer"},"total_pages":{"type":"integer"},"total_storage_gb":{"type":"number"},"file_storage_gb":{"type":"integer"},"extra_storage_gb":{"type":"number"},"storage_definition":{"type":"string"},"storage_basis":{"type":"string"},"avg_file_size_mb":{"type":"number"}}},"workspaces":{"type":"integer"},"workspaces_active_in_period":{"type":"integer"},"workspaces_details":{"type":"object","properties":{"total":{"type":"integer"},"by_type":{"type":"object","properties":{"folder":{"type":"integer"},"standard":{"type":"integer"}}}}},"partners":{"type":"integer"},"distinct_publisher_names":{"type":"integer"},"partners_all_time":{"type":"integer"},"distinct_publisher_names_all_time":{"type":"integer"},"relations":{"type":"integer"},"relations_all_time":{"type":"integer"},"entities":{"type":"integer"},"entities_all_time":{"type":"integer"},"entities_details":{"type":"object","properties":{"total":{"type":"integer"},"by_type":{"type":"array","items":{}}}},"entities_details_all_time":{"type":"object","properties":{"total":{"type":"integer"},"by_type":{"type":"array","items":{}}}},"embeddings":{"type":"integer"},"embeddings_all_time":{"type":"integer"},"embeddings_details":{"type":"object","properties":{"total":{"type":"integer"},"dimensions":{"type":"integer"},"model":{"type":"string"},"by_type":{"type":"array","items":{}},"total_vectors_size_mb":{"type":"integer"}}},"embeddings_details_all_time":{"type":"object","properties":{"total":{"type":"integer"},"dimensions":{"type":"integer"},"model":{"type":"string"},"by_type":{"type":"object","properties":{"document_summary":{"type":"integer"},"metadata":{"type":"integer"},"contextual":{"type":"integer"},"contextual_summary":{"type":"integer"},"parent":{"type":"integer"}}},"total_vectors_size_mb":{"type":"number"}}},"dms_distribution":{"type":"array","items":{}},"dms_distribution_all_time":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string"},"label":{"type":"string"},"label_de":{"type":"string"},"count":{"type":"integer"}}}},"dms_intelligence":{"type":"object","properties":{"period":{"type":"object","properties":{"document_count":{"type":"integer"},"storage_only_count":{"type":"integer"},"ai_dms_basic_count":{"type":"integer"},"ai_dms_premium_count":{"type":"integer"},"ai_dms_ultra_count":{"type":"integer"},"processed_count":{"type":"integer"},"processed_pct":{"type":"integer"},"intelligence_score":{"type":"integer"},"not_searchable_pct":{"type":"integer"},"not_searchable_pct_basis":{"type":"string"},"documents_with_embeddings":{"type":"integer"},"embedding_searchable_pct":{"type":"integer"},"embedding_not_searchable_pct":{"type":"integer"},"embedding_coverage_basis":{"type":"string"}}},"all_time":{"type":"object","properties":{"document_count":{"type":"integer"},"storage_only_count":{"type":"integer"},"ai_dms_basic_count":{"type":"integer"},"ai_dms_premium_count":{"type":"integer"},"ai_dms_ultra_count":{"type":"integer"},"processed_count":{"type":"integer"},"processed_pct":{"type":"integer"},"intelligence_score":{"type":"integer"},"not_searchable_pct":{"type":"integer"},"not_searchable_pct_basis":{"type":"string"},"documents_with_embeddings":{"type":"integer"},"embedding_searchable_pct":{"type":"integer"},"embedding_not_searchable_pct":{"type":"integer"},"embedding_coverage_basis":{"type":"string"}}}}}}},"period":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/trends":{"get":{"operationId":"po-analytics-trends-get","summary":"Get document trends","tags":["Analytics AI — Analytics & BI"],"description":"Time-based trends — upload volume, processed pages, storage growth, and related metrics over a selectable period. Parameterize with period (e.g. 7d, 30d, 1y) and optional workspace_id for scoped tenants. Permissions: Requires Analytics...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analytics-trends-get.md"},"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["7d","30d","90d","365d","all"],"default":"30d"},"description":"Time period"},{"name":"group_by","in":"query","required":false,"schema":{"type":"string","enum":["day","week","month"],"default":"day"},"description":"Grouping"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"aggregation_scope":{"type":"object","properties":{"period":{"type":"string"},"workspace_scope":{"type":"string"},"workspace_id":{"type":"string"},"date_basis":{"type":"string"},"scope_contract":{"type":"string"},"stock_count_basis":{"type":"string"},"stock_count_excludes":{"type":"array","items":{}},"upload_counts_note":{"type":"string"}}},"group_by":{"type":"string"},"period":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"trends":{"type":"object","properties":{"uploads":{"type":"array","items":{}},"dms_processing":{"type":"array","items":{}},"dms_processing_by_period":{"type":"array","items":{}}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/analytics/workspaces-compare":{"get":{"operationId":"po-workspaces-compare","summary":"Compare workspaces","tags":["Analytics AI — Analytics & BI"],"description":"Compare workspaces side by side — document count, storage, pages, AI processing rate.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-compare.md"},"parameters":[{"name":"workspace_ids","in":"query","required":true,"schema":{"type":"string"},"description":"Comma-separated Workspace IDs (e.g. \"1,2,3\")"}],"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"},"token":{"type":"string"},"workspace_ids":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"comparison":{"type":"array","items":{}},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/crm_intelligence/at_risk":{"get":{"operationId":"po-risk-analysis-get-atrisk-accounts","summary":"Get at-risk accounts","tags":["Relations AI — CRM"],"description":"Accounts with high churn risk. Sorted by risk score, including factors and recommendations.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-risk-analysis-get-atrisk-accounts.md"},"parameters":[{"name":"threshold","in":"query","required":false,"schema":{"type":"string"},"description":"Churn risk threshold (default: 0.5)"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Max results (default: 20, max: 100)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Risiko-Accounts","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"accounts":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/crm_intelligence/document_links/{crm_account_id}":{"get":{"operationId":"po-documents-get-linked-documents","summary":"Get linked documents","tags":["Relations AI — CRM"],"description":"Documents linked to a CRM account. Link Types: - invoice - Invoices - contract - Contracts - quote - Quotes - correspondence - Correspondence - related - Other","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-get-linked-documents.md"},"parameters":[{"name":"crm_account_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Max results (default: 50, max: 200)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"linked_documents":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/crm_intelligence/insights":{"get":{"operationId":"po-insights-get-all-insights","summary":"Get all insights","tags":["Relations AI — CRM"],"description":"All AI Insights across accounts or filtered. Insight Types: - sentiment - communication_sentiment - health_score - relationship_health - churn_risk - attrition_risk - engagement - engagement_level - upsell_potential...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-insights-get-all-insights.md"},"parameters":[{"name":"account_id","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: Filter by CRM account"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: sentiment, health_score, churn_risk, engagement, upsell_potential"},{"name":"min_score","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: Minimum score"},{"name":"max_score","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: Maximum score"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Max results (default: 50, max: 200)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Alle Insights","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"insights":{"type":"array","items":{"type":"object"}},"categories":{"type":"array","items":{"type":"string"}}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/crm_intelligence/insights/{crm_account_id}":{"get":{"operationId":"po-insights-get-account-insights","summary":"Get account insights","tags":["Relations AI — CRM"],"description":"All AI insights for a specific CRM account. Including Overall Health Score and Risk Level.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-insights-get-account-insights.md"},"parameters":[{"name":"crm_account_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Optional CRM account ID for targeted insights."},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by insight type (e.g. 'churn_risk', 'sentiment')."},{"name":"min_score","in":"query","required":false,"schema":{"type":"number"},"description":"Minimum score value for filtering."},{"name":"max_score","in":"query","required":false,"schema":{"type":"number"},"description":"Maximum score threshold for filtering results."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"maximum":200},"description":"Maximum number results."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0},"description":"Offset for pagination."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Account-Insights","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"insights":{"type":"array","items":{"type":"object"}},"generated_at":{"type":"string","format":"date-time"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/crm_intelligence/opportunities":{"get":{"operationId":"po-opportunities-get-upsell-opportunities","summary":"Get upsell opportunities","tags":["Relations AI — CRM"],"description":"Identify upselling opportunities. Accounts with high upselling potential, sorted by score.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-opportunities-get-upsell-opportunities.md"},"parameters":[{"name":"min_potential","in":"query","required":false,"schema":{"type":"string"},"description":"Minimum upsell potential (default: 0.3)"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Max results (default: 20, max: 100)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Upsell-Moeglichkeiten","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"opportunities":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/crm_intelligence/sentiment/{crm_account_id}":{"get":{"operationId":"po-sentiment-get-sentiment-history","summary":"Get sentiment history","tags":["Relations AI — CRM"],"description":"Sentiment analysis for an account over time. Shows sentiment trend from emails and notes.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-sentiment-get-sentiment-history.md"},"parameters":[{"name":"crm_account_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","required":false,"schema":{"type":"string"},"description":"History period in days (default: 90, max: 365)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Sentiment-Verlauf","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"history":{"type":"array","items":{"type":"object"}},"avg_score":{"type":"number"},"trend":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/crm_intelligence/stats":{"get":{"operationId":"po-statistics-get-crm-stats","summary":"Get CRM statistics","tags":["Relations AI — CRM"],"description":"Global CRM Intelligence Statistics. Overview of all accounts, insights, risks, and opportunities.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-statistics-get-crm-stats.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"CRM-Statistiken","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"stats":{"type":"object"},"period":{"type":"string"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/currency_exchange/convert":{"post":{"operationId":"po-currency-convert-currency","summary":"Convert currency","tags":["Data AI — Currency Exchange"],"description":"Convert an amount between two currencies using current exchange rates from the PaperOffice currency service.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-currency-convert-currency.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"Source currency code (ISO 4217, e.g. EUR)."},"to":{"type":"string","description":"Target currency code (ISO 4217, e.g. USD)."},"amount":{"type":"number","description":"Amount to convert (default: 1).","default":1}},"required":["from","to"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"Source currency code (ISO 4217, e.g. EUR)."},"to":{"type":"string","description":"Target currency code (ISO 4217, e.g. USD)."},"amount":{"type":"number","description":"Amount to convert (default: 1).","default":1}},"required":["from","to"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Waehrung konvertieren","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"from":{"type":"string"},"to":{"type":"string"},"amount":{"type":"number"},"converted":{"type":"number"},"rate":{"type":"number"},"operation":{"type":"string"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/currency_exchange/get_rates":{"get":{"operationId":"po-currency-get-exchange-rates","summary":"Get currency exchange rates","tags":["Data AI — Currency Exchange"],"description":"Get current exchange rates for supported currency pairs. Base currency and quote symbols are configurable.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-currency-get-exchange-rates.md"},"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"Base currency code (ISO 4217)"},{"name":"amount","in":"query","required":false,"schema":{"type":"string"},"description":"Base amount (default: 1)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Wechselkurse abrufen","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"base":{"type":"string"},"rates":{"type":"object"},"updated_at":{"type":"string","format":"date-time"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/docs/markdown":{"get":{"operationId":"po-documentation-mcp-server-ai-integration","summary":"Get MCP server integration info","tags":["Documentation & Discovery"],"description":"Returns MCP server integration guidance for AI clients — authentication, profiles, tool discovery, and Document AI patterns.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documentation-mcp-server-ai-integration.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"MCP Server Dokumentation","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"schema":{"type":"object","description":"MCP Server Schema"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"security":[{},{"bearerAuth":[]}]}},"/docs/postman":{"get":{"operationId":"po-documentation-postman-collection","summary":"Get Postman collection","tags":["Documentation & Discovery"],"description":"Returns the live Postman collection JSON. Re-import when the footer release ID changes.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documentation-postman-collection.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Postman Collection herunterladen","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"collection":{"type":"object","description":"Postman Collection JSON"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"security":[{},{"bearerAuth":[]}]}},"/document_delivery/create_and_send":{"post":{"operationId":"po-document-delivery-send","summary":"Send documents by PaperOffice email","tags":["Document AI — DMS"],"description":"WRITE: send stored documents via PaperOffice document delivery email. Required: recipient_email plus pofid or pofids (max 10). Optional: recipient_name, subject, message, language, expires_days (1-30, default 7), security_mode...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-delivery-send.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Single PaperOffice File ID"},"pofids":{"type":"array","description":"One to ten POFIDs","items":{"type":"string"}},"recipient_email":{"type":"string","description":"Recipient email address"},"recipient_name":{"type":"string","description":"Optional recipient display name"},"recipient_phone":{"type":"string","description":"E.164 phone for security_mode=secure_sms"},"subject":{"type":"string","description":"Email subject"},"message":{"type":"string","description":"Optional personal message"},"language":{"type":"string","description":"Recipient language code (default en)"},"expires_days":{"type":"integer","description":"Link lifetime 1-30 days, default 7"},"security_mode":{"type":"string","description":"link = email link; secure_sms = SMS OTP + phone required","enum":["link","secure_sms"]}},"required":["recipient_email"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Single PaperOffice File ID"},"pofids":{"type":"array","description":"One to ten POFIDs","items":{"type":"string"}},"recipient_email":{"type":"string","description":"Recipient email address"},"recipient_name":{"type":"string","description":"Optional recipient display name"},"recipient_phone":{"type":"string","description":"E.164 phone for security_mode=secure_sms"},"subject":{"type":"string","description":"Email subject"},"message":{"type":"string","description":"Optional personal message"},"language":{"type":"string","description":"Recipient language code (default en)"},"expires_days":{"type":"integer","description":"Link lifetime 1-30 days, default 7"},"security_mode":{"type":"string","description":"link = email link; secure_sms = SMS OTP + phone required","enum":["link","secure_sms"]}},"required":["recipient_email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_delivery/create_redact_preview_link":{"post":{"operationId":"po-anonymization-preview-link","summary":"Create redaction preview link (integrators)","tags":["Document AI — Anonymization"],"description":"POST /document_delivery/create_redact_preview_link (JSON or form, Bearer). Params: preview_job_id (required, finished document_anonymize_preview job of this account), ttl_sec (300–604800, default 86400), allow_finalize (default true)...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-preview-link.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"preview_job_id":{"type":"string","description":"Job ID of a finished (or running) document_anonymize_preview / image_anonymize_preview job owned by your account."},"ttl_sec":{"type":"integer","description":"Link lifetime in seconds (5 minutes … 7 days, default 24 hours).","default":86400,"minimum":300,"maximum":604800},"allow_finalize":{"type":"boolean","description":"false = review only, the page cannot start the finalize job.","default":true},"language":{"type":"string","description":"UI language of the review page.","enum":["de","en"],"default":"de"},"callback_url":{"type":"string","description":"Optional public http(s) URL. After a finalize started from the page completes, PaperOffice POSTs a signed JSON event (event_type redact_preview.finalized | redact_preview.failed; preview_job_id, finalize_job_id, status, download_url). Retries with backoff; one credit per delivered event (webhook_delivery).","default":""},"callback_secret":{"type":"string","description":"Optional HMAC secret (max 100 chars) for X-PaperOffice-Signature: sha256=HMAC-SHA256(body). Omit to receive a generated secret once in the response.","default":""}},"required":["preview_job_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"preview_job_id":{"type":"string","description":"Job ID of a finished (or running) document_anonymize_preview / image_anonymize_preview job owned by your account."},"ttl_sec":{"type":"integer","description":"Link lifetime in seconds (5 minutes … 7 days, default 24 hours).","default":86400,"minimum":300,"maximum":604800},"allow_finalize":{"type":"boolean","description":"false = review only, the page cannot start the finalize job.","default":true},"language":{"type":"string","description":"UI language of the review page.","enum":["de","en"],"default":"de"},"callback_url":{"type":"string","description":"Optional public http(s) URL. After a finalize started from the page completes, PaperOffice POSTs a signed JSON event (event_type redact_preview.finalized | redact_preview.failed; preview_job_id, finalize_job_id, status, download_url). Retries with backoff; one credit per delivered event (webhook_delivery).","default":""},"callback_secret":{"type":"string","description":"Optional HMAC secret (max 100 chars) for X-PaperOffice-Signature: sha256=HMAC-SHA256(body). Omit to receive a generated secret once in the response.","default":""}},"required":["preview_job_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PII detection preview (without redaction)","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","properties":{"pii_found":{"type":"boolean","description":"Whether PII data was found"},"pii_count":{"type":"number","description":"Number of PII matches found"},"pii_details":{"type":"array","description":"Details for each PII match","items":{"type":"object","properties":{"type":{"type":"string","description":"PII type (name, email, phone, iban, etc.)"},"value":{"type":"string","description":"Gefundener Wert"},"page":{"type":"number"},"position":{"type":"object"},"confidence":{"type":"number"}}}}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_delivery/detail":{"post":{"operationId":"po-document-delivery-get","summary":"Get document delivery status","tags":["Document AI — DMS"],"description":"READ: delivery detail. Required: delivery_id. Returns status, recipient, files, events, display_status. Use after po_document_delivery_send.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-delivery-get.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"delivery_id":{"type":"integer","description":"Delivery id from send"}},"required":["delivery_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"delivery_id":{"type":"integer","description":"Delivery id from send"}},"required":["delivery_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_delivery/list_by_pofid":{"post":{"operationId":"po-document-delivery-list","summary":"List deliveries for a document","tags":["Document AI — DMS"],"description":"READ: deliveries for one document. Required: pofid. Optional: limit, offset. Returns delivery_id, status, recipient_email, created_at.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-delivery-list.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"limit":{"type":"integer","description":"Max rows (1-200, default 100)"},"offset":{"type":"integer","description":"Pagination offset"}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"limit":{"type":"integer","description":"Max rows (1-200, default 100)"},"offset":{"type":"integer","description":"Pagination offset"}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"document_pofid":{"type":"string"},"deliveries":{"type":"array","items":{}},"count":{"type":"integer"},"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"has_more":{"type":"boolean"},"q":{"type":"string"},"sort":{"type":"string"},"sort_dir":{"type":"string"},"filter":{"type":"string"},"kpis":{"type":"object","properties":{"total":{"type":"integer"},"active":{"type":"integer"},"downloaded":{"type":"integer"},"revoked":{"type":"integer"}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_delivery/resend":{"post":{"operationId":"po-document-delivery-resend","summary":"Resend a failed document delivery","tags":["Document AI — DMS"],"description":"WRITE: resend invite email for delivery_id when status is pending or failed. Not allowed after revoke. Required: delivery_id.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-delivery-resend.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"delivery_id":{"type":"integer","description":"ID of the document delivery to send again (from the delivery list)."}},"required":["delivery_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"delivery_id":{"type":"integer","description":"ID of the document delivery to send again (from the delivery list)."}},"required":["delivery_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_delivery/revoke":{"post":{"operationId":"po-document-delivery-revoke","summary":"Revoke a document delivery link","tags":["Document AI — DMS"],"description":"WRITE: revoke delivery_id. The recipient download link is invalidated. Required: delivery_id.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-delivery-revoke.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"delivery_id":{"type":"integer","description":"ID of the document delivery whose access link is revoked."}},"required":["delivery_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"delivery_id":{"type":"integer","description":"ID of the document delivery whose access link is revoked."}},"required":["delivery_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/create-from-content":{"post":{"operationId":"po-documents-create-from-content","summary":"Create Document from Content","tags":["Document AI — DMS"],"description":"Generate a PDF in the DMS from Markdown or HTML.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-create-from-content.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Markdown or HTML source (required). Not html_content."},"content_type":{"type":"string","description":"Format of the content field.","enum":["markdown","html"],"default":"markdown"},"output_format":{"type":"string","description":"Output format of the created document","enum":["pdf"],"default":"pdf"},"title":{"type":"string","description":"Document title (also used as the filename)"},"workspace_id":{"type":"integer","description":"Target workspace ID (required). Use po_workspaces_list to find valid workspace IDs.","minimum":1},"metadata":{"type":"object","description":"Metadata as key-value pairs (stored as IDP fields)."},"language":{"type":"string","description":"Language for formatting (de/en)","default":"de"},"auto_classify":{"type":"boolean","description":"Automatic classification after creation.","default":false},"custom_css":{"type":"string","description":"Additionals CSS for the PDF-Layout"},"header_html":{"type":"string","description":"HTML for page header"},"footer_html":{"type":"string","description":"HTML for footer"},"priority":{"type":"integer","description":"LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product.","minimum":0,"maximum":900,"deprecated":true},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["content","content_type","workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/create-from-template":{"post":{"operationId":"po-documents-create-from-template","summary":"Create Document from Template","tags":["Document AI — DMS"],"description":"Create a new PDF document in a workspace from a document generation template and store it in the DMS.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-create-from-template.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Template ID from po_templates_list (e.g. tpl_invoice_standard_1a2b3c4d)."},"variables":{"type":"object","description":"Template placeholder values as a JSON object, not an array. Required. JSON [] returns HTTP 400 VARIABLES_INVALID. Empty object {} is allowed and then checked against variables_schema.required. Fields listed in the template variables_schema.required must be present and non-empty or the call returns HTTP 400 and creates no document. Extra keys are allowed. Arrays for {{#each}} blocks."},"output_format":{"type":"string","description":"Rendered output format. Only pdf is available.","enum":["pdf"],"default":"pdf"},"workspace_id":{"type":"integer","description":"Target workspace ID (required). Use po_workspaces_list to find valid workspace IDs. The caller needs upload rights in this workspace.","minimum":1},"title":{"type":"string","description":"Document title (overrides the template name). May contain {{variable}} placeholders."},"metadata":{"type":"object","description":"Additional metadata stored as document meta fields."},"auto_classify":{"type":"boolean","description":"When true, order AI-DMS processing for the generated document (billed separately).","default":false},"ai_dms_tier":{"type":"string","description":"AI-DMS tier used when auto_classify is true and the workspace does not order AI-DMS automatically.","enum":["basic","premium","ultra"],"default":"basic"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"template_version":{"type":"integer","description":"Corporate plan and above: Pin a template version (default: current). List versions with po_templates_versions_list.","minimum":1},"locale":{"type":"string","description":"Corporate plan and above: Locale for numbers, dates and currency (e.g. de_DE, en_GB). Default: template locale, then workspace locale."},"idempotency_key":{"type":"string","description":"Corporate plan and above: Retry-safe key: the same key with the same request returns the first document (HTTP 200, no second charge); with a different request HTTP 409.","minLength":8,"maxLength":128}},"required":["template_id","variables","workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/creator-agent-delete":{"post":{"operationId":"po-documents-creator-agent-delete","summary":"Delete Creator Agent","tags":["Document AI — DMS"],"description":"Delete a Creator Agent. Documents it already created are not affected.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-creator-agent-delete.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Creator Agent ID to delete."}},"required":["agent_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/creator-agent-get":{"post":{"operationId":"po-documents-creator-agent-get","summary":"Get Creator Agent","tags":["Document AI — DMS"],"description":"Read one Creator Agent with its full configuration and the default configuration as reference.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-creator-agent-get.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Creator Agent ID (crea_…)."}},"required":["agent_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/creator-agent-preview":{"post":{"operationId":"po-documents-creator-agent-preview","summary":"Preview Document with Creator Agent","tags":["Document AI — DMS"],"description":"Let a Creator Agent prepare a document from a free-text request, e.g. \"Create a grating quotation for Muster GmbH: 3 pressed gratings 1000 x 500 galvanised\". The agent reads its knowledge bases (prices, rules), Relations AI (recipient...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-creator-agent-preview.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Creator Agent ID from po_documents_creator_agents_list."},"prompt":{"type":"string","description":"What to create, with all facts the user gave (recipient, items, quantities, numbers).","maxLength":8000},"variables":{"type":"object","description":"Known values that must be used as given (they win over the agent)."},"source_pofid":{"type":"string","description":"Optional document whose text serves as a fact source (e.g. an inquiry)."},"workspace_id":{"type":"integer","description":"Target workspace (default: agent configuration)."},"locale":{"type":"string","description":"Locale for numbers, dates and currency (e.g. de_DE)."},"output":{"type":"string","description":"none skips the preview PDF.","enum":["pdf","none"],"default":"pdf"}},"required":["agent_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/creator-agent-put":{"post":{"operationId":"po-documents-creator-agent-save","summary":"Create or Update Creator Agent","tags":["Document AI — DMS"],"description":"Create a Creator Agent (omit agent_id, HTTP 201) or update one (HTTP 200; agent_config keys are merged into the stored configuration).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-creator-agent-save.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Omit to create; set to update an existing Creator Agent."},"name":{"type":"string","description":"Display name (required when creating).","maxLength":200},"active":{"type":"boolean","description":"Activate or deactivate the agent."},"notes":{"type":"string","description":"Internal notes."},"agent_config":{"type":"object","description":"Configuration (see description). Required when creating; partial objects are merged when updating.","properties":{"template_id":{"type":"string"},"template_version":{"type":"integer","description":"Omit or null for the current version.","minimum":1},"workspace_id":{"type":"integer"},"knowledge_ids":{"type":"array","items":{"type":"integer"}},"pinned_article_ids":{"type":"array","items":{"type":"string"}},"instruction":{"type":"string"},"writing_rules":{"type":"object"},"default_variables":{"type":"object"},"llm_tier":{"type":"string","description":"Agent tier (default basic).","enum":["basic","premium","ultra"]},"numbers_policy":{"type":"string","enum":["grounded_only","allow_llm"]},"use_crm":{"type":"boolean"},"use_company_profile":{"type":"boolean"},"use_documents":{"type":"boolean"},"review_mode":{"type":"string","enum":["preview_required","auto"]},"locale":{"type":"string"},"title_pattern":{"type":"string"},"ai_dms_tier":{"type":"string"},"numbering":{"type":"object","description":"Automatic numbering: path (text field, e.g. offer.number) and pattern with {SEQ} or {SEQ:n} and optional {YYYY} {YY} {MM} {DD}. null disables.","properties":{"path":{"type":"string"},"pattern":{"type":"string"}}}}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/creator-agent-run":{"post":{"operationId":"po-documents-creator-agent-run","summary":"Create Document with Creator Agent","tags":["Document AI — DMS"],"description":"Create and store the document of a Creator Agent in the DMS.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-creator-agent-run.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Creator Agent ID."},"preview_token":{"type":"string","description":"Token from po_documents_creator_agent_preview (or from a NEEDS_INPUT / CONFIRMATION_REQUIRED response)."},"confirm":{"type":"boolean","description":"Must be true to create the document. Only set after the user approved the preview.","default":false},"variables":{"type":"object","description":"Answers to questions or corrections; merged over the preview values."},"prompt":{"type":"string","description":"Direct run only: the request.","maxLength":8000},"workspace_id":{"type":"integer","description":"Target workspace (default: preview/agent configuration)."},"title":{"type":"string","description":"Document title (placeholders allowed)."},"ai_dms_tier":{"type":"string","description":"Classify the stored document with AI-DMS at this tier (billed separately).","enum":["basic","premium","ultra"]},"idempotency_key":{"type":"string","description":"Direct run in auto mode: retry-safe key. Ignored with preview_token (the token is the key).","minLength":8,"maxLength":128},"accept_open_questions":{"type":"boolean","description":"Create the document although blocking questions of the preview are unanswered (e.g. leave out an item without price). Only set after the user agreed.","default":false}},"required":["agent_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/creator-agents-list":{"post":{"operationId":"po-documents-creator-agents-list","summary":"List Creator Agents","tags":["Document AI — DMS"],"description":"List the account's Creator Agents. A Creator Agent writes business documents (quotations, letters, filled forms) on a stored template or letterhead, using the request, knowledge bases, Relations AI (CRM), the company profile and...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-creator-agents-list.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"include_inactive":{"type":"boolean","description":"Also list deactivated Creator Agents.","default":false}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/creator-run-get":{"post":{"operationId":"po-documents-creator-run-get","summary":"Get Creator Agent Run","tags":["Document AI — DMS"],"description":"Read one Creator Agent run with the full request, questions, missing fields, assumptions, removed ungrounded values, sources and the created document.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-creator-run-get.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"run_id":{"type":"string","description":"Run ID (= preview_token) from po_documents_creator_runs_list."}},"required":["run_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"run_id":{"type":"string","description":"Run ID (= preview_token) from po_documents_creator_runs_list."}},"required":["run_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/creator-runs-list":{"post":{"operationId":"po-documents-creator-runs-list","summary":"List Creator Agent Runs","tags":["Document AI — DMS"],"description":"List Creator Agent runs (one run = one preview request), newest first, with the created document when the run was confirmed.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-creator-runs-list.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Only runs of this Creator Agent."},"template_id":{"type":"string","description":"Only runs on this template."},"state":{"type":"string","description":"Filter by state.","enum":["created","needs_input","preview","failed"]},"since_days":{"type":"integer","description":"Only runs of the last N days.","minimum":1},"limit":{"type":"integer","default":50,"minimum":1,"maximum":200},"offset":{"type":"integer","default":0,"minimum":0}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","description":"Only runs of this Creator Agent."},"template_id":{"type":"string","description":"Only runs on this template."},"state":{"type":"string","description":"Filter by state.","enum":["created","needs_input","preview","failed"]},"since_days":{"type":"integer","description":"Only runs of the last N days.","minimum":1},"limit":{"type":"integer","default":50,"minimum":1,"maximum":200},"offset":{"type":"integer","default":0,"minimum":0}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-create":{"post":{"operationId":"po-templates-create","summary":"Create Document Template","tags":["Document AI — DMS"],"description":"Create a reusable document generation template (HTML with {{placeholder}} merge fields) for po_documents_create_from_template.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Optional template ID (auto-generated from name when omitted)."},"name":{"type":"string","description":"Display name for the template."},"html_content":{"type":"string","description":"HTML body with {{variable}} placeholders for merge fields (max 5 MB)."},"description":{"type":"string","description":"Optional template description."},"category":{"type":"string","description":"Category (e.g. invoices, contracts, reports).","default":"general"},"variables_schema":{"type":"object","description":"Schema of expected template variables; fields in its required list must be present and non-empty when generating."},"page_format":{"type":"string","description":"Page size (A4, A3, A5, Letter, Legal).","default":"A4"},"page_orientation":{"type":"string","description":"Page orientation: portrait or landscape.","enum":["portrait","landscape"],"default":"portrait"},"margin_top":{"type":"integer","description":"Top page margin in millimeters.","default":20,"minimum":0,"maximum":100},"margin_right":{"type":"integer","description":"Right page margin in millimeters.","default":15,"minimum":0,"maximum":100},"margin_bottom":{"type":"integer","description":"Bottom page margin in millimeters.","default":20,"minimum":0,"maximum":100},"margin_left":{"type":"integer","description":"Left page margin in millimeters.","default":15,"minimum":0,"maximum":100},"header_html":{"type":"string","description":"HTML rendered at the top of each page (max 512 KB)."},"footer_html":{"type":"string","description":"HTML rendered at the bottom of each page (max 512 KB)."},"engine":{"type":"string","description":"Corporate plan and above: Template engine: hbs_v2 (conditions, loops, paths, locale helpers) or po_regex_v1 (legacy).","enum":["hbs_v2","po_regex_v1"],"default":"hbs_v2"},"custom_css":{"type":"string","description":"Corporate plan and above: CSS for the document (url() and @import are removed)."},"sample_data":{"type":"object","description":"Corporate plan and above: Sample variables for preview and validation."},"locale_default":{"type":"string","description":"Corporate plan and above: Default locale (e.g. de_DE)."},"title_pattern":{"type":"string","description":"Corporate plan and above: Default document title with placeholders."},"image_data":{"type":"string","description":"Corporate plan and above: Template image for the app: https URL or PNG/JPEG/WebP/SVG data URI (max 2 MB); empty string removes it."},"change_note":{"type":"string","description":"Corporate plan and above: Note stored with version 1."}},"required":["name","html_content"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-create-from-document":{"post":{"operationId":"po-templates-create-from-document","summary":"Create Template from Document","tags":["Document AI — DMS"],"description":"Turn a Word, OpenDocument, RTF, HTML or text document that is already stored in the DMS into an editable template (version 1). Letterhead images are embedded, header and footer are kept separately, and existing {{placeholders}} in the...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-create-from-document.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"POFID of the source document (DOCX, DOC, ODT, RTF, HTML, TXT) in the DMS."},"name":{"type":"string","description":"Optional template name (default: file name)."},"category":{"type":"string","description":"Optional category (default: general)."},"template_id":{"type":"string","description":"Optional template ID (auto-generated when omitted)."},"locale_default":{"type":"string","description":"Optional default locale, e.g. de_DE."}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"POFID of the source document (DOCX, DOC, ODT, RTF, HTML, TXT) in the DMS."},"name":{"type":"string","description":"Optional template name (default: file name)."},"category":{"type":"string","description":"Optional category (default: general)."},"template_id":{"type":"string","description":"Optional template ID (auto-generated when omitted)."},"locale_default":{"type":"string","description":"Optional default locale, e.g. de_DE."}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-create-from-starter":{"post":{"operationId":"po-templates-create-from-starter","summary":"Create Template from Starter","tags":["Document AI — DMS"],"description":"Copy a starter template into the account as a new editable template (version 1).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-create-from-starter.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starter_key":{"type":"string","description":"Starter key from po_templates_starters_list (e.g. offer_de)."},"template_id":{"type":"string","description":"Optional template ID (auto-generated when omitted)."},"name":{"type":"string","description":"Optional display name."}},"required":["starter_key"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-delete":{"post":{"operationId":"po-templates-delete","summary":"Delete Document Template","tags":["Document AI — DMS"],"description":"Delete (deactivate) a document generation template. The template disappears from po_templates_list and can no longer be used for generation; documents already generated are not affected. Reactivate it with po_templates_update and...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-delete.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Template ID to deactivate."}},"required":["template_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-get":{"post":{"operationId":"po-templates-get","summary":"Get Document Template","tags":["Document AI — DMS"],"description":"Retrieve one document generation template by ID, including html_content, header_html, footer_html, page layout and variables_schema.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-get.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Template ID from po_templates_list."},"include_inactive":{"type":"boolean","description":"Also return a deactivated (deleted) template.","default":false},"version":{"type":"integer","description":"Corporate plan and above: Read a specific version (default: current).","minimum":1}},"required":["template_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-preview":{"post":{"operationId":"po-templates-preview","summary":"Preview Document Template","tags":["Document AI — DMS"],"description":"Render a template with variables (or its stored sample data) to a watermarked PDF (pdf_base64, max 8 MB) or to HTML (output=html) without storing a document and without the per-document price. Returns missing variables, unknown helpers...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-preview.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Stored template to preview."},"template_version":{"type":"integer","description":"Version to preview (default: current).","minimum":1},"variables":{"type":"object","description":"Variables to render; omit to use the stored sample_data."},"locale":{"type":"string","description":"Locale for numbers, dates and currency (e.g. de_DE, en_GB)."},"output":{"type":"string","description":"Preview format.","enum":["pdf","html"],"default":"pdf"},"html_content":{"type":"string","description":"Inline template instead of template_id."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-starters-list":{"post":{"operationId":"po-templates-starters-list","summary":"List Starter Templates","tags":["Document AI — DMS"],"description":"List ready-made starter templates (quotation, invoice, business letter, certificate; German and English) with their variable schema.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-starters-list.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","description":"Filter by language.","enum":["de","en"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-update":{"post":{"operationId":"po-templates-update","summary":"Update Document Template","tags":["Document AI — DMS"],"description":"Update an existing document generation template: HTML content, header/footer, page layout, metadata, variables_schema or is_active.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-update.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Template ID to update (required)."},"name":{"type":"string","description":"Updated template display name."},"html_content":{"type":"string","description":"Updated HTML body with {{variable}} merge placeholders (max 5 MB)."},"description":{"type":"string","description":"Updated template description."},"category":{"type":"string","description":"Template category (e.g. invoices, contracts, reports)."},"variables_schema":{"type":"object","description":"Schema describing expected merge-field variables; its required list is enforced when generating."},"page_format":{"type":"string","description":"Page size (A4, A3, A5, Letter, Legal)."},"page_orientation":{"type":"string","description":"Page orientation: portrait or landscape.","enum":["portrait","landscape"]},"margin_top":{"type":"integer","description":"Top page margin in millimeters.","minimum":0,"maximum":100},"margin_right":{"type":"integer","description":"Right page margin in millimeters.","minimum":0,"maximum":100},"margin_bottom":{"type":"integer","description":"Bottom page margin in millimeters.","minimum":0,"maximum":100},"margin_left":{"type":"integer","description":"Left page margin in millimeters.","minimum":0,"maximum":100},"header_html":{"type":"string","description":"HTML snippet rendered at the top of each page (max 512 KB)."},"footer_html":{"type":"string","description":"HTML snippet rendered at the bottom of each page (max 512 KB)."},"is_active":{"type":"integer","description":"1 = active template, 0 = deactivated (hidden from lists and generation).","enum":[0,1]},"engine":{"type":"string","description":"Corporate plan and above: Template engine.","enum":["hbs_v2","po_regex_v1"]},"custom_css":{"type":"string","description":"Corporate plan and above: CSS for the document."},"sample_data":{"type":"object","description":"Corporate plan and above: Sample variables for preview and validation."},"locale_default":{"type":"string","description":"Corporate plan and above: Default locale (e.g. de_DE)."},"title_pattern":{"type":"string","description":"Corporate plan and above: Default document title with placeholders."},"image_data":{"type":"string","description":"Corporate plan and above: Template image for the app: https URL or PNG/JPEG/WebP/SVG data URI (max 2 MB); empty string removes it."},"change_note":{"type":"string","description":"Corporate plan and above: Note stored with the new version."},"expected_version":{"type":"integer","description":"Corporate plan and above: Optimistic lock: fail with HTTP 409 if the current version differs.","minimum":1},"restore_version":{"type":"integer","description":"Corporate plan and above: Create a new version with the content of this older version.","minimum":1}},"required":["template_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-validate":{"post":{"operationId":"po-templates-validate","summary":"Validate Document Template","tags":["Document AI — DMS"],"description":"Check a stored template (template_id, optional template_version) or an inline html_content: syntax errors with line and column, used variables, lists, conditions and images, unknown helpers, schema cross-check and sample data check...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-validate.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Stored template to check."},"template_version":{"type":"integer","description":"Version to check (default: current).","minimum":1},"html_content":{"type":"string","description":"Inline template to check instead of template_id."},"engine":{"type":"string","description":"Engine for inline templates (default hbs_v2).","enum":["hbs_v2","po_regex_v1"]},"variables_schema":{"type":"object","description":"Inline schema to cross-check."},"sample_data":{"type":"object","description":"Inline sample data to check against the schema."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/template-versions":{"post":{"operationId":"po-templates-versions-list","summary":"List Document Template Versions","tags":["Document AI — DMS"],"description":"List all immutable versions of a document generation template (newest first) with engine, page layout, content hash and change note.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-versions-list.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"template_id":{"type":"string","description":"Template ID."}},"required":["template_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_generation/templates-list":{"post":{"operationId":"po-templates-list","summary":"List Document Templates","tags":["Document AI — DMS"],"description":"List the active document generation templates of the account with name, category, page layout and variables_schema.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-templates-list.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","description":"Category filter (e.g. invoices, contracts, reports)."},"limit":{"type":"integer","description":"Maximum number of templates to return (1-200).","default":50,"minimum":1,"maximum":200},"offset":{"type":"integer","description":"Pagination offset (0-based, default 0).","default":0,"minimum":0},"include_inactive":{"type":"boolean","description":"Corporate plan and above: Also list deactivated templates.","default":false},"search":{"type":"string","description":"Corporate plan and above: Search in name, template_id and description."}}}}}},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"limit":{"type":"integer"},"offset":{"type":"integer"},"processing_time":{"type":"string"},"status":{"type":"string"},"templates":{"type":"array","items":{}},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/embeddings/search":{"post":{"operationId":"po-embeddings-search","summary":"Search embeddings","tags":["Document AI — AI Document Operations"],"description":"Direct semantic vector search over Document Intelligence embeddings. Choose embedding type (document_summary, page, paragraph, metadata), min-score and workspace filter.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-embeddings-search.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search query (natural language)"},"embedding_type":{"type":"string","description":"Embedding layer","enum":["document_summary","document_full","page","paragraph","metadata"],"default":"document_summary"},"workspace_id":{"type":"number","description":"Limit to workspace"},"limit":{"type":"number","description":"Max results (1-50)","default":10},"min_score":{"type":"number","description":"Min similarity (0.0-1.0, default 0.3)","default":0.3,"minimum":0,"maximum":1}},"required":["query"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search query (natural language)"},"embedding_type":{"type":"string","description":"Embedding layer","enum":["document_summary","document_full","page","paragraph","metadata"],"default":"document_summary"},"workspace_id":{"type":"number","description":"Limit to workspace"},"limit":{"type":"number","description":"Max results (1-50)","default":10},"min_score":{"type":"number","description":"Min similarity (0.0-1.0, default 0.3)","default":0.3,"minimum":0,"maximum":1}},"required":["query"]}}}},"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"},"option":{"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"embedding_type":{"type":"string"},"min_score":{"type":"number"},"processing_time":{"type":"string"},"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"score":{"type":"number"},"document":{"type":"object","properties":{"documents_id":{"type":"integer"},"pofid":{"type":"string"},"file_name":{"type":"string"},"workspace_id":{"type":"integer"}}},"embedding_type":{"type":"string"},"page_number":{"type":"string"},"chunk_index":{"type":"string"},"source_text":{"type":"string"}}}},"status":{"type":"string"},"total":{"type":"integer"},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/embeddings/{documents_id}":{"get":{"operationId":"po-embeddings-document-get","summary":"Get document embeddings (read)","tags":["Document AI — AI Document Operations"],"description":"Read all embedding types of a document — summary, full, page, paragraph, metadata, entity, and vision layers where available.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-embeddings-document-get.md"},"parameters":[{"name":"documents_id","in":"path","required":true,"schema":{"type":["string","number"]},"description":"Document ID (numeric, from po_documents_search)"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Embedding type: document_summary, document_full, page, paragraph, metadata, entity"},{"name":"include_vectors","in":"query","required":false,"schema":{"type":"boolean"},"description":"Include raw embedding vectors (large payload; default: false)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/entities/canonical":{"get":{"operationId":"po-entities-get-canonical-entities","summary":"Get canonical entities (entity index)","tags":["Document AI — AI Document Operations"],"description":"Canonical deduplicated entities across all documents. Shows how often an entity appears in different documents.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-entities-get-canonical-entities.md"},"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: Filter by entity type"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: Filter by workspace"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: Search term"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Max results (default: 100, max: 500)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Kanonische Entitaeten","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/entities/search":{"get":{"operationId":"po-intelligence-entities-search","summary":"Search entities across documents","tags":["Analytics AI — Knowledge Graph"],"description":"Search for entities (companies, persons, IBANs, amounts, etc.) across all documents. Uses the entity index automatically built from your documents by the Document Intelligence pipeline.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-intelligence-entities-search.md"},"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string"},"description":"Search term (Firmenname, Person, IBAN, etc.)"},{"name":"entity_type","in":"query","required":false,"schema":{"type":"string","enum":["company","person","iban","amount","reference","address","email","phone","date","all"]},"description":"Filter by entity type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Max. results (default: 20)"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Entity type filter (e.g. person, organization, location)."},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"integer"},"description":"Workspace ID to scope entity search."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Entity-Suche","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"},"option":{"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"canonical_row_note":{"type":"string"},"canonical_semantics":{"type":"string"},"document_count_scope":{"type":"string"},"entity_type_filter":{"type":"string"},"min_confidence":{"type":"integer"},"presentation":{"type":"string"},"processing_time":{"type":"string"},"query":{"type":"string"},"results":{"type":"array","items":{}},"status":{"type":"string"},"total":{"type":"integer"},"workspace_id":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/entities/{pofid}":{"get":{"operationId":"po-knowledge-graph-document-entities-get","summary":"Get knowledge graph document entities","tags":["Analytics AI — Knowledge Graph"],"description":"Returns all extracted entities for a document — companies, persons, amounts, dates, locations, IBANs, products, and custom types. Requires prior Document AI / IDP processing.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-document-entities-get.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"}},{"name":"include_relations","in":"query","required":false,"schema":{"type":"string"},"description":"Include entity-entity relations"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Document entities","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"entities":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/image_embeddings/{documents_id}":{"get":{"operationId":"po-intelligence-image-embeddings-get","summary":"Get image embeddings","tags":["Analytics AI — Knowledge Graph"],"description":"Get image embeddings of a document — visual representations of logos, stamps, signatures, page previews. Enables visual similarity search. NOTE: Requires AI-DMS tier \"ultra\" and documents with detected visual elements (logos, stamps...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-intelligence-image-embeddings-get.md"},"parameters":[{"name":"documents_id","in":"path","required":true,"schema":{"type":["string","number"]},"description":"Document ID (numeric, from po_documents_search)"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Element type: logo, picture, stamp, signature, page"},{"name":"include_snippets","in":"query","required":false,"schema":{"type":"boolean"},"description":"Include WebP preview images"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/knowledge_graph/document/{pofid}":{"get":{"operationId":"po-knowledge-graph-document-graph-get","summary":"Get knowledge graph for document (path param)","tags":["Analytics AI — Knowledge Graph"],"description":"Returns an interactive graph centered on one document — nodes, edges, group styling, and layout options.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-document-graph-get.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"}},{"name":"depth","in":"query","required":false,"schema":{"type":"string"},"description":"Hop depth 1-3 (3 requires ULTRA)"},{"name":"include_entities","in":"query","required":false,"schema":{"type":"string"},"description":"Include entity nodes (companies, persons, etc.)"},{"name":"max_nodes","in":"query","required":false,"schema":{"type":"string"},"description":"Maximum nodes to return (max: 200)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Document graph","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"nodes":{"type":"array","items":{"type":"object"}},"edges":{"type":"array","items":{"type":"object"}},"node_count":{"type":"number"},"edge_count":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/knowledge_graph/workspace/{workspace_id}":{"get":{"operationId":"po-knowledge-graph-workspace-graph-get","summary":"Get workspace knowledge graph (path param)","tags":["Analytics AI — Knowledge Graph"],"description":"Returns an interactive graph for an entire workspace — all documents and their relationships with the same node/edge structure as the document graph endpoint.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-workspace-graph-get.md"},"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"include_entities","in":"query","required":false,"schema":{"type":"string"},"description":"Include entity nodes"},{"name":"max_nodes","in":"query","required":false,"schema":{"type":"string"},"description":"Maximum graph nodes (default 100, maximum 300 per request)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Workspace-Graph","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"nodes":{"type":"array","items":{"type":"object"}},"edges":{"type":"array","items":{"type":"object"}},"node_count":{"type":"number"},"edge_count":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/meta_fields/{pofid}":{"get":{"operationId":"po-document-analysis-metadata","summary":"Get document metadata","tags":["Document AI — AI Document Operations"],"description":"Get document analysis metadata including extraction confidence, model hints, and field coverage for a processed document.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-analysis-metadata.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"type":"string"},"description":"Optional filter: financial, parties, metadata, dates, content, etc."},{"name":"processing_lane","in":"query","required":false,"schema":{"type":"string","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Extract document metadata","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"metadata":{"type":"object","description":"Extracted metadata"},"document_type":{"type":"string"},"language":{"type":"string"},"page_count":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/publisher/{documents_id}":{"get":{"operationId":"po-intelligence-publisher-get","summary":"Get publisher profile","tags":["Analytics AI — Knowledge Graph"],"description":"Detect the sender/publisher of a document from logos, letterheads, and metadata. Returns company name, logo URL, aliases, and industry when available.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-intelligence-publisher-get.md"},"parameters":[{"name":"documents_id","in":"path","required":true,"schema":{"type":["string","number"]},"description":"Document ID (numeric, from po_documents_search)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/publishers":{"get":{"operationId":"po-intelligence-publishers-list","summary":"List publishers","tags":["Analytics AI — Knowledge Graph"],"description":"List all automatically detected publishers/senders across all documents. Shows frequency, industry and logo.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-intelligence-publishers-list.md"},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":50},"description":"Max results (1-500)"},{"name":"offset","in":"query","required":false,"schema":{"type":"number","default":0},"description":"Pagination offset"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Search publisher name"},{"name":"industry","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by industry"}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"limit":{"type":"integer"},"offset":{"type":"integer"},"processing_time":{"type":"string"},"publishers":{"type":"array","items":{"type":"object","properties":{"publisher_id":{"type":"integer"},"canonical_name":{"type":"string"},"legal_name":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"industry":{"type":"string"},"category":{"type":"string"},"documents_total":{"type":"integer"},"logos_count":{"type":"integer"},"aliases_count":{"type":"integer"},"is_verified":{"type":"boolean"}}}},"search":{"type":"string"},"status":{"type":"string"},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/relations/{pofid}":{"get":{"operationId":"po-knowledge-graph-document-relations-get","summary":"Get document relations (path param)","tags":["Analytics AI — Knowledge Graph"],"description":"Get document relationships — references, supersedes, attachment_of, invoice_for, payment_for, contract_with. Shows linked documents and relation type. Use include_all_sources=true to include all detection sources (default: user-facing...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-document-relations-get.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string"},"description":"outgoing, incoming, or both"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Max relations (max: 100)"},{"name":"include_all_sources","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Include all relation sources (default: false = user-visible relations only)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Document relations","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"relations":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/stats":{"get":{"operationId":"po-intelligence-stats-get","summary":"Get intelligence statistics (Document AI)","tags":["Analytics AI — Knowledge Graph"],"description":"Get global Document Intelligence statistics — total entities, embeddings, relations, topics, vision analyses. Shows AI processing status.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-intelligence-stats-get.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"available_endpoints":{"type":"object","properties":{"GET /document_intelligence/entities/{document_id}":{"type":"string"},"GET /document_intelligence/entities/canonical":{"type":"string"},"GET /document_intelligence/entities/search?q=...":{"type":"string"},"GET /document_intelligence/embeddings/{document_id}":{"type":"string"},"POST /document_intelligence/embeddings/search":{"type":"string"},"GET /document_intelligence/ocr/{document_id}":{"type":"string"},"GET /document_intelligence/vision/{document_id}":{"type":"string"},"GET /document_intelligence/relations/{document_id}":{"type":"string"},"GET /document_intelligence/topics/{document_id}":{"type":"string"},"GET /document_intelligence/topics":{"type":"string"},"GET /document_intelligence/revisions/{document_id}":{"type":"string"},"GET /document_intelligence/meta_fields/{document_id}":{"type":"string"},"GET /document_intelligence/summary/{document_id}":{"type":"string"},"GET /document_intelligence/stats":{"type":"string"}}},"canonical_semantics":{"type":"string"},"processing_time":{"type":"string"},"stats":{"type":"object","properties":{"total_documents":{"type":"integer"},"stock_document_count":{"type":"integer"},"stock_count_basis":{"type":"string"},"documents_with_ocr":{"type":"integer"},"documents_with_entities":{"type":"integer"},"entities_by_type":{"type":"array","items":{}},"documents_with_embeddings":{"type":"integer"},"embeddings_by_type":{"type":"object","properties":{"document_summary":{"type":"integer"},"metadata":{"type":"integer"},"contextual":{"type":"integer"},"contextual_summary":{"type":"integer"},"parent":{"type":"integer"}}},"total_tables":{"type":"integer"},"total_charts":{"type":"integer"},"total_barcodes":{"type":"integer"},"canonical_entities":{"type":"integer"},"canonical_index_distinct_count":{"type":"integer"},"canonical_index_scope":{"type":"string"},"canonical_index_note":{"type":"string"},"total_topics":{"type":"integer"},"canonical_semantics":{"type":"string"},"canonical_count_note":{"type":"string"}}},"status":{"type":"string"},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/summary/{pofid}":{"get":{"operationId":"po-summary-stats-get-document-summary","summary":"Get document summary","tags":["Document AI — AI Document Operations"],"description":"Compact summary of all Document Intelligence data. An endpoint for all key metrics and API links.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-summary-stats-get-document-summary.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID (POFID). Passed as URL path segment (/document_intelligence/summary/{pofid})."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Dokument-Zusammenfassung","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"summary":{"type":"string"},"key_points":{"type":"array","items":{"type":"string"}},"word_count":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/topics":{"get":{"operationId":"po-intelligence-topics-list","summary":"List document topics","tags":["Analytics AI — Knowledge Graph"],"description":"Paged: without limit this returns the first 200 topics (maximum 1000). The response carries returned, limit, offset and has_more — advance offset for the next page. Do not expect the full tenant topic list in one call. [R260918-TOPICS-PAGE]","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-intelligence-topics-list.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"},{"name":"include_documents","in":"query","required":false,"schema":{"type":"boolean"},"description":"Include document IDs per topic"},{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":20},"description":"Max results"},{"name":"offset","in":"query","required":false,"schema":{"type":"number"},"description":"Skip this many topics; use with limit to page."}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"flat_topics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"parent_topic_id":{"type":"string"},"children":{"type":"array","items":{}},"document_count":{"type":"integer"}}}},"processing_time":{"type":"string"},"status":{"type":"string"},"topics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"parent_topic_id":{"type":"string"},"children":{"type":"array","items":{}},"document_count":{"type":"integer"}}}},"total":{"type":"integer"},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/document_intelligence/vision/{pofid}":{"get":{"operationId":"po-vision-get-vision-data","summary":"Get vision data","tags":["Document AI — AI Document Operations"],"description":"Vision-extracted data Ultra-Tier. Includes: - Tables - Structured table data with rows/columns - charts - Recognized charts with data - Form Fields - Form fields with values - barcodes - QR codes and barcodes - Layout - Document...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-vision-get-vision-data.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"}},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"all, tables, charts, forms, barcodes, layout"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Bild-Analyse / Vision","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"description":{"type":"string","description":"Bildbeschreibung"},"objects":{"type":"array","items":{"type":"object"}},"text_detected":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/agents-list":{"get":{"operationId":"po-documents-processing-agents-list","summary":"List processing agents (split, trust, IDP, redact)","tags":["Document AI — DMS"],"description":"List document processing agents (pdf_trust, pdf_split, idp_extract, pdf_redact) with agent_id values for *_agent_run. Adhoc Trust uses po_documents_trust_check.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-processing-agents-list.md"},"parameters":[{"name":"agent_kind","in":"query","required":false,"schema":{"type":"string","enum":["pdf_trust","pdf_split","idp_extract","pdf_redact"]},"description":"Optional kind filter"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Optional name/id search"},{"name":"active","in":"query","required":false,"schema":{"type":"boolean"},"description":"If true, prefer active agents"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200},"description":"Max agents (1-200)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/audit-report-pdf":{"post":{"operationId":"po-documents-audit-report-pdf","summary":"Download document audit report PDF","tags":["Document AI — DMS"],"description":"Generate PDF audit report for document security findings. Params: pofid, optional language, include_original boolean. Returns pdf_base64. Works during quarantine. Response fields: report_id, pdf_base64 (sha256 = pdf_hash), pdf_hash...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-audit-report-pdf.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Document POFID"},"language":{"type":"string","description":"ISO-639-1 UI language for PDF labels (default en)"},"include_original":{"type":"boolean","description":"Append original document as PDF appendix"}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Document POFID"},"language":{"type":"string","description":"ISO-639-1 UI language for PDF labels (default en)"},"include_original":{"type":"boolean","description":"Append original document as PDF appendix"}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success","error"]},"pofid":{"type":"string"},"report_id":{"type":"string","description":"DAR-…"},"pdf_base64":{"type":"string","description":"Base64 PDF; sha256(decoded) = pdf_hash"},"pdf_hash":{"type":"string","description":"SHA-256 of the PDF bytes"},"filename":{"type":"string"},"original_included":{"type":"boolean"},"original_skip_reason":{"type":["string","null"]},"generated_at":{"type":"string","description":"ISO-8601 UTC with Z (report generation time)","format":"date-time"},"generated_at_human":{"type":"string","description":"Same instant, human readable: YYYY-MM-DD HH:MM:SS UTC (also printed in the PDF)"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/automation-timeline/{pofid}":{"get":{"operationId":"po-documents-automation-timeline","summary":"Document: Automation history","tags":["Document AI — DMS"],"description":"Returns the append-only automation timeline JSON for a document (pipelines ai_dms, idp_agent, workflow). POFID in URL path must preserve case. Requires workspace view permission. Optional share_context query for shared documents.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-automation-timeline.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID (POFID) — last URL segment, case-sensitive"},{"name":"share_context","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: share context for shared workspace documents"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Automation timeline of a document","properties":{"status":{"type":"string","description":"API-Status (Handler: ok; Response-Wrapper: success)","enum":["ok","success","error"]},"pofid":{"type":"string","description":"Resolved POFID"},"event_count":{"type":"integer","description":"Number of events in timeline.events"},"timeline":{"type":"object","properties":{"v":{"type":"integer","description":"Schema version (1)"},"events":{"type":"array","description":"Chronological automation events","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"pipeline":{"type":"string","enum":["ai_dms","idp_agent","workflow"]},"status":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"},"ref":{"type":"object","additionalProperties":{"type":"string"}},"triggered_by":{"type":"string"}}}}}},"message":{"type":"string","description":"Error message when status=error"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-analysis":{"post":{"operationId":"po-document-analysis-analysis-dms","summary":"Run DMS document analysis","tags":["Document AI — DMS"],"description":"Document Analysis DMS General document classification and metadata extraction. Fields: document_type, date, sender, recipient, subject, keywords## Request parameters Authenticate with your Bearer token.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-analysis-analysis-dms.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI analysis tier: basic, premium, or ultra (default ultra).","default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"document_analysis"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product.","minimum":0,"maximum":900,"deprecated":true},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI analysis tier: basic, premium, or ultra (default ultra).","default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"document_analysis"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product.","minimum":0,"maximum":900,"deprecated":true},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"DMS document analysis — classification and metadata","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"document_keywords":{"type":"array","items":{"type":"string"}},"document_name":{"type":"string"},"document_type_classification":{"type":"string"},"document_save_paths":{"type":"array","items":{"type":"string"}},"document_summary_short":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-audit-trail":{"get":{"operationId":"po-documents-audit-trail-get","summary":"Get document audit trail","tags":["Document AI — DMS"],"description":"Get compliance audit trail — who changed what, when. Filter by document (pofid or documents_id), user, action. For compliance audits (GoBD, GDPR/DSGVO).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-audit-trail-get.md"},"parameters":[{"name":"pofid","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by document POFID — resolved to documents_id automatically. Alternative to documents_id."},{"name":"documents_id","in":"query","required":false,"schema":{"type":["string","number"]},"description":"Only show changes for this document (numeric ID)"},{"name":"user_id","in":"query","required":false,"schema":{"type":["string","number"]},"description":"Only show changes from this user"},{"name":"action","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by action type. Common values: document_created, field_changed, field_created, status_changed, document_deleted_soft, document_checked_out, document_checked_in, folder_created, folder_dissolved. Server validates against actual recorded actions."},{"name":"limit","in":"query","required":false,"schema":{"type":"number"},"description":"Maximum number of entries (default: 50)"},{"name":"offset","in":"query","required":false,"schema":{"type":"number"},"description":"Offset for pagination (default: 0)"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"available_actions":{"type":"array","items":{}},"has_more":{"type":"boolean"},"limit":{"type":"integer"},"offset":{"type":"integer"},"processing_time":{"type":"string"},"revisions":{"type":"array","items":{"type":"object","properties":{"revision_id":{"type":"integer"},"documents_id":{"type":"integer"},"pofid":{"type":"string"},"file_name":{"type":"string"},"workspace_id":{"type":"integer"},"action":{"type":"string"},"field_key":{"type":"string"},"field_label":{"type":"string"},"old_value":{"type":"string"},"new_value":{"type":"string"},"changed_by":{"type":"object","properties":{"account_id":{"type":"integer"},"user_id":{"type":"integer"},"username":{"type":"string"},"display_name":{"type":"string"},"avatar":{"type":"string"}}},"ip_address":{"type":"string"},"changed_at":{"type":"string"}}}},"status":{"type":"string"},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-batch-process":{"post":{"operationId":"po-documents-batch-process","summary":"Batch-process documents (AI-DMS)","tags":["Document AI — DMS"],"description":"Triggers AI-DMS processing for multiple documents simultaneously. Max 50 POFIDs per batch. Each document is processed asynchronously via OCR, Entity Extraction, Classification, etc.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-batch-process.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pofids":{"type":"array","description":"Array of POFIDs to process (max 50)","minItems":1,"maxItems":50,"items":{"type":"string"}},"ai_dms_tier":{"type":"string","description":"AI-DMS processing tier: basic (OCR + classification), premium (+ entity extraction), ultra (+ deep analysis)","enum":["basic","premium","ultra"],"default":"basic"},"confirm":{"type":"boolean","description":"Required for bulk (>5 POFIDs) or mode=instant — MCP matches the API."},"confirm_tier_downgrade":{"type":"boolean","description":"Required when ai_dms_tier is lower than the document's current tier (downgrade). MCP ≡ API."},"confirm_reprocess":{"type":"boolean","description":"Required when ai_dms_tier equals the current tier and the document was successfully processed before (same-tier reprocess). MCP ≡ API."},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"}},"required":["pofids"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Batch AI-DMS Aktivierung","properties":{"status":{"type":"string","enum":["success","partial_success","error"]},"message":{"type":"string"},"ai_dms_tier":{"type":"string","description":"Tier used (basic, premium, ultra)"},"queued":{"type":"array","description":"Successfully queued documents","items":{"type":"object","properties":{"pofid":{"type":"string"},"file_name":{"type":"string"},"status":{"type":"string"},"was_reset":{"type":"boolean"}}}},"queued_count":{"type":"integer","description":"Number of queued documents"},"reset_count":{"type":"integer","description":"Number of reset documents (re-processing)"},"not_found":{"type":"array","description":"POFIDs not found","items":{"type":"string"}},"not_found_count":{"type":"integer"},"errors":{"type":"array","description":"Failed documents","items":{"type":"object","properties":{"pofid":{"type":"string"},"file_name":{"type":"string"},"error":{"type":"string"},"code":{"type":"string","description":"Machine-readable error code (e.g. LEGAL_HOLD_ACTIVE)"}}}},"error_count":{"type":"integer"},"processing_time":{"type":"string"},"skipped_legal_hold":{"type":"array","description":"Documents skipped because of active legal hold (AI re-index blocked)","items":{"type":"object","properties":{"pofid":{"type":"string"},"file_name":{"type":"string"},"reason":{"type":"string","enum":["legal_hold_active"]}}}},"skipped_legal_hold_count":{"type":"integer","description":"Count of documents skipped due to legal hold"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-comment-create":{"post":{"operationId":"po-documents-comments-create","summary":"Create Document Comment","tags":["Document AI — DMS"],"description":"Create a comment on a document. Supports optional parent comment ID for threaded replies and @mentions within the workspace.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-comments-create.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"content":{"type":"string","description":"Comment text (required)."},"parent_id":{"type":"integer","description":"Parent comment ID for reply (optional)"},"page_number":{"type":"integer","description":"Page number (optional).","minimum":1},"anchor_text":{"type":"string","description":"Anchor text in the document (optional)."}},"required":["pofid","content"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"content":{"type":"string","description":"Comment text (required)."},"parent_id":{"type":"integer","description":"Parent comment ID for reply (optional)"},"page_number":{"type":"integer","description":"Page number (optional).","minimum":1},"anchor_text":{"type":"string","description":"Anchor text in the document (optional)."}},"required":["pofid","content"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-comment-delete":{"post":{"operationId":"po-documents-comments-delete","summary":"Delete Document Comment","tags":["Document AI — DMS"],"description":"Delete a document comment by comment ID. Requires permission to edit the document or ownership of the comment.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-comments-delete.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"comment_id":{"type":"integer","description":"ID of the comment to delete"}},"required":["comment_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"comment_id":{"type":"integer","description":"ID of the comment to delete"}},"required":["comment_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-comment-resolve":{"post":{"operationId":"po-documents-comments-resolve","summary":"Resolve Document Comment","tags":["Document AI — DMS"],"description":"Mark a document comment as resolved. Use after the discussed issue is addressed; resolved comments remain visible in history.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-comments-resolve.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"comment_id":{"type":"integer","description":"Root comment ID (not a reply)"},"resolved":{"type":"boolean","description":"true = as erledigt mark, false = again open (default: true)"}},"required":["comment_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"comment_id":{"type":"integer","description":"Root comment ID (not a reply)"},"resolved":{"type":"boolean","description":"true = as erledigt mark, false = again open (default: true)"}},"required":["comment_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-comment-update":{"post":{"operationId":"po-documents-comments-update","summary":"Update Document Comment","tags":["Document AI — DMS"],"description":"Update the text of an existing document comment. Only the comment author or users with document edit permission may change content.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-comments-update.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"comment_id":{"type":"integer","description":"Document comment ID to update."},"content":{"type":"string","description":"New comment text."}},"required":["comment_id","content"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"comment_id":{"type":"integer","description":"Document comment ID to update."},"content":{"type":"string","description":"New comment text."}},"required":["comment_id","content"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-comments":{"get":{"operationId":"po-documents-comments-list","summary":"List Document Comments","tags":["Document AI — DMS"],"description":"List comments on a document with author, timestamp, resolution status, and optional thread hierarchy.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-comments-list.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID"},{"name":"include_resolved","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]},"description":"Also show resolved comments (default: 0)"},{"name":"page_number","in":"query","required":false,"schema":{"type":"integer"},"description":"Only comments for these page (optional)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-copy":{"post":{"operationId":"po-documents-copy","summary":"Copy document","tags":["Document AI — DMS"],"description":"Copy a document to another folder or workspace. Preserves metadata where configured; returns the new document POFID.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-copy.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID of the document to copy"},"target_workspace_id":{"type":"integer","description":"ID of the target workspace the document is copied to."},"locale":{"type":"string","description":"Optional locale for copied metadata labels (e.g. de-DE)."},"new_file_name":{"type":"string","description":"Destination filename after copy (include extension)."}},"required":["pofid","target_workspace_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID of the document to copy"},"target_workspace_id":{"type":"integer","description":"ID of the target workspace the document is copied to."},"locale":{"type":"string","description":"Optional locale for copied metadata labels (e.g. de-DE)."},"new_file_name":{"type":"string","description":"Destination filename after copy (include extension)."}},"required":["pofid","target_workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Copy a document — returns original and copy details","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"locale":{"type":"string","description":"Locale used (e.g. en_US, de_DE)"},"original":{"type":"object","description":"Details of the original document","properties":{"pofid":{"type":"string","description":"POFID of the original"},"file_name":{"type":"string","description":"File name of the original"},"workspace_id":{"type":"integer","description":"Workspace ID of the original"}}},"copy":{"type":"object","description":"Details of the created copy","properties":{"documents_id":{"type":"integer","description":"New document ID"},"pofid":{"type":"string","description":"New POFID of the copy"},"file_name":{"type":"string","description":"File name of the copy"},"workspace_id":{"type":"integer","description":"Target workspace ID"},"workspace_name":{"type":"string","description":"Target workspace name"}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-delete":{"post":{"operationId":"po-documents-delete","summary":"Delete document","tags":["Document AI — DMS"],"description":"po_documents_delete: Delete one or more documents. mode=trash (default): soft-delete to recycle bin on business/compliance workspaces; on standard-tier workspaces the API coerces trash to instant (permanent, no recycle bin)...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-delete.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"share_context":{"type":"string","description":"External share context token JSON for scoped access in a shared workspace."},"mode":{"type":"string","description":"Deletion mode: `trash` (soft delete when trash enabled) or `instant` (permanent; requires confirm:true).","enum":["trash","instant"],"default":"trash"},"confirm":{"type":"boolean","description":"Required for bulk delete (>5 POFIDs) or mode=instant."}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"share_context":{"type":"string","description":"External share context token JSON for scoped access in a shared workspace."},"mode":{"type":"string","description":"Deletion mode: `trash` (soft delete when trash enabled) or `instant` (permanent; requires confirm:true).","enum":["trash","instant"],"default":"trash"},"confirm":{"type":"boolean","description":"Required for bulk delete (>5 POFIDs) or mode=instant."}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Delete document(s) — soft-delete to trash or permanent deletion","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"deleted_count":{"type":"integer","description":"Number of deleted documents"},"not_found_count":{"type":"integer","description":"Number of POFIDs not found"},"error_count":{"type":"integer","description":"Number of failed deletions"},"deleted_documents":{"type":"array","description":"List of deleted documents","items":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"file_name":{"type":"string","description":"File name"},"documents_id":{"type":"integer","description":"Documents id"},"workspace_id":{"type":"integer","description":"Workspace ID"}}}},"cleanup_queued":{"type":"integer","description":"Number of entries enqueued for deletion"},"mode":{"type":"string","description":"Delete mode: trash or instant (permanent)","enum":["trash","instant"]},"not_found_documents":{"type":"array","description":"POFIDs not found (optional)","items":{"type":"string"}},"deleted_folders":{"type":"array","description":"Deleted document-folder IDs (optional)","items":{"type":"string"}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-download/{pofid}":{"get":{"operationId":"po-documents-download","summary":"Download document","tags":["Document AI — DMS"],"description":"Download the original file of a document as a binary HTTP attachment (Content-Disposition: attachment).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-download.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID of the document."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-edit-session-acquire/{pofid}":{"post":{"operationId":"po-documents-edit-session-acquire","summary":"Acquire Edit-Session (Presence-Lock)","tags":["Document AI — DMS"],"description":"Acquire a cooperative metadata edit lock that expires after 90 seconds without a heartbeat. If another user is editing, the response returns status=readonly. Call po_documents_edit_session_heartbeat at least every 30 seconds while editing.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-edit-session-acquire.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice document ID (pofid) — URL path parameter or request body."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-edit-session-heartbeat/{pofid}":{"post":{"operationId":"po-documents-edit-session-heartbeat","summary":"Heartbeat Edit-Session","tags":["Document AI — DMS"],"description":"Keeps a previously acquired edit-session lock alive; the lock expires after 90 seconds without a heartbeat. Call at least every 30 seconds while editing (the app polls every 15 seconds). The same session_token renews the lock even...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-edit-session-heartbeat.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice document ID (pofid) — URL path parameter or request body."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-edit-session-release/{pofid}":{"post":{"operationId":"po-documents-edit-session-release","summary":"Release Edit-Session","tags":["Document AI — DMS"],"description":"Releases the edit-session lock for a document so other users can edit. Call when the user finishes editing or navigates away.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-edit-session-release.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice document ID (pofid) — URL path parameter or request body."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-edit-session-status/{pofid}":{"get":{"operationId":"po-documents-edit-session-status","summary":"Query Edit-Session Status","tags":["Document AI — DMS"],"description":"Get edit-session status (free, mine, or taken) without acquiring the lock. After 90 seconds without a heartbeat the lock is free (same TTL as heartbeat and acquire). Use before POST /documents/document-edit-session-acquire/{pofid}...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-edit-session-status.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice document ID (pofid) — URL path parameter or request body."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-edit/{pofid}":{"post":{"operationId":"po-documents-edit","summary":"Edit document fields","tags":["Document AI — DMS"],"description":"Edit document metadata fields (title, dates, custom IDP fields) for a document identified by POFID in the URL path.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-edit.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fields":{"type":"object","description":"Key-Value-pairs with Alias-Keys (document_type, sender_name, total_amount, etc.) or nativen __-Pfade","additionalProperties":true}},"required":["fields"]}}}},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-get/{pofid}":{"get":{"operationId":"po-documents-trust-get","summary":"Get stored document trust certificate","tags":["Document AI — DMS"],"x-paperoffice-variants":[{"slug":"po-documents-trust-get","name":"Get stored document trust certificate","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trust-get.md"},{"slug":"po-documents-get","name":"Get document details","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-get.md"}],"description":"Read the stored Trust Agent certificate (score, verdict, findings with text_excerpt, tags, last run). This is a read — it does not start a scan. New adhoc scan: po_documents_trust_check.\n\nThis operation has 2 documented variants (same method and path, different fields):\n- [Get stored document trust certificate](https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trust-get.md) — Read the stored Trust Agent certificate (score, verdict, findings with text_excerpt, tags, last run). This is a read — it does not start a scan. New adhoc scan: po_documents_trust_check.\n- [Get document details](https://api.paperoffice.ai/latest/docs/endpoints/po-documents-get.md) — document DETAILS. Parameter: pofid (required). returns metadata how file_name, created_at, workspace_id, publisher, document_type, total_amount Back.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trust-get.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID"},{"name":"documents_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Numeric document ID — Alternative to pofid"},{"name":"profile","in":"query","required":false,"schema":{"type":"string","const":"trust_certificate"},"description":"Must be trust_certificate for this read"},{"name":"share_context","in":"query","required":false,"schema":{"type":"string"},"description":"External share context token JSON for scoped access in a shared workspace."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-legal-hold":{"post":{"operationId":"po-documents-legal-holds-create","summary":"Place legal hold","tags":["Document AI — DMS"],"description":"Place a legal hold on a document to block deletion and certain lifecycle transitions until explicitly released. Requires organization owner or administrator (account_role root/administrator) with legal-hold permission on the workspace.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-legal-holds-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"reason":{"type":"string","description":"Reason for the legal hold (required, e.g. lawsuit, audit)."},"reference":{"type":"string","description":"Optional reference (case ID, matter number)."}},"required":["pofid","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-legal-hold-release":{"post":{"operationId":"po-documents-legal-hold-release","summary":"Release legal hold","tags":["Document AI — DMS"],"description":"Release a legal hold on a document so normal lifecycle and deletion rules apply again. Requires organization owner or administrator (account_role root/administrator); irreversible for audit purposes only after hold metadata is recorded.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-legal-hold-release.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"hold_id":{"type":"integer","description":"Legal hold ID (Required)"},"confirm":{"type":"boolean","description":"Must be true — destructive action (MCP ≡ API confirm gate)."},"confirm_pofid":{"type":"string","description":"Target confirmation (R20260916): must equal the pofid the legal hold refers to. Replaces the former browser-only restriction — required for every non-UI caller."}},"required":["hold_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"hold_id":{"type":"integer","description":"Legal hold ID (Required)"},"confirm":{"type":"boolean","description":"Must be true — destructive action (MCP ≡ API confirm gate)."},"confirm_pofid":{"type":"string","description":"Target confirmation (R20260916): must equal the pofid the legal hold refers to. Replaces the former browser-only restriction — required for every non-UI caller."}},"required":["hold_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-legal-holds-list":{"get":{"operationId":"po-documents-legal-holds-list","summary":"List Legal Holds","tags":["Document AI — DMS"],"description":"List active legal holds in the account with document references, reason, and hold timestamps. Read-only for auditors with list permission; does not modify holds.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-legal-holds-list.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Workspace ID to filter holds. Omit both workspace_id and pofid to list ALL legal holds account-wide (compliance mode)."},{"name":"pofid","in":"query","required":false,"schema":{"type":"string"},"description":"PaperOffice File ID to filter holds for a specific document. Omit both workspace_id and pofid for account-wide listing."},{"name":"active_only","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]},"description":"Only aktive Holds (default: 1)"}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"holds":{"type":"array","items":{}},"processing_time":{"type":"string"},"scope":{"type":"string"},"status":{"type":"string"},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-lifecycle-get":{"get":{"operationId":"po-documents-lifecycle-get","summary":"Get Document Lifecycle","tags":["Document AI — DMS"],"description":"Get lifecycle state for a document — retention stage, legal hold flags, trash status, and next allowed transitions.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-lifecycle-get.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-lifecycle-transition":{"post":{"operationId":"po-documents-lifecycle-transition","summary":"Transition document lifecycle","tags":["Document AI — DMS"],"description":"Change the lifecycle status of a document. Only allowed transitions are possible.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-lifecycle-transition.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"new_state":{"type":"string","description":"New lifecycle state.","enum":["draft","in_review","approved","published","archived","expired","superseded"]},"comment":{"type":"string","description":"Optional comment for the lifecycle transition."}},"required":["pofid","new_state"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-move":{"post":{"operationId":"po-documents-move","summary":"Move document","tags":["Document AI — DMS"],"description":"Move a document to another folder within the same workspace or to a permitted target workspace.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-move.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID of the document to move"},"target_workspace_id":{"type":"integer","description":"ID of the target workspace the document is moved to."},"locale":{"type":"string","description":"Optional locale for folder/path labels during the move."}},"required":["pofid","target_workspace_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID of the document to move"},"target_workspace_id":{"type":"integer","description":"ID of the target workspace the document is moved to."},"locale":{"type":"string","description":"Optional locale for folder/path labels during the move."}},"required":["pofid","target_workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Move a document to another workspace","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"locale":{"type":"string","description":"Verwendete Locale"},"document":{"type":"object","description":"Details of the moved document","properties":{"pofid":{"type":"string","description":"POFID of the document"},"file_name":{"type":"string","description":"File name"},"old_workspace_id":{"type":"integer","description":"Original workspace ID"},"new_workspace_id":{"type":"integer","description":"New workspace ID"},"new_workspace_name":{"type":"string","description":"New workspace name"}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-note-create":{"post":{"operationId":"po-documents-notes-create","summary":"Create Document Note","tags":["Document AI — DMS"],"description":"Create an internal note attached to a document. Notes are visible to workspace users with document access (not external signers).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-notes-create.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"content":{"type":"string","description":"Note content (required)."},"title":{"type":"string","description":"Optional title."},"category":{"type":"string","description":"Category (default: general).","enum":["general","review","legal","technical","financial","internal"]},"is_pinned":{"type":"integer","description":"Pin note to top (0 = no, 1 = yes, default: 0)","enum":[0,1]},"is_private":{"type":"integer","description":"Private note visible only to you (0 = no, 1 = yes, default: 0)","enum":[0,1]}},"required":["pofid","content"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"content":{"type":"string","description":"Note content (required)."},"title":{"type":"string","description":"Optional title."},"category":{"type":"string","description":"Category (default: general).","enum":["general","review","legal","technical","financial","internal"]},"is_pinned":{"type":"integer","description":"Pin note to top (0 = no, 1 = yes, default: 0)","enum":[0,1]},"is_private":{"type":"integer","description":"Private note visible only to you (0 = no, 1 = yes, default: 0)","enum":[0,1]}},"required":["pofid","content"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-note-delete":{"post":{"operationId":"po-documents-notes-delete","summary":"Delete Document Note","tags":["Document AI — DMS"],"description":"Delete an internal document note by note ID.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-notes-delete.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"note_id":{"type":"integer","description":"ID of the note to delete"}},"required":["note_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"note_id":{"type":"integer","description":"ID of the note to delete"}},"required":["note_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-note-update":{"post":{"operationId":"po-documents-notes-update","summary":"Update Document Note","tags":["Document AI — DMS"],"description":"Update title, category, or content of an existing document note.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-notes-update.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"note_id":{"type":"integer","description":"Note ID (Required)"},"title":{"type":"string","description":"New title."},"content":{"type":"string","description":"New note content."},"category":{"type":"string","description":"new category","enum":["general","review","legal","technical","financial","internal"]},"is_pinned":{"type":"integer","description":"Pin or unpin.","enum":[0,1]},"is_private":{"type":"integer","description":"Private or public.","enum":[0,1]}},"required":["note_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"note_id":{"type":"integer","description":"Note ID (Required)"},"title":{"type":"string","description":"New title."},"content":{"type":"string","description":"New note content."},"category":{"type":"string","description":"new category","enum":["general","review","legal","technical","financial","internal"]},"is_pinned":{"type":"integer","description":"Pin or unpin.","enum":[0,1]},"is_private":{"type":"integer","description":"Private or public.","enum":[0,1]}},"required":["note_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-notes":{"get":{"operationId":"po-documents-notes-list","summary":"List Document Notes","tags":["Document AI — DMS"],"description":"List internal notes on a document with author, category, and timestamps.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-notes-list.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID"},{"name":"include_private","in":"query","required":false,"schema":{"type":"string","enum":["0","1"]},"description":"Include private notes of OTHER users (default: false). Your own private notes are always visible regardless of this setting."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-pofid-resolve":{"post":{"operationId":"po-documents-pofid-resolve","summary":"Resolve document POFID","tags":["Document AI — DMS"],"description":"Normalizes a POFID against the database (O/0 hash segment) and returns documents_id and file_name. Prefer documents_id from search for stable access.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-pofid-resolve.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Document POFID (byte-copy from search; O/0 in hash is normalized)"},"include_deleted":{"type":"boolean","description":"Include soft-deleted documents","default":false}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Document POFID (byte-copy from search; O/0 in hash is normalized)"},"include_deleted":{"type":"boolean","description":"Include soft-deleted documents","default":false}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-process/{pofid}":{"post":{"operationId":"po-documents-process","summary":"Process document (AI-DMS)","tags":["Document AI — DMS"],"description":"Trigger AI-DMS processing on a document that is already stored in PaperOffice. Use when a document was uploaded without AI-DMS or when re-processing with a different tier. Queues OCR, classification, and metadata extraction; previous...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-process.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"documents_id":{"type":"number","description":"Numeric document ID — Alternative to pofid."},"ai_dms_tier":{"type":"string","description":"AI-DMS processing tier: basic (OCR + classification), premium (+ entity extraction), ultra (+ deep analysis)","enum":["basic","premium","ultra"]},"confirm_tier_downgrade":{"type":"boolean","description":"Required for tier downgrade on an existing document. MCP ≡ API."},"confirm_reprocess":{"type":"boolean","description":"Required for same-tier reprocess after successful completion. MCP ≡ API."},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"}},"required":["ai_dms_tier"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"documents_id":{"type":"number","description":"Numeric document ID — Alternative to pofid."},"ai_dms_tier":{"type":"string","description":"AI-DMS processing tier: basic (OCR + classification), premium (+ entity extraction), ultra (+ deep analysis)","enum":["basic","premium","ultra"]},"confirm_tier_downgrade":{"type":"boolean","description":"Required for tier downgrade on an existing document. MCP ≡ API."},"confirm_reprocess":{"type":"boolean","description":"Required for same-tier reprocess after successful completion. MCP ≡ API."},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"}},"required":["ai_dms_tier"]}}}},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID (POFID). At least one of pofid or documents_id MUST be provided."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-put":{"post":{"operationId":"po-documents-versions-create","summary":"Create new document version","tags":["Document AI — DMS"],"x-paperoffice-variants":[{"slug":"po-documents-versions-create","name":"Create new document version","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-versions-create.md"},{"slug":"po-documents-upload","name":"Upload document","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-upload.md"}],"description":"Versioning is an AI-DMS feature (402 VERSIONING_REQUIRES_AI_DMS unless the source has basic, premium or ultra). Upload a changed file as the NEXT VERSION of an existing document: multipart document-put with UploadFiles[] plus...\n\nThis operation has 2 documented variants (same method and path, different fields):\n- [Create new document version](https://api.paperoffice.ai/latest/docs/endpoints/po-documents-versions-create.md) — Versioning is an AI-DMS feature (402 VERSIONING_REQUIRES_AI_DMS unless the source has basic, premium or ultra). Upload a changed file as the NEXT VERSION of an existing document: multipart document-put with UploadFiles[] plus...\n- [Upload document](https://api.paperoffice.ai/latest/docs/endpoints/po-documents-upload.md) — Upload one or more documents via multipart/form-data or provide a source_url (HTTPS) to fetch a file server-side.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-versions-create.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"anyOf":[{"title":"Create new document version","type":"object","properties":{"version_of_pofid":{"type":"string","description":"POFID of the existing document (any version of the line). The source must have an AI-DMS tier (basic, premium or ultra); otherwise HTTP 402 VERSIONING_REQUIRES_AI_DMS."},"version_comment":{"type":"string","description":"What changed (human note, immutable). Required when the predecessor is revision-secure (WORM)."},"workspace_id":{"type":"integer","description":"Workspace of the document line (must match the predecessor)."},"processing_mode":{"type":"string","description":"Omit to inherit the predecessor AI-DMS tier. Versions always run on AI-DMS. auto and ai_dms are equivalent here. no_ai_dms is not accepted (HTTP 402 VERSIONING_REQUIRES_AI_DMS).","enum":["auto","ai_dms"]},"ai_dms_tier":{"type":"string","description":"Raise the AI-DMS tier of the document line with this version. Omit to inherit. Equal or higher than the predecessor; lower is rejected with HTTP 400 VERSION_TIER_DOWNGRADE.","enum":["basic","premium","ultra"]},"processing_lane":{"type":"string","description":"Start-SLA lane for AI-DMS processing of the new version. Omit to inherit the workspace default.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128}},"required":["version_of_pofid","workspace_id"]},{"title":"Upload document","type":"object","properties":{"file":{"type":"string","description":"Multipart file field (file, files, upload, attachment, document, UploadFiles).","format":"binary"},"source_url":{"type":"string","description":"Alternative: HTTPS URL to download (alias: file_url, document_url)."},"workspace_id":{"type":"integer","description":"Target workspace ID. Required unless workspace_name is set."},"workspace_name":{"type":"string","description":"Target workspace name (creates workspace if missing). Required unless workspace_id is set. Example: My Workspace."},"processing_mode":{"type":"string","description":"Upload processing mode."},"ai_dms_tier":{"type":"string","description":"AI-DMS processing tier: basic, premium, or ultra.","enum":["basic","premium","ultra"]},"document_agent_enabled":{"type":"boolean","description":"When true, enable document agent automation on upload."},"share_context":{"type":"object","description":"Optional external share token JSON for uploads into a shared workspace."},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128}}}]}},"application/x-www-form-urlencoded":{"schema":{"anyOf":[{"title":"Create new document version","type":"object","properties":{"version_of_pofid":{"type":"string","description":"POFID of the existing document (any version of the line). The source must have an AI-DMS tier (basic, premium or ultra); otherwise HTTP 402 VERSIONING_REQUIRES_AI_DMS."},"version_comment":{"type":"string","description":"What changed (human note, immutable). Required when the predecessor is revision-secure (WORM)."},"workspace_id":{"type":"integer","description":"Workspace of the document line (must match the predecessor)."},"processing_mode":{"type":"string","description":"Omit to inherit the predecessor AI-DMS tier. Versions always run on AI-DMS. auto and ai_dms are equivalent here. no_ai_dms is not accepted (HTTP 402 VERSIONING_REQUIRES_AI_DMS).","enum":["auto","ai_dms"]},"ai_dms_tier":{"type":"string","description":"Raise the AI-DMS tier of the document line with this version. Omit to inherit. Equal or higher than the predecessor; lower is rejected with HTTP 400 VERSION_TIER_DOWNGRADE.","enum":["basic","premium","ultra"]},"processing_lane":{"type":"string","description":"Start-SLA lane for AI-DMS processing of the new version. Omit to inherit the workspace default.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128}},"required":["version_of_pofid","workspace_id"]},{"title":"Upload document","type":"object","properties":{"file":{"type":"string","description":"Multipart file field (file, files, upload, attachment, document, UploadFiles).","format":"binary"},"source_url":{"type":"string","description":"Alternative: HTTPS URL to download (alias: file_url, document_url)."},"workspace_id":{"type":"integer","description":"Target workspace ID. Required unless workspace_name is set."},"workspace_name":{"type":"string","description":"Target workspace name (creates workspace if missing). Required unless workspace_id is set. Example: My Workspace."},"processing_mode":{"type":"string","description":"Upload processing mode."},"ai_dms_tier":{"type":"string","description":"AI-DMS processing tier: basic, premium, or ultra.","enum":["basic","premium","ultra"]},"document_agent_enabled":{"type":"boolean","description":"When true, enable document agent automation on upload."},"share_context":{"type":"object","description":"Optional external share token JSON for uploads into a shared workspace."},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128}}}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-rename":{"post":{"operationId":"po-documents-rename","summary":"Rename document","tags":["Document AI — DMS"],"description":"Rename a document. Changes the name shown in PaperOffice (display name in lists, tiles and the editor) and the stored file name of the document and its live versions. The file extension is always kept (e.g. .pdf). The display name...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-rename.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Document POFID to rename"},"new_file_name":{"type":"string","description":"New name, with or without extension (e.g. Paid or Paid.pdf); the extension of the document is kept"},"update_display_name":{"type":"boolean","description":"true (default): also set the name shown in PaperOffice to the new name without extension. false: change only the file name","default":true}},"required":["pofid","new_file_name"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Document POFID to rename"},"new_file_name":{"type":"string","description":"New name, with or without extension (e.g. Paid or Paid.pdf); the extension of the document is kept"},"update_display_name":{"type":"boolean","description":"true (default): also set the name shown in PaperOffice to the new name without extension. false: change only the file name","default":true}},"required":["pofid","new_file_name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Document renamed","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"pofid":{"type":"string","description":"PaperOffice File ID"},"new_name":{"type":"string","description":"New name"},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"document":{"type":"string","description":"Document"},"old_file_name":{"type":"string","description":"Old file name"},"new_file_name":{"type":"string","description":"New file name"},"workspace_id":{"type":"string","description":"Workspace id"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-restore":{"post":{"operationId":"po-documents-restore","summary":"Restore Document from Trash","tags":["Document AI — DMS"],"description":"Restore one or more soft-deleted documents from the trash. Also supports document folders (.podf). Only restorable while phase=pending (not permanently deleted).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-restore.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pofid":{"type":["string","array"],"description":"POFID or array of POFIDs to restore"},"target_workspace_id":{"type":"integer","description":"Optional: Restore to this workspace instead of original"}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Document restored","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"pofid":{"type":"string","description":"PaperOffice File ID"},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"restored_count":{"type":"string","description":"Restored count"},"failed_count":{"type":"string","description":"Failed count"},"restored_documents":{"type":"string","description":"Restored documents"},"failed_documents":{"type":"string","description":"Failed documents"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-retention-activate":{"post":{"operationId":"po-compliance-activate-worm","summary":"Compliance: Activate WORM (300 Credits)","tags":["Document AI — DMS"],"description":"Activates WORM protection (write-once-read-many) for a document. The document becomes immutable for the retention period; deletion is only possible after expiry. For document types whose legal basis is German tax or commercial law...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-compliance-activate-worm.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice document ID (POFID)."},"document_type_id":{"type":"integer","description":"Optional document type ID (overrides the workspace default)."},"anchor_mode":{"type":"string","description":"Retention anchor for document types without German tax/commercial legal basis: `immediate` (from activation, default) or `eoy` (end of the activation year). Ignored for AO/HGB/UStG types (year-end rule).","enum":["immediate","eoy"]}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success","error"]},"pofid":{"type":"string"},"is_revision_secure":{"type":"boolean"},"retention_until":{"type":"string","format":"date-time"},"retention_mode":{"type":"string","enum":["governance","compliance"]},"retention_legal_basis":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-revisions":{"get":{"operationId":"po-revisions-get-document-revisions","summary":"Get document revisions","tags":["Document AI — DMS"],"description":"po_revisions_get_document_revisions: Get document version history — all changes, who made them and when. Accepts documents_id or pofid. Empty history means no document_revisions rows yet (not tier-blocked). Keywords: revisions, version...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-revisions-get-document-revisions.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice document ID whose revisions are retrieved (URL parameter)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"minimum":1,"maximum":500},"description":"Maximum number of revisions returned."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Offset for pagination."},{"name":"action","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by action type (e.g. 'field_changed', 'folder_created')."},{"name":"field_key","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by changed field (e.g. 'invoice_number')."},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"revisions from this date (YYYY-MM-DD)."},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"revisions bis zu this date (YYYY-MM-DD)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Dokument-Revisionen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"revisions":{"type":"array","items":{"type":"object","properties":{"revision_id":{"type":"number"},"created_at":{"type":"string","format":"date-time"},"created_by":{"type":"string"},"comment":{"type":"string"},"file_size":{"type":"number"}}}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-search":{"get":{"operationId":"po-documents-search","summary":"Search documents (full-text)","tags":["Document AI — DMS"],"description":"Full-text and hybrid document search within the workspace you provide.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-search.md"},"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":2},"description":"Search term (full text, semantic vector, or hybrid keyword+vector)."},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"integer"},"description":"Workspace ID to scope the search (required for single-workspace search)."},{"name":"search_mode","in":"query","required":false,"schema":{"type":"string","enum":["intelligent","fulltext","semantic","hybrid","exact"],"default":"intelligent"},"description":"Search strategy: intelligent (auto), fulltext, semantic, hybrid, or exact field match (exact requires field_key)."},{"name":"mode","in":"query","required":false,"schema":{"type":"string"},"description":"Legacy alias for search_mode (same values)."},{"name":"search_scope","in":"query","required":false,"schema":{"type":"string","enum":["current","all"],"default":"current"},"description":"current = only the workspace in workspace_id; all = all workspaces the bearer may access."},{"name":"search_preference","in":"query","required":false,"schema":{"type":"string","enum":["keyword","semantic","balanced"],"default":"balanced"},"description":"Bias when mode=intelligent: keyword (BM25), semantic (vectors), or balanced (default)."},{"name":"field_key","in":"query","required":false,"schema":{"type":"string"},"description":"Meta-field key for exact mode (required when search_mode=exact)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20},"description":"Maximum results (default 20, max 100)."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1},"description":"1-based page number for paginated results."},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Optional locale hint for query normalization (e.g. de:DE)."},{"name":"workspace_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"}},"description":"Explicit list of workspace IDs (Alternative to search_scope=all)."},{"name":"include_meta_fields","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Include matched meta-field snippets in each hit."},{"name":"include_ocr_preview","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Include short OCR text previews (larger payload)."},{"name":"similarity_threshold","in":"query","required":false,"schema":{"type":"number","default":0.5},"description":"Minimum semantic similarity score (0.0–1.0, default 0.5)."},{"name":"multi_vector","in":"query","required":false,"schema":{"type":"string"},"description":"Advanced: restrict embedding types used in semantic leg (comma-separated)."},{"name":"vector_weight","in":"query","required":false,"schema":{"type":"number"},"description":"Hybrid mode: semantic leg weight (0.0–1.0)."},{"name":"bm25_weight","in":"query","required":false,"schema":{"type":"number"},"description":"Hybrid mode: keyword/BM25 leg weight (0.0–1.0)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Search documents (full text + metadata)","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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"_evidence_summary":{"type":"array","items":{}},"_scope_decision":{"type":"string"},"_search_quality":{"type":"object","properties":{"query":{"type":"string"},"search_mode":{"type":"string"},"scope":{"type":"string"},"total_matching":{"type":"integer"},"returned_count":{"type":"integer"},"relevance_min":{"type":"integer"},"relevance_max":{"type":"integer"},"relevance_avg":{"type":"integer"},"strong_hits":{"type":"integer"},"weak_hits":{"type":"integer"}}},"ai_dms_filter":{"type":"string"},"count":{"type":"integer"},"documents":{"type":"array","items":{}},"locale":{"type":"string"},"locale_contract":{"type":"object","properties":{"bcp47":{"type":"string"},"raw":{"type":"string"}}},"message":{"type":"string"},"pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}}},"processing_time":{"type":"string"},"results":{"type":"array","items":{}},"search":{"type":"object","properties":{"mode":{"type":"string"},"query":{"type":"string"},"query_original":{"type":"string"},"query_variants":{"type":"array","items":{}},"query_normalized":{"type":"boolean"},"workspace_filter":{"type":"array","items":{}},"execution_time_ms":{"type":"number"},"fulltext_matches":{"type":"integer"},"filename_only_mode":{"type":"boolean"}}},"search_stats":{"type":"object","properties":{"mode":{"type":"string"},"query":{"type":"string"},"query_original":{"type":"string"},"query_variants":{"type":"array","items":{}},"query_normalized":{"type":"boolean"},"workspace_filter":{"type":"array","items":{}},"execution_time_ms":{"type":"number"},"fulltext_matches":{"type":"integer"},"filename_only_mode":{"type":"boolean"}}},"status":{"type":"string"},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-similar-find":{"get":{"operationId":"po-documents-similar-find","summary":"Find similar documents","tags":["Document AI — DMS"],"description":"Find documents similar to a reference document using AI embeddings. Requires AI-DMS processing (basic+ tier) on the reference document — unprocessed documents have no embeddings. Use for duplicate detection, finding related invoices...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-similar-find.md"},"parameters":[{"name":"documents_id","in":"query","required":false,"schema":{"type":"number"},"description":"Numeric document ID of the reference document. At least one of documents_id or pofid MUST be provided."},{"name":"pofid","in":"query","required":false,"schema":{"type":"string"},"description":"POFID of the reference document (resolved to documents_id). At least one of documents_id or pofid MUST be provided."},{"name":"threshold","in":"query","required":false,"schema":{"type":"number"},"description":"Similarity threshold 0.0-1.0 (default: 0.7 = 70%)"},{"name":"limit","in":"query","required":false,"schema":{"type":"number"},"description":"Max results 1-50 (default: 10)"}],"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"}}}}},"code":{"type":"string"},"message":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-tag-add":{"post":{"operationId":"po-documents-tags-create","summary":"Add Document Tag","tags":["Document AI — DMS"],"description":"Add one or more tags to a document. Creates the tag in the workspace if it does not exist yet.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-tags-create.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"tag_name":{"type":"string","description":"Tag-Name (max 100 characters)"},"tag_color":{"type":"string","description":"Optional hex color (#RGB or #RRGGBB format, e.g. #FF0000). Invalid formats will be rejected."}},"required":["pofid","tag_name"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"tag_name":{"type":"string","description":"Tag-Name (max 100 characters)"},"tag_color":{"type":"string","description":"Optional hex color (#RGB or #RRGGBB format, e.g. #FF0000). Invalid formats will be rejected."}},"required":["pofid","tag_name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-tag-remove":{"post":{"operationId":"po-documents-tags-delete","summary":"Remove Document Tag","tags":["Document AI — DMS"],"description":"Remove a tag from a document without deleting the tag definition from the workspace.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-tags-delete.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"tag_name":{"type":"string","description":"Name of the tag to delete (REQUIRED if tag_id not provided)"},"tag_id":{"type":"integer","description":"ID of the tag to delete (REQUIRED if tag_name not provided)"}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID"},"tag_name":{"type":"string","description":"Name of the tag to delete (REQUIRED if tag_id not provided)"},"tag_id":{"type":"integer","description":"ID of the tag to delete (REQUIRED if tag_name not provided)"}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-tags":{"get":{"operationId":"po-documents-tags-list","summary":"List Document Tags","tags":["Document AI — DMS"],"description":"List all tags applied to a document with optional color and category metadata.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-tags-list.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-thumb-get/{pofid}/{page_number}":{"get":{"operationId":"po-documents-thumbnail-get","summary":"Get document thumbnail","tags":["Document AI — DMS"],"description":"Get a thumbnail preview image of a specific document page. Returns base64-encoded WebP/JPEG image. Accepts pofid or documents_id. Use for document preview, visual comparison, page inspection.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-thumbnail-get.md"},"parameters":[{"name":"pofid","in":"path","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID (POFID). At least one of pofid or documents_id MUST be provided."},{"name":"page_number","in":"path","required":true,"schema":{"type":"number"},"description":"Page number (default: 1)"},{"name":"documents_id","in":"query","required":false,"schema":{"type":"number"},"description":"Numeric document ID — Alternative to pofid."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-type-assign":{"post":{"operationId":"po-documents-type-assign","summary":"Assign document type","tags":["Document AI — DMS"],"description":"Assign or change the document type of an existing document. POST /documents/document-type-assign. Required: pofid or documents_id, and document_type_id or document_type_key. Optional: anchor_mode (immediate|eoy), reason. Allowed only...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-type-assign.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice document ID (POFID). Provide pofid or documents_id."},"documents_id":{"type":"integer","description":"Numeric document ID. Provide pofid or documents_id."},"document_type_id":{"type":"integer","description":"Document type ID. Provide document_type_id or document_type_key."},"document_type_key":{"type":"string","description":"Document type key, e.g. letter, invoice, privacy_policy."},"anchor_mode":{"type":"string","description":"Retention anchor for the policy calculation (default immediate).","enum":["immediate","eoy"]},"reason":{"type":"string","description":"Optional audit reason."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice document ID (POFID). Provide pofid or documents_id."},"documents_id":{"type":"integer","description":"Numeric document ID. Provide pofid or documents_id."},"document_type_id":{"type":"integer","description":"Document type ID. Provide document_type_id or document_type_key."},"document_type_key":{"type":"string","description":"Document type key, e.g. letter, invoice, privacy_policy."},"anchor_mode":{"type":"string","description":"Retention anchor for the policy calculation (default immediate).","enum":["immediate","eoy"]},"reason":{"type":"string","description":"Optional audit reason."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-types-create":{"post":{"operationId":"po-documents-document-types-create","summary":"Create document type","tags":["Document AI — DMS"],"description":"Create account document type. POST /documents/document-types-create with name, source_locale, optional retention_years and retention_mode.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-document-types-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the document type."},"source_locale":{"type":"string","description":"Source locale for type labels (e.g. de-DE)."},"retention_years":{"type":"integer","description":"Retention period in years (GoBD/compliance workflows)."},"retention_mode":{"type":"string","description":"Retention policy: none or compliance (WORM-style).","enum":["none","compliance"]}},"required":["name","source_locale"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-types-delete":{"post":{"operationId":"po-documents-document-types-delete","summary":"Delete document type","tags":["Document AI — DMS"],"description":"Delete account custom document type by numeric id. Fails with TYPE_IN_USE when documents or workspace defaults still reference the type. System-default types are read-only. POST /documents/document-types-delete with id.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-document-types-delete.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Document type id from po_documents_document_types_list"},"confirm":{"type":"boolean","description":"MCP safety gate: must be true to delete"}},"required":["id","confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-types-list":{"get":{"operationId":"po-documents-document-types-list","summary":"List document types","tags":["Document AI — DMS"],"description":"List document types with retention settings. GET /documents/document-types-list.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-document-types-list.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"locale":{"type":"string"},"processing_time":{"type":"string"},"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"type_key":{"type":"string"},"name":{"type":"string"},"display_name":{"type":"string"},"display_locale":{"type":"string"},"description":{"type":"string"},"name_default":{"type":"string"},"name_i18n_key":{"type":"string"},"description_i18n_key":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"},"retention_years":{"type":"string"},"retention_mode":{"type":"string"},"jurisdiction":{"type":"string"},"legal_basis":{"type":"string"},"is_system_default":{"type":"integer"},"is_active":{"type":"integer"},"sort_order":{"type":"integer"},"account_id":{"type":"string"},"ai_hint":{"type":"string"},"default_idp_agent_id":{"type":"string"},"default_locale":{"type":"string"},"translation_status":{"type":"string"},"document_count":{"type":"integer"},"workspace_default_count":{"type":"integer"}}}},"status":{"type":"string"},"total_count":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-types-update":{"post":{"operationId":"po-documents-document-types-update","summary":"Update document type","tags":["Document AI — DMS"],"description":"Update a custom document type (is_system_default = 0 only). Requires id or type_key.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-document-types-update.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Document type numeric id from po_documents_document_types_list"},"type_key":{"type":"string","description":"Document type key (Alternative to id)"},"name_default":{"type":"string","description":"New display name for custom document types"},"retention_years":{"type":"integer","description":"Updated retention period in years."},"retention_mode":{"type":"string","description":"Updated retention policy: none or compliance.","enum":["none","compliance"]},"description_default":{"type":"string","description":"Updated default description for the custom document type."},"description":{"type":"string","description":"Alias for description_default (accepted for MCP/Postman compatibility)."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-version-compare":{"get":{"operationId":"po-documents-versions-diff-get","summary":"Compare two document versions","tags":["Document AI — DMS"],"description":"Compare a version (pofid) with its predecessor (default) or with compare_to_pofid (same document line). Returns metadata deltas (size, pages, type, content_identical), best-effort OCR text statistics (word-level similarity, top added...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-versions-diff-get.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"POFID of the version to compare (usually the newer one)."},{"name":"compare_to_pofid","in":"query","required":false,"schema":{"type":"string"},"description":"POFID of the other version (same line). Default: direct predecessor."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-version-delete":{"post":{"operationId":"po-documents-versions-delete","summary":"Delete a single older version","tags":["Document AI — DMS"],"description":"Delete ONE older version (pofid) of a document line. The current version cannot be deleted alone (409 VERSION_LATEST_NOT_DELETABLE) — delete the whole document with document-delete (all versions, atomic) or create a newer version...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-versions-delete.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"POFID of the older version to delete."},"mode":{"type":"string","description":"trash = recycle bin, instant = permanent (confirm required).","enum":["trash","instant"],"default":"trash"},"confirm":{"type":"boolean","description":"Required for mode=instant."}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"POFID of the older version to delete."},"mode":{"type":"string","description":"trash = recycle bin, instant = permanent (confirm required).","enum":["trash","instant"],"default":"trash"},"confirm":{"type":"boolean","description":"Required for mode=instant."}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-version-restore":{"post":{"operationId":"po-documents-versions-restore","summary":"Restore older version as new version","tags":["Document AI — DMS"],"description":"Rollback without rewriting history: creates a NEW latest version (n+1, own pofid) with the content of an OLDER version (pofid). OCR text and metadata of that older version are copied; no IDP re-run. Fails if the selected version...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-versions-restore.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"POFID of the older version to restore."},"version_comment":{"type":"string","description":"Optional note; default \"Restored from version N\". Required when the current version is revision-secure."}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"POFID of the older version to restore."},"version_comment":{"type":"string","description":"Optional note; default \"Restored from version N\". Required when the current version is revision-secure."}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/document-versions":{"get":{"operationId":"po-documents-versions-list","summary":"List document versions","tags":["Document AI — DMS"],"description":"Version history of a document line. Pass the pofid of ANY version (path segment or pofid parameter); returns all versions with version number, pofid, is_latest, comment, ai_summary, creator, timestamps, protection (retention/legal hold)...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-versions-list.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"Document POFID (byte-copy from po_documents_search/po_documents_get; O/0 in the hash is normalized)."},{"name":"include_trashed","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Include versions that are in the recycle bin."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/documents-export":{"post":{"operationId":"po-document-lists-documents-export","summary":"Export document list","tags":["Document AI — DMS"],"description":"Export Documents Bulk export documents as ZIP archive. Options: - Specific POFIDs - All from workspace","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-lists-documents-export.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"selected_pofids":{"type":"array","description":"JSON array of POFIDs to export.","items":{"type":"string"}},"export_format":{"type":"string","description":"Export format: excel/xlsx (spreadsheet), csv, json, pdf. Legacy alias zip maps to json bundle with original files (use archive_format for zip/7z).","enum":["excel","xlsx","csv","json","pdf","zip"]},"selected_fields":{"type":"array","description":"JSON array of field names to export (e.g. ['file_name', 'created_datetime', 'file_size']).","items":{"type":"string"}},"field_order":{"type":"array","description":"Optional column order for the export.","items":{"type":"string"}},"include_original_files":{"type":"boolean","description":"Include original files in the export bundle (typically with export_format=json or zip alias).","default":false},"include_ocr_text":{"type":"boolean","description":"Include OCR-extracted text in the export.","default":false},"include_ocr_bounding_boxes":{"type":"boolean","description":"Include OCR bounding boxes (position data) in the export.","default":false},"archive_format":{"type":"string","description":"Archive format for file exports (zip or 7z).","enum":["zip","7z"],"default":"zip"},"excel_options":{"type":"object","description":"Optional Excel-specific settings (column width, header formatting etc.)."},"filename_pattern":{"type":"string","description":"Optional naming schema for original files in the ZIP/7z bundle. Use {field_key} tokens plus separators _ - . and space, e.g. {date_issued}_{document_number}_{publisher_name}_{document_type}. Empty keeps the original filename (DMS file_name). Applied only when original files are included. Invalid patterns return HTTP 400 INVALID_FILENAME_PATTERN.","maxLength":2000}},"required":["selected_pofids","export_format","selected_fields"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Dokumentenliste exportieren","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output_files":{"type":"object","additionalProperties":{"type":"string","format":"uri"}},"output":{"type":"object","properties":{"total_exported":{"type":"number"},"format":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/documents-list":{"post":{"operationId":"po-storage-documents-list","summary":"Search documents (advanced)","tags":["Document AI — DMS"],"description":"Advanced multi-source document search within the workspace you provide (workspace_id is required).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-documents-list.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Required: ID of the workspace"},"global_search":{"type":"string","description":"Search term for multi-source document search (fulltext, OCR, entities, semantic)."},"search_mode":{"type":"string","description":"Search mode: `intelligent` (auto), `hybrid`, `semantic`, `fulltext`, or `exact`.","enum":["intelligent","hybrid","semantic","fulltext"],"default":"intelligent"},"search_preference":{"type":"string","description":"keyword=BM25 only; semantic=vector search; balanced=blend both (default).","enum":["keyword","semantic","balanced"],"default":"balanced"},"search_scope":{"type":"string","description":"current=search only the active workspace; all=search all accessible workspaces.","enum":["current","all"],"default":"current"},"similarity_threshold":{"type":"number","description":"Minimum Similarity for Semantic Search (0.0-1.0)","default":0.35},"page":{"type":"integer","description":"Page number for pagination","default":1},"limit":{"type":"integer","description":"documents per page (max 500)","default":500,"maximum":500},"sort":{"type":"string","description":"Sort field (e.g. created_at, updated_at, title).","default":"created_datetime"},"order":{"type":"string","description":"Sort direction for listed documents: ASC or DESC (default DESC).","enum":["ASC","DESC"],"default":"DESC"},"__document__data__classification__document_type":{"type":"array","description":"Filter: Documenttypen (JSON Array or komma-separiert)","items":{"type":"string"}},"__document__content__extraction__keywords":{"type":"array","description":"Filter: Keywords","items":{"type":"string"}},"__document__data__workflow__state":{"type":"array","description":"Filter: Workflow-Status","items":{"type":"string"}},"__document__data__classification__locale":{"type":"array","description":"Filter: language/Locale (matches the stored key `_document__data__classification__locale` and `__document__data__classification__locale`)","items":{"type":"string"}},"__document__data__metadata__save_paths":{"type":"array","description":"Filter by storage path (PREFIX_WILDCARD:/path or EXACT:/path).","items":{"type":"string"}},"ai_dms_status":{"type":"array","description":"Filter: AI-DMS Tier","items":{"type":"string","enum":["basic","premium","ultra","not activates"]}},"ai_agent_status":{"type":"array","description":"Filter: AI-Agent Status","items":{"type":"string","enum":["aktiv","pending","running","done","inaktiv"]}},"date_from":{"type":"string","description":"Filter: Date from (YYYY-MM-DD)","format":"date"},"date_to":{"type":"string","description":"Filter: date bis (YYYY-MM-DD)","format":"date"},"share_context":{"type":"string","description":"External share context token JSON for scoped access in a shared workspace."}},"required":["workspace_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Required: ID of the workspace"},"global_search":{"type":"string","description":"Search term for multi-source document search (fulltext, OCR, entities, semantic)."},"search_mode":{"type":"string","description":"Search mode: `intelligent` (auto), `hybrid`, `semantic`, `fulltext`, or `exact`.","enum":["intelligent","hybrid","semantic","fulltext"],"default":"intelligent"},"search_preference":{"type":"string","description":"keyword=BM25 only; semantic=vector search; balanced=blend both (default).","enum":["keyword","semantic","balanced"],"default":"balanced"},"search_scope":{"type":"string","description":"current=search only the active workspace; all=search all accessible workspaces.","enum":["current","all"],"default":"current"},"similarity_threshold":{"type":"number","description":"Minimum Similarity for Semantic Search (0.0-1.0)","default":0.35},"page":{"type":"integer","description":"Page number for pagination","default":1},"limit":{"type":"integer","description":"documents per page (max 500)","default":500,"maximum":500},"sort":{"type":"string","description":"Sort field (e.g. created_at, updated_at, title).","default":"created_datetime"},"order":{"type":"string","description":"Sort direction for listed documents: ASC or DESC (default DESC).","enum":["ASC","DESC"],"default":"DESC"},"__document__data__classification__document_type":{"type":"array","description":"Filter: Documenttypen (JSON Array or komma-separiert)","items":{"type":"string"}},"__document__content__extraction__keywords":{"type":"array","description":"Filter: Keywords","items":{"type":"string"}},"__document__data__workflow__state":{"type":"array","description":"Filter: Workflow-Status","items":{"type":"string"}},"__document__data__classification__locale":{"type":"array","description":"Filter: language/Locale (matches the stored key `_document__data__classification__locale` and `__document__data__classification__locale`)","items":{"type":"string"}},"__document__data__metadata__save_paths":{"type":"array","description":"Filter by storage path (PREFIX_WILDCARD:/path or EXACT:/path).","items":{"type":"string"}},"ai_dms_status":{"type":"array","description":"Filter: AI-DMS Tier","items":{"type":"string","enum":["basic","premium","ultra","not activates"]}},"ai_agent_status":{"type":"array","description":"Filter: AI-Agent Status","items":{"type":"string","enum":["aktiv","pending","running","done","inaktiv"]}},"date_from":{"type":"string","description":"Filter: Date from (YYYY-MM-DD)","format":"date"},"date_to":{"type":"string","description":"Filter: date bis (YYYY-MM-DD)","format":"date"},"share_context":{"type":"string","description":"External share context token JSON for scoped access in a shared workspace."}},"required":["workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"count":{"type":"number"},"result":{"type":"array","items":{"type":"object","properties":{"pofid":{"type":"string"},"filename":{"type":"string"},"filesize":{"type":"number"},"mime_type":{"type":"string"},"workspace_id":{"type":"number"},"created_at":{"type":"string","format":"date-time"}}}}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/duplicate-check":{"post":{"operationId":"po-documents-duplicate-check","summary":"Check for duplicate documents","tags":["Document AI — DMS"],"description":"Check whether a document is a duplicate. Provide exactly one of pofid or file_hash.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-duplicate-check.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice file ID of an existing, analysed document. Checks it against the other documents in the account by business data. Use pofid OR file_hash."},"file_hash":{"type":"string","description":"SHA-256 hex digest of a file (64 characters), to find byte-identical stored files before an upload. Use file_hash OR pofid.","pattern":"^[a-fA-F0-9]{64}$"},"workspace_id":{"type":"integer","description":"Only with file_hash: limit the search to this workspace."},"exclude_pofid":{"type":"string","description":"Only with file_hash: POFID to exclude from the match."},"exclude_documents_id":{"type":"integer","description":"Only with file_hash: documents_id to exclude from the match."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/entity-statistics":{"get":{"operationId":"po-entities-stats-get","summary":"Get entity statistics","tags":["Document AI — DMS"],"description":"Get detailed statistics for a specific entity (company, person, IBAN) — which documents mention it, total amounts, time range. Use for: \"How much did we order from company X?\".","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-entities-stats-get.md"},"parameters":[{"name":"entity_value","in":"query","required":true,"schema":{"type":"string"},"description":"Entity value (e.g. company name, IBAN, person name)"},{"name":"entity_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter type: company, person, iban, tax_id, amount, address, email, phone"}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"date_range":{"type":"string"},"document_count":{"type":"integer"},"document_count_basis":{"type":"string"},"document_count_table_cache":{"type":"string"},"documents":{"type":"array","items":{}},"documents_sample_limit":{"type":"integer"},"entity":{"type":"string"},"entity_type":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"total_amount":{"type":"integer"},"total_amount_context":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/folder-create":{"post":{"operationId":"po-documents-folders-create","summary":"Create document folder","tags":["Document AI — DMS"],"description":"Bundle at least two existing documents (POFIDs) into a stapled folder/heft in the Headless DMS. This is not an empty directory create — it links documents that already exist.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-folders-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pofids":{"type":"array","description":"List the PaperOffice-Document IDs (POFIDs) that are to be summarized in the folder. At least 2 are required.","minItems":2,"items":{"type":"string"}},"folder_name":{"type":"string","description":"Name of the document folder. If empty, it is automatically generated (e.g., '3 linked Documents')."},"folder_type":{"type":"string","description":"Folder type: staple (stapled stack) or binder (ring binder).","enum":["staple","binder"],"default":"staple"},"folder_description":{"type":"string","description":"Optional description for the document folder."},"parent_pofid":{"type":"string","description":"POFParent document ID. Default: first document in the list."}},"required":["pofids"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Create document folder (stapling)","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"folder_id":{"type":"string"},"document_count":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/folder-dissolve":{"post":{"operationId":"po-documents-folders-dissolve","summary":"Dissolve (unstaple) folder","tags":["Document AI — DMS"],"description":"Dissolve a folder and optionally relocate contained documents. Use for cleanup and restructuring workspace trees.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-folders-dissolve.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"folder_id":{"type":"string","description":"Document folder ID. Alternative to `pofid` when dissolving by folder."},"pofid":{"type":"string","description":"POFID of a document in the folder (`.podf` map). Alternative to `folder_id`."},"confirm":{"type":"boolean","description":"Must be true to confirm this destructive action."}},"required":["confirm"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"folder_id":{"type":"string","description":"Document folder ID. Alternative to `pofid` when dissolving by folder."},"pofid":{"type":"string","description":"POFID of a document in the folder (`.podf` map). Alternative to `folder_id`."},"confirm":{"type":"boolean","description":"Must be true to confirm this destructive action."}},"required":["confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Dissolve document folder","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"status":{"type":"string"},"released_pofids":{"type":"array","items":{"type":"string"}}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/folder-list":{"post":{"operationId":"po-documents-folders-list","summary":"List folders","tags":["Document AI — DMS"],"description":"Lists document folder collections (document_folders) only — NOT individual document files.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-folders-list.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Required: Workspace ID to list folders from"}},"required":["workspace_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Required: Workspace ID to list folders from"}},"required":["workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"List document folders","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"folders":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}}}}},"jobs":{"type":"string","description":"Jobs"},"templates":{"type":"string","description":"Templates"}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/folder-update":{"post":{"operationId":"po-documents-folders-update","summary":"Update folder","tags":["Document AI — DMS"],"description":"Update folder name, parent, or metadata for an existing DMS folder.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-folders-update.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"folder_id":{"type":"string","description":"ID of the document folder to update."},"folder_name":{"type":"string","description":"New name for the document folder."},"folder_description":{"type":"string","description":"New description for the document folder."},"folder_icon":{"type":"string","description":"New icon for the document folder (emoji or icon key)."},"folder_color":{"type":"string","description":"New color for the document folder (hex code, e.g. `#3b82f6`)."}},"required":["folder_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"folder_id":{"type":"string","description":"ID of the document folder to update."},"folder_name":{"type":"string","description":"New name for the document folder."},"folder_description":{"type":"string","description":"New description for the document folder."},"folder_icon":{"type":"string","description":"New icon for the document folder (emoji or icon key)."},"folder_color":{"type":"string","description":"New color for the document folder (hex code, e.g. `#3b82f6`)."}},"required":["folder_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Update document folder","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"status":{"type":"string"},"document_count":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/idp-agent-run":{"post":{"operationId":"po-documents-idp-agent-run","summary":"Run IDP Agent on document","tags":["Document AI — DMS"],"description":"Run an IDP Agent: provide idp_agent_id plus pofid, upload_id, or file_url. Returns extracted_fields and confidence when done. Poll po_documents_get (processing_state) until done.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-idp-agent-run.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"idp_agent_id":{"type":"string","description":"IDP Agent ID from po_documents_processing_agents_list (kind idp_extract)"},"pofid":{"type":"string","description":"POFID of a document already stored in PaperOffice. Provide exactly one source: pofid, upload_id, file_url, file_base64 or a multipart file."},"upload_id":{"type":"string","description":"ID of a prior chunked upload to process instead of pofid or a file."},"file_url":{"type":"string","description":"Public HTTPS URL of a file to download and upload before running the agent (aliases: source_url, document_url)."},"file_name":{"type":"string","description":"File name for the uploaded document (default: the uploaded file name, otherwise document.pdf)."},"workspace_id":{"type":"integer","description":"Target workspace for a new upload. Required for file uploads unless workspace_name is given; ignored for an existing pofid."},"workspace_name":{"type":"string","description":"Target workspace by name for a new upload (Alternative to workspace_id)."},"client_wait":{"type":"boolean","description":"true: keep the request open and poll until the pipeline finishes or wait_timeout_sec elapses. false (default): return HTTP 202 with status queued immediately.","default":false},"wait_timeout_sec":{"type":"integer","description":"With client_wait=true: maximum wait in seconds (10–600, default 300). On timeout the response has status timeout and the pipeline keeps running.","default":300},"poll_interval_sec":{"type":"integer","description":"With client_wait=true: polling interval in seconds (2–30, default 5).","default":5}},"required":["idp_agent_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"idp_agent_id":{"type":"string","description":"IDP Agent ID from po_documents_processing_agents_list (kind idp_extract)"},"pofid":{"type":"string","description":"POFID of a document already stored in PaperOffice. Provide exactly one source: pofid, upload_id, file_url, file_base64 or a multipart file."},"upload_id":{"type":"string","description":"ID of a prior chunked upload to process instead of pofid or a file."},"file_url":{"type":"string","description":"Public HTTPS URL of a file to download and upload before running the agent (aliases: source_url, document_url)."},"file_name":{"type":"string","description":"File name for the uploaded document (default: the uploaded file name, otherwise document.pdf)."},"workspace_id":{"type":"integer","description":"Target workspace for a new upload. Required for file uploads unless workspace_name is given; ignored for an existing pofid."},"workspace_name":{"type":"string","description":"Target workspace by name for a new upload (Alternative to workspace_id)."},"client_wait":{"type":"boolean","description":"true: keep the request open and poll until the pipeline finishes or wait_timeout_sec elapses. false (default): return HTTP 202 with status queued immediately.","default":false},"wait_timeout_sec":{"type":"integer","description":"With client_wait=true: maximum wait in seconds (10–600, default 300). On timeout the response has status timeout and the pipeline keeps running.","default":300},"poll_interval_sec":{"type":"integer","description":"With client_wait=true: polling interval in seconds (2–30, default 5).","default":5}},"required":["idp_agent_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/idp-collections-list":{"get":{"operationId":"po-documents-idp-collections-list","summary":"List IDP collections","tags":["Document AI — DMS"],"description":"List IDP extraction collections and field schemas. GET /documents/idp-collections-list.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-idp-collections-list.md"},"parameters":[{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"Default true: fields_preview with the first 12 keys. Set false for the full fields[] list (_supplier_name, _total_amount, …)."}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"categories":{"type":"object","properties":{"finance":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"logistics":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"hr":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"legal":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"identity":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"healthcare":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"insurance":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"technical":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"correspondence":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"smart":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}},"other":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"icon":{"type":"string"}}}}},"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"field_count":{"type":"integer"},"fields_preview":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string"},"label":{"type":"string"}}}},"icon":{"type":"string"},"description":{"type":"string"},"preview_image":{"type":"string"},"document_family":{"type":"string"},"document_kind":{"type":"string"},"document_country":{"type":"string"},"is_smart":{"type":"boolean"},"recommended_model":{"type":"string"},"compact":{"type":"boolean"}}}},"compact":{"type":"boolean"},"processing_time":{"type":"string"},"status":{"type":"string"},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/meta-fields-list":{"get":{"operationId":"po-documents-meta-fields-list","summary":"List meta fields (index schema)","tags":["Document AI — DMS"],"description":"List available document meta fields (workspace index schema). Default MCP compact=true (about small). For values on one document use po_intelligence_meta_fields_get. GET /documents/meta-fields-list.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-meta-fields-list.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Optional workspace scope"},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"MCP only: true (default) returns compact field catalog; false returns full UI export catalog (very large)"},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"MCP only: label locale for compact output (default en)"},{"name":"fields_limit","in":"query","required":false,"schema":{"type":"integer","default":120,"minimum":1,"maximum":500},"description":"MCP only: max fields in compact output (default 120, sorted by usage_count)"}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"aliases":{"type":"object","properties":{"document_type":{"type":"string"},"document_status":{"type":"string"},"document_keywords":{"type":"string"},"workflow_state":{"type":"string"},"name_suggestion":{"type":"string"},"summary":{"type":"string"},"save_paths":{"type":"string"},"quality_score":{"type":"string"},"currency":{"type":"string"},"total_amount":{"type":"string"},"net_amount":{"type":"string"},"gross_amount":{"type":"string"},"vat_amount":{"type":"string"},"document_number":{"type":"string"},"document_date":{"type":"string"},"due_date":{"type":"string"},"sender_name":{"type":"string"},"recipient_name":{"type":"string"},"locale":{"type":"string"},"language":{"type":"string"}}},"custom_fields":{"type":"array","items":{"type":"object","properties":{"field_key":{"type":"string"},"labels":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"display_name":{"type":"string"},"field_type":{"type":"string"},"section":{"type":"object","properties":{"keyname":{"type":"string"},"labels":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"}}}}},"usage_count":{"type":"integer"},"options":{"type":"string"},"is_custom":{"type":"boolean"}}}},"field_groups":{"type":"object","properties":{"doc_edit_properties_tab":{"type":"array","items":{}},"doc_edit_datafields_tab":{"type":"array","items":{}}}},"processing_time":{"type":"string"},"section_labels":{"type":"object","properties":{"_metadata":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_classification":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_dates":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_financial":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_parties":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_workflow":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_security":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_extraction":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_audit":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_content_data":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_vision":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_file":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_system":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"_general":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}}}},"standard_fields":{"type":"array","items":{"type":"object","properties":{"field_key":{"type":"string"},"labels":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"display_name":{"type":"string"},"field_type":{"type":"string"},"section":{"type":"object","properties":{"keyname":{"type":"string"},"labels":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}}}},"is_standard":{"type":"boolean"},"options":{"type":"object","properties":{"options_source":{"type":"string"}}}}}},"status":{"type":"string"},"system_fields":{"type":"array","items":{"type":"object","properties":{"field_key":{"type":"string"},"labels":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}},"display_name":{"type":"string"},"field_type":{"type":"string"},"section":{"type":"object","properties":{"keyname":{"type":"string"},"labels":{"type":"object","properties":{"de":{"type":"string"},"en":{"type":"string"},"es":{"type":"string"},"fr":{"type":"string"},"it":{"type":"string"},"ru":{"type":"string"}}}}},"usage_count":{"type":"integer"},"options":{"type":"object","properties":{"options_source":{"type":"string"}}},"is_system":{"type":"boolean"}}}},"total_custom":{"type":"integer"},"total_standard":{"type":"integer"},"total_system":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/ocr-get":{"get":{"operationId":"po-documents-ocr-get","summary":"Get document OCR text","tags":["Document AI — DMS"],"description":"Returns the OCR-extracted text of a document. Contains text per page with confidence scoring.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-ocr-get.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice File Document ID"},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"OCR language/locale hint (e.g. de-DE). Omit for auto-detect."},{"name":"page","in":"query","required":false,"schema":{"type":"integer"},"description":"1-based page number (omit for full-document OCR text)."},{"name":"include_bounding_boxes","in":"query","required":false,"schema":{"type":"boolean"},"description":"When true, include OCR bounding-box coordinates per text block."},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","text"],"default":"json"},"description":"Response shape: `json` (structured OCR pages, default) or `text` (plain text without layout)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"result":{"type":"object","properties":{"text":{"type":"string"},"pages":{"type":"array","items":{}},"has_ocr":{"type":"boolean"}}}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/ocr-search-hits":{"get":{"operationId":"po-documents-ocr-search-hits","summary":"Find search term inside a document (page + rectangle)","tags":["Document AI — DMS"],"description":"Find where a search term occurs inside ONE document: returns each occurrence with page number, percent rectangle (box = exact OCR rectangle, x/y/w/h = padded display marker) and a snippet. Read-only, no OCR run. Pricing: API minimum...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-ocr-search-hits.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID of the document (from document-search / documents-list). Numeric documents_id is also accepted."},{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":160},"description":"Search term or phrase, 2 to 160 characters. Matched as substring, case-insensitive, accent-folded."},{"name":"match","in":"query","required":false,"schema":{"type":"string","enum":["auto","phrase","any"],"default":"auto"},"description":"auto: whole phrase first, single words if the phrase has no hit. phrase: whole phrase only. any: every word on its own."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Occurrences of a search term inside one document with page and rectangle","properties":{"status":{"type":"string","enum":["success"]},"pofid":{"type":"string"},"total_pages":{"type":"integer","description":"Pages of the document"},"query":{"type":"string","description":"Normalized query"},"match":{"type":"string","description":"Requested mode","enum":["auto","phrase","any"]},"match_mode":{"type":"string","description":"Mode that produced the hits","enum":["phrase","tokens","none"]},"coordinates":{"type":"string","enum":["percent_of_page"]},"total":{"type":"integer","description":"Number of occurrences found (before the 2000 cap)"},"truncated":{"type":"boolean","description":"true when hits were capped; the first hit of every page is kept"},"pages_truncated":{"type":"boolean","description":"true when more than 2000 pages matched"},"page_count":{"type":"integer","description":"Distinct pages with at least one hit"},"hits":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"0-based position in reading order"},"page":{"type":"integer","description":"1-based page number"},"has_box":{"type":"boolean","description":"false: text present on the page but no coordinates"},"x":{"type":"number","description":"Display marker left, percent"},"y":{"type":"number","description":"Display marker top, percent"},"w":{"type":"number","description":"Display marker width, percent"},"h":{"type":"number","description":"Display marker height, percent"},"box":{"type":"object","description":"Rectangle in percent of the page, origin top-left","properties":{"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"}}},"box_scope":{"type":"string","description":"word: cut to the term inside the OCR line (tags stripped, character-width estimate); line: whole OCR line (right-to-left script)","enum":["word","line"]},"snippet":{"type":"string","description":"Up to 90 characters of context"},"text_matches":{"type":"integer","description":"Only when has_box=false: occurrences in the page text"}},"required":["index","page","has_box","snippet"]}}},"required":["status","pofid","query","match_mode","total","hits"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/podcast-audiobook-estimate":{"post":{"operationId":"po-documents-podcast-audiobook-estimate","summary":"Document: Podcast audiobook estimate","tags":["Document AI — DMS"],"description":"Estimate cost/length for podcast audiobook generation from OCR/text layer. Billing of generation itself happens via paperoffice_voice___tts___basic per chunk; this endpoint is free orchestration. Requires workspace read. Auth: po_sk_...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-podcast-audiobook-estimate.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID (POFID) of the source document"},"language":{"type":"string","description":"ISO language code for intro/outro (default de; non-de uses English script)"},"voice":{"type":"string","description":"TTS catalog voice name (default: language female default, e.g. Anneliese)"}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID (POFID) of the source document"},"language":{"type":"string","description":"ISO language code for intro/outro (default de; non-de uses English script)"},"voice":{"type":"string","description":"TTS catalog voice name (default: language female default, e.g. Anneliese)"}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"chars":{"type":"integer"},"credits":{"type":"integer"},"chapters":{"type":"integer"},"chunks":{"type":"integer"},"pages_with_text":{"type":"integer"},"page_start":{"type":"integer"},"page_end":{"type":"integer"},"chapter_outline":{"type":"array","description":"Chapters with title and page_start/page_end (no full text)","items":{"type":"object","properties":{"index":{"type":"integer"},"title":{"type":"string"},"page_start":{"type":"integer"},"page_end":{"type":"integer"}}}},"billing_job":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/podcast-audiobook-start":{"post":{"operationId":"po-documents-podcast-audiobook-start","summary":"Document: Podcast audiobook start","tags":["Document AI — DMS"],"description":"Start podcast audiobook job for a document with OCR/text. Async worker: chunked TTS basic, ffmpeg merge, encrypted .pod storage. Real billing via voice TTS jobs. Requires workspace write. Poll status endpoint. Auth: po_sk_/po_ut_...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-podcast-audiobook-start.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID (POFID) of the source document"},"language":{"type":"string","description":"ISO language code for intro/outro (default de; non-de uses English script)"},"voice":{"type":"string","description":"TTS catalog voice name (default: language female default, e.g. Anneliese)"}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID (POFID) of the source document"},"language":{"type":"string","description":"ISO language code for intro/outro (default de; non-de uses English script)"},"voice":{"type":"string","description":"TTS catalog voice name (default: language female default, e.g. Anneliese)"}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"code":{"type":"string"},"podcast_audiobook":{"type":"object"},"estimate":{"type":"object"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/podcast-audiobook-status":{"post":{"operationId":"po-documents-podcast-audiobook-status","summary":"Document: Podcast audiobook status","tags":["Document AI — DMS"],"description":"Poll podcast audiobook job status stored on the source document. Free orchestration endpoint. Requires workspace read. Auth: po_sk_/po_ut_ or po_pk_ with scope documents:read.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-podcast-audiobook-status.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID (POFID) of the source document"}},"required":["pofid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID (POFID) of the source document"}},"required":["pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"podcast_audiobook":{"type":"object"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/processing-lane-upgrade":{"post":{"operationId":"po-documents-processing-lane-upgrade","summary":"Upgrade Start-SLA for pending documents","tags":["Document AI — DMS"],"description":"Upgrade Start-SLA (processing_lane) for untouched pending AI-DMS documents only. Higher factor only — no downgrade, no refund. Pass processing_lane and confirm=1 (or dry_run=1).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-processing-lane-upgrade.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"processing_lane":{"type":"string","description":"Target Start-SLA lane (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant). Must be strictly higher than current.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"confirm":{"type":"boolean","description":"Set true to apply the upgrade (required unless dry_run)."},"dry_run":{"type":"boolean","description":"Preview upgradable/skipped docs without writing."},"scope":{"type":"string","description":"pending (default, all untouched pending) or pofids.","enum":["pending","pofids"]},"pofids":{"type":"array","description":"Optional document IDs when scope=pofids.","items":{"type":"string"}}},"required":["processing_lane"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"processing_lane":{"type":"string","description":"Target Start-SLA lane (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant). Must be strictly higher than current.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"confirm":{"type":"boolean","description":"Set true to apply the upgrade (required unless dry_run)."},"dry_run":{"type":"boolean","description":"Preview upgradable/skipped docs without writing."},"scope":{"type":"string","description":"pending (default, all untouched pending) or pofids.","enum":["pending","pofids"]},"pofids":{"type":"array","description":"Optional document IDs when scope=pofids.","items":{"type":"string"}}},"required":["processing_lane"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/redact-agent-run":{"post":{"operationId":"po-documents-redact-agent-run","summary":"Run Redact Agent on document","tags":["Document AI — DMS"],"description":"POST /documents/redact-agent-run. Required: redact_agent_id (kind pdf_redact from po_documents_processing_agents_list). Input: pofid | upload_id | file_url. Optional client_wait. One-shot anonymize using agent config (includes scenario)...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-redact-agent-run.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"redact_agent_id":{"type":"string","description":"Redact Agent ID from po_documents_processing_agents_list (kind pdf_redact)"},"pofid":{"type":"string","description":"Existing PDF in DMS (Alternative to upload_id/file_url)"},"upload_id":{"type":"string","description":"From po_documents_upload_url_get after curl upload"},"file_url":{"type":"string","description":"Public HTTPS URL to PDF"},"file_name":{"type":"string","description":"Filename hint when using upload_id or file_url"},"workspace_id":{"type":"integer","description":"Target workspace when uploading a new PDF"},"workspace_name":{"type":"string","description":"Auto-create workspace by name when uploading"},"client_wait":{"type":"boolean","description":"Wait server-side for pipeline completion","default":false},"wait_timeout_sec":{"type":"integer","default":300},"poll_interval_sec":{"type":"integer","default":5}},"required":["redact_agent_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"redact_agent_id":{"type":"string","description":"Redact Agent ID from po_documents_processing_agents_list (kind pdf_redact)"},"pofid":{"type":"string","description":"Existing PDF in DMS (Alternative to upload_id/file_url)"},"upload_id":{"type":"string","description":"From po_documents_upload_url_get after curl upload"},"file_url":{"type":"string","description":"Public HTTPS URL to PDF"},"file_name":{"type":"string","description":"Filename hint when using upload_id or file_url"},"workspace_id":{"type":"integer","description":"Target workspace when uploading a new PDF"},"workspace_name":{"type":"string","description":"Auto-create workspace by name when uploading"},"client_wait":{"type":"boolean","description":"Wait server-side for pipeline completion","default":false},"wait_timeout_sec":{"type":"integer","default":300},"poll_interval_sec":{"type":"integer","default":5}},"required":["redact_agent_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/section-text-get":{"get":{"operationId":"po-documents-section-text-get","summary":"Read one document section (outline node or page range)","tags":["Document AI — DMS"],"description":"Read the text of one outline section or page range of ONE document. Pass node_id from po_documents_structure_get, or start_page and end_page. At most 12 pages, each page capped; an end_page beyond the last page is clamped...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-section-text-get.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID. Numeric documents_id is also accepted."},{"name":"node_id","in":"query","required":false,"schema":{"type":"string"},"description":"6-digit node id from structure-get."},{"name":"start_page","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"First page (1 or greater) when node_id is omitted; requires end_page."},{"name":"end_page","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Last page (1 or greater) when node_id is omitted; clamped to the last page of the document."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"pofid":{"type":"string"},"node_id":{"type":"string"},"title":{"type":"string"},"start_page":{"type":"integer"},"end_page":{"type":"integer"},"range_truncated":{"type":"boolean"},"pages":{"type":"array","items":{}},"total_pages":{"type":"integer"},"range_clamped":{"type":"boolean","description":"true when end_page was reduced to the last page of the document"}},"required":["status","pofid","pages"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/split-agent-run":{"post":{"operationId":"po-documents-split-agent-run","summary":"Run Split Agent on document","tags":["Document AI — DMS"],"description":"Run a Split Agent: provide split_agent_id plus pofid, upload_id, or file_url. Optional client_wait waits for split_imported_documents. Poll po_documents_get (processing_state) until done.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-split-agent-run.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"split_agent_id":{"type":"string","description":"Split Agent ID from po_documents_processing_agents_list (kind pdf_split)"},"pofid":{"type":"string","description":"Existing PDF in DMS (Alternative to upload_id/file_url)"},"upload_id":{"type":"string","description":"From po_documents_upload_url_get after curl upload"},"file_url":{"type":"string","description":"Public HTTPS URL to PDF"},"file_name":{"type":"string","description":"Filename hint when using upload_id or file_url"},"workspace_id":{"type":"integer","description":"Target workspace when uploading a new PDF"},"workspace_name":{"type":"string","description":"Auto-create workspace by name when uploading"},"client_wait":{"type":"boolean","description":"Wait server-side for pipeline completion","default":false},"wait_timeout_sec":{"type":"integer","description":"With client_wait=true: maximum wait in seconds (10–600, default 300). On timeout the response has status timeout and the pipeline keeps running.","default":300},"poll_interval_sec":{"type":"integer","description":"With client_wait=true: polling interval in seconds (2–30, default 5).","default":5}},"required":["split_agent_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"split_agent_id":{"type":"string","description":"Split Agent ID from po_documents_processing_agents_list (kind pdf_split)"},"pofid":{"type":"string","description":"Existing PDF in DMS (Alternative to upload_id/file_url)"},"upload_id":{"type":"string","description":"From po_documents_upload_url_get after curl upload"},"file_url":{"type":"string","description":"Public HTTPS URL to PDF"},"file_name":{"type":"string","description":"Filename hint when using upload_id or file_url"},"workspace_id":{"type":"integer","description":"Target workspace when uploading a new PDF"},"workspace_name":{"type":"string","description":"Auto-create workspace by name when uploading"},"client_wait":{"type":"boolean","description":"Wait server-side for pipeline completion","default":false},"wait_timeout_sec":{"type":"integer","description":"With client_wait=true: maximum wait in seconds (10–600, default 300). On timeout the response has status timeout and the pipeline keeps running.","default":300},"poll_interval_sec":{"type":"integer","description":"With client_wait=true: polling interval in seconds (2–30, default 5).","default":5}},"required":["split_agent_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/split-audit-trail":{"get":{"operationId":"po-documents-split-audit-trail-get","summary":"Document: PDF split audit trail","tags":["Document AI — DMS"],"description":"Get the audit trail of an Ultra PDF split run (po_documents_ai_split with tier ultra). Pass job_id of the split run or pofid of a document the split created. Read-only. Audit trails are stored for split runs with tier ultra only.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-split-audit-trail-get.md"},"parameters":[{"name":"job_id","in":"query","required":false,"schema":{"type":"string"},"description":"Job ID of the PDF split run (poai-job_…), from po_documents_ai_split with tier ultra"},{"name":"pofid","in":"query","required":false,"schema":{"type":"string"},"description":"PaperOffice File ID of a document created by the split (instead of job_id)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Audit trail of an Ultra PDF split run: pages with role and note, boundaries with confidence and reasons, corrections and resulting parts","properties":{"status":{"type":"string","enum":["ok","success","error"]},"job_id":{"type":"string","description":"Job ID of the split run"},"message":{"type":"string","description":"Error message when status=error"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/stats":{"get":{"operationId":"po-documents-stats-get","summary":"Get DMS statistics","tags":["Document AI — DMS"],"description":"po_documents_stats_get: Get global DMS statistics — total documents, entities, embeddings, breakdown by document type, total amounts. Optionally filtered by workspace. Keywords: statistics, stats, overview, count, total.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-stats-get.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Statistics for a specific workspace only"}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"data":{"type":"object","properties":{"total_documents":{"type":"integer"},"stock_document_count":{"type":"integer"},"stock_count_basis":{"type":"string"},"authoritative_document_count":{"type":"integer"},"total_embeddings":{"type":"integer"},"total_entities":{"type":"integer"},"by_document_type":{"type":"array","items":{"type":"object","properties":{"document_type":{"type":"string"},"count":{"type":"integer"}}}},"type_source":{"type":"string"},"canonical_map":{"type":"string"},"metric_definitions":{"type":"object","properties":{"by_document_type":{"type":"string"},"unclassified":{"type":"string"},"stock_document_count":{"type":"string"}}},"aggregation_scope":{"type":"string"},"by_document_type_sum":{"type":"integer"},"by_type_sum_matches_total":{"type":"boolean"},"count_reconciles_with_total":{"type":"boolean"},"best_effort_amount_observed":{"type":"integer"},"best_effort_amount_observed_note":{"type":"string"},"total_amount":{"type":"integer"},"total_amount_scope":{"type":"string"},"financial_scope":{"type":"string"}}},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/structure-get":{"get":{"operationId":"po-documents-structure-get","summary":"Document outline (headings and page ranges)","tags":["Document AI — DMS"],"description":"Read the outline of ONE document: headings with page ranges, no full text. Use first on long documents, then po_documents_section_text_get with node_id. depth 1-4 (default 2). Optional node_id returns that subtree. Optional pages (comma...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-structure-get.md"},"parameters":[{"name":"pofid","in":"query","required":true,"schema":{"type":"string"},"description":"PaperOffice File ID. Numeric documents_id is also accepted."},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","default":2,"minimum":1,"maximum":4},"description":"How many outline levels to return."},{"name":"node_id","in":"query","required":false,"schema":{"type":"string"},"description":"6-digit node id. Returns that node and its subtree."},{"name":"pages","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated page numbers to map onto the outline (at most 20; invalid entries are listed in pages_ignored)."},{"name":"build","in":"query","required":false,"schema":{"type":"string","enum":["0","1"],"default":"1"},"description":"1 builds the outline on first read when it is missing. 0 only returns an existing outline."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"pofid":{"type":"string"},"built":{"type":"boolean"},"mode":{"type":"string","description":"headings, page_groups, headings_capped or empty"},"node_count":{"type":"integer"},"truncated":{"type":"boolean"},"outline":{"type":"array","items":{}},"page_nodes":{"type":"array","items":{}},"total_pages":{"type":"integer"},"built_at":{"type":"string","description":"UTC time the cached outline was built (ISO 8601)"},"pages_truncated":{"type":"boolean","description":"true when more than 20 pages were requested"},"pages_ignored":{"type":"array","description":"pages entries that were not mapped (not a number, below 1 or beyond the last page)","items":{"type":"string"}}},"required":["status","pofid","built","outline"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/suggest-llm-model":{"post":{"operationId":"po-document-analysis-suggest-llm-model","summary":"Suggest AI Model","tags":["Document AI — DMS"],"description":"Analyze a document and recommend the optimal processing profile for downstream Document AI / IDP jobs.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-document-analysis-suggest-llm-model.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"LLM tier for field suggestions: basic, premium, or ultra (default premium).","default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"suggest_paperoffice_llm_model"},"prompt":{"type":"string","description":"Natural-language description of fields to extract (guides model selection).","default":"I want to extract invoice number, date, vendor name, and total amount"},"priority":{"type":"integer","description":"LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product.","minimum":0,"maximum":900,"deprecated":true},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","prompt","file_1"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"LLM tier for field suggestions: basic, premium, or ultra (default premium).","default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"suggest_paperoffice_llm_model"},"prompt":{"type":"string","description":"Natural-language description of fields to extract (guides model selection).","default":"I want to extract invoice number, date, vendor name, and total amount"},"priority":{"type":"integer","description":"LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product.","minimum":0,"maximum":900,"deprecated":true},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","prompt","file_1"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"LLM-Modell-Vorschlag basierend auf Dokument","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"suggested_model":{"type":"string","description":"Empfohlenes LLM-Modell"},"reason":{"type":"string"},"alternatives":{"type":"array","items":{"type":"string"}}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/tag-autocomplete":{"get":{"operationId":"po-documents-tags-autocomplete","summary":"Tag Autocomplete","tags":["Document AI — DMS"],"description":"Autocomplete tag names used in the account or workspace. Useful for consistent tagging in upload and edit flows.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-tags-autocomplete.md"},"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Search term (mind. 1 characters)"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Optional: Auf Workspace einschraenken"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Max. results (default: 20, max: 50)"}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"processing_time":{"type":"string"},"status":{"type":"string"},"suggestions":{"type":"array","items":{}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/trash-empty":{"post":{"operationId":"po-documents-trash-empty","summary":"Empty document trash","tags":["Document AI — DMS"],"description":"Permanently empty the document trash for the account or workspace. Irreversible — held or legal-hold documents are skipped.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trash-empty.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Optional: Only Trash a Workspaces leeren"},"confirm":{"type":"boolean","description":"Must be true — destructive action (MCP ≡ API confirm gate)."},"confirm_count":{"type":"string","description":"Target confirmation (R20260916): must equal the exact number of documents currently in the trash. Replaces the former browser-only restriction — required for every non-UI caller."}},"required":["confirm"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Optional: Only Trash a Workspaces leeren"},"confirm":{"type":"boolean","description":"Must be true — destructive action (MCP ≡ API confirm gate)."},"confirm_count":{"type":"string","description":"Target confirmation (R20260916): must equal the exact number of documents currently in the trash. Replaces the former browser-only restriction — required for every non-UI caller."}},"required":["confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/trash-list":{"post":{"operationId":"po-documents-trash-list","summary":"List Deleted Documents (Trash)","tags":["Document AI — DMS"],"description":"Displays all soft-deleted documents in the trash. Paginated with days_remaining and is_restorable. Optionally filterable by workspace.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trash-list.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Optional: Filter by workspace"},"page":{"type":"integer","description":"Page number (default: 1)","default":1},"pro_page":{"type":"integer","description":"Items per page (10-200, default: 50)","default":50},"per_page":{"type":"integer","description":"Items per page (10-200, default: 50). Alias of pro_page.","default":50}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Optional: Filter by workspace"},"page":{"type":"integer","description":"Page number (default: 1)","default":1},"pro_page":{"type":"integer","description":"Items per page (10-200, default: 50)","default":50},"per_page":{"type":"integer","description":"Items per page (10-200, default: 50). Alias of pro_page.","default":50}}}}}},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"page":{"type":"integer"},"pages":{"type":"integer"},"per_page":{"type":"integer"},"processing_time":{"type":"string"},"retention_days":{"type":"integer"},"status":{"type":"string"},"total":{"type":"integer"},"total_size_bytes":{"type":"integer"},"total_size_human":{"type":"string"},"trash_items":{"type":"array","items":{}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/trash-settings":{"get":{"operationId":"po-documents-trash-settings","summary":"Get trash settings","tags":["Document AI — DMS"],"description":"Update or read the account-wide trash retention setting.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trash-settings.md"},"parameters":[{"name":"retention_days","in":"query","required":false,"schema":{"type":"integer"},"description":"Optional: set retention period in days before permanent deletion."}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"_capabilities":{"type":"object","properties":{"workspace_tier":{"type":"string"},"trash_enabled":{"type":"boolean"},"soft_delete_supported":{"type":"boolean"},"delete_mode_effective_default":{"type":"string"},"retention_at_document_type":{"type":"boolean"},"worm_at_document_level":{"type":"boolean"},"compliance_pdf_watermark":{"type":"boolean"},"audit_trail_readable":{"type":"boolean"},"audit_trail_source":{"type":"string"},"audit_trail_scope":{"type":"string"},"revision_trail_requires_document_worm":{"type":"boolean"},"headless_gobd_recommended_tier":{"type":"string"}}},"_tier_summary":{"type":"string"},"delete_mode_effective_default":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"trash_enabled":{"type":"boolean"},"trash_retention_days":{"type":"integer"},"workspace_tier_effective":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/trust-agent-run":{"post":{"operationId":"po-documents-trust-agent-run","summary":"Run Trust Agent on document","tags":["Document AI — DMS"],"description":"WRITE: start a Trust scan with a saved agent (credits). Prefer po_documents_trust_check for adhoc profile+tier. To READ a stored certificate use po_documents_trust_get.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trust-agent-run.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"trust_agent_id":{"type":"string","description":"Trust Agent ID from po_documents_processing_agents_list (kind pdf_trust)"},"pofid":{"type":"string","description":"POFID of a document already stored in PaperOffice. Provide exactly one source: pofid, upload_id, file_url, file_base64 or a multipart file."},"upload_id":{"type":"string","description":"ID of a prior chunked upload to process instead of pofid or a file."},"file_url":{"type":"string","description":"Public HTTPS URL of a file to download and upload before running the agent (aliases: source_url, document_url)."},"file_name":{"type":"string","description":"File name for the uploaded document (default: the uploaded file name, otherwise document.pdf)."},"workspace_id":{"type":"integer","description":"Target workspace for a new upload. Required for file uploads unless workspace_name is given; ignored for an existing pofid."},"client_wait":{"type":"boolean","description":"true: keep the request open and poll until the pipeline finishes or wait_timeout_sec elapses. false (default): return HTTP 202 with status queued immediately.","default":false},"wait_timeout_sec":{"type":"integer","description":"With client_wait=true: maximum wait in seconds (10–600, default 300). On timeout the response has status timeout and the pipeline keeps running.","default":300},"poll_interval_sec":{"type":"integer","description":"With client_wait=true: polling interval in seconds (2–30, default 5).","default":5}},"required":["trust_agent_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"trust_agent_id":{"type":"string","description":"Trust Agent ID from po_documents_processing_agents_list (kind pdf_trust)"},"pofid":{"type":"string","description":"POFID of a document already stored in PaperOffice. Provide exactly one source: pofid, upload_id, file_url, file_base64 or a multipart file."},"upload_id":{"type":"string","description":"ID of a prior chunked upload to process instead of pofid or a file."},"file_url":{"type":"string","description":"Public HTTPS URL of a file to download and upload before running the agent (aliases: source_url, document_url)."},"file_name":{"type":"string","description":"File name for the uploaded document (default: the uploaded file name, otherwise document.pdf)."},"workspace_id":{"type":"integer","description":"Target workspace for a new upload. Required for file uploads unless workspace_name is given; ignored for an existing pofid."},"client_wait":{"type":"boolean","description":"true: keep the request open and poll until the pipeline finishes or wait_timeout_sec elapses. false (default): return HTTP 202 with status queued immediately.","default":false},"wait_timeout_sec":{"type":"integer","description":"With client_wait=true: maximum wait in seconds (10–600, default 300). On timeout the response has status timeout and the pipeline keeps running.","default":300},"poll_interval_sec":{"type":"integer","description":"With client_wait=true: polling interval in seconds (2–30, default 5).","default":5}},"required":["trust_agent_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/workspace-classical-idp-readiness":{"post":{"operationId":"po-documents-workspace-classical-idp-readiness","summary":"Workspace: Classical IDP readiness","tags":["Document AI — DMS"],"description":"Evaluate classical IDP workflow readiness for a workspace. Pass workspace_id. Optional preview: ai_dms_mode, default_document_type_mode, workspace_tier, workspace_idp_agent_pipeline.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-workspace-classical-idp-readiness.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Workspace ID (required)."},"ai_dms_mode":{"type":"string","description":"Optional unsaved preview of AI-DMS mode."},"default_document_type_mode":{"type":"string","description":"Optional preview: none|auto|fixed."},"workspace_tier":{"type":"string","description":"Optional preview tier (standard|business|compliance)."},"workspace_idp_agent_pipeline":{"type":"array","description":"Optional preview of workspace IDP pipeline entries.","items":{}}},"required":["workspace_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Workspace ID (required)."},"ai_dms_mode":{"type":"string","description":"Optional unsaved preview of AI-DMS mode."},"default_document_type_mode":{"type":"string","description":"Optional preview: none|auto|fixed."},"workspace_tier":{"type":"string","description":"Optional preview tier (standard|business|compliance)."},"workspace_idp_agent_pipeline":{"type":"array","description":"Optional preview of workspace IDP pipeline entries.","items":{}}},"required":["workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/workspace-storage-health":{"post":{"operationId":"po-workspaces-validate-storage","summary":"Validate Workspace Storage Health","tags":["Document AI — DMS"],"description":"Check storage connectivity and health for a workspace — cloud mode, BYOS (Bring Your Own Storage) mount status, latency, offline detection, and auto-lock reasons.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-validate-storage.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Workspace ID to check"}},"required":["workspace_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Workspace ID to check"}},"required":["workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Storage-Validierung","properties":{"processing_time":{"type":"string","description":"Processing duration in milliseconds"},"status":{"type":"string","description":"Request status (ok/error)"},"storage_status":{"type":"object","description":"Speicher-Status","properties":{"mode":{"type":"string","description":"Betriebsmodus"},"is_offline":{"type":"boolean","description":"Is offline"}}},"mode":{"type":"string","description":"Mode"},"documents":{"type":"string","description":"Documents"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/workspaces-create":{"post":{"operationId":"po-workspaces-create","summary":"Create workspace","tags":["Document AI — DMS"],"description":"Create a new workspace to organize documents by client, project, or topic. Optional fields include security tier (standard, business, compliance; legacy alias confidential → business) and AI-DMS settings. After creation, use List...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Workspace name (required, must not be empty)."},"description":{"type":"string","description":"Description of the workspace."},"type":{"type":"string","description":"Business workspace type slug (required). Examples: `ablage`, `abinvoice`, `department`, `agentur`, `akte`, `quote`, `Archive`, `order`, `ausschreibung`, `bauprojekt` — 107 types total (use the workspace type picker in the app or MCP workspace tools; invalid values return `allowed_types_hint`)."},"workspace_tier":{"type":"string","description":"Security tier: `standard` (no recycle bin), `business` (recycle bin + sharing), `compliance` (business + compliance watermark). Default when omitted: business. Legacy alias: `confidential` is accepted and normalized to `business`.","enum":["standard","business","compliance"],"default":"business"},"is_revision_secure":{"type":"boolean","description":"Enable revision-safe mode (WORM protection). Once activated, cannot be disabled. Requires PaperOffice EU Cloud.","default":false},"retention_years":{"type":"integer","description":"Retention period in years (default: 10 years, GoBD-compliant).","default":10,"minimum":1,"maximum":99},"ai_dms_mode":{"type":"string","description":"AI-DMS processing mode for the workspace. Allowed: disabled, basic, premium, ultra. Default when omitted: premium — AI-DMS is then active and new documents are processed and billed per page. basic|premium|ultra are billed per page at that tier; disabled = no AI-DMS processing. Change later via documents/workspaces-update. The response returns ai_dms_mode, ai_dms_mode_source (default|request) and ai_dms_notice.","enum":["disabled","basic","premium","ultra"],"default":"premium"},"storage_mode":{"type":"string","description":"Storage mode: 'cloud' (PaperOffice EU Cloud) or 'byos' (Bring Your Own Storage). After creation, not deletable.","enum":["cloud","byos"],"default":"cloud"},"storage_mount_id":{"type":"integer","description":"Identify the Storage Mounts for BYOS Mode."},"storage_mount_path":{"type":"string","description":"Path on the Storage Mount for BYOS mode."},"default_locale":{"type":"string","description":"Default language/region in the Format 'de:DE', 'en:US' etc.","pattern":"^[a-z]{2}:[A-Z]{2}$"},"image":{"type":"string","description":"Image URL for the workspace."},"priority":{"type":"integer","description":"LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product. For workspaces: legacy plan-gated weight 100–999 — not Start-SLA; use default_processing_lane.","default":500,"minimum":0,"maximum":900,"deprecated":true},"is_default":{"type":"boolean","description":"Mark as standard workspace."},"is_stealth":{"type":"boolean","description":"Workspace im Stealth-Modus (versteckt)."},"is_archived":{"type":"boolean","description":"Archive workspace."},"workspace_password":{"type":"string","description":"Password for the workspace access."},"color":{"type":"string","description":"Color code the workspace."},"icon":{"type":"string","description":"Icon the workspace."},"tags":{"type":"array","description":"Tags for the workspace.","items":{"type":"string"}},"contact_salutation":{"type":"string","description":"Salutation Ansprechpartners."},"contact_firstname":{"type":"string","description":"First name of the contact person."},"contact_lastname":{"type":"string","description":"Last name of the contact person."},"contact_email":{"type":"string","description":"E-Mail the Ansprechpartners."},"contact_phone":{"type":"string","description":"Telefon the Ansprechpartners."},"company_name":{"type":"string","description":"Firmenname."},"address_street":{"type":"string","description":"Street address."},"address_zip":{"type":"string","description":"Postal code."},"address_city":{"type":"string","description":"City."},"address_country":{"type":"string","description":"Country code (ISO 3166-1 alpha-2)."},"metadata":{"type":"object","description":"Additional metadata as JSON object."},"default_processing_lane":{"type":"string","description":"Workspace default Start-SLA. Used when Auto AI-DMS omits processing_lane. Alias: processing_lane.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"}},"required":["name","type"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Create a new workspace","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"id":{"type":"integer","description":"ID of the newly created workspace"},"workspace_tier":{"type":"string","description":"Workspace security level","enum":["standard","confidential","compliance"]},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/workspaces-delete":{"post":{"operationId":"po-workspaces-delete","summary":"Delete workspace","tags":["Document AI — DMS"],"description":"Delete a workspace and its configuration. Documents must be moved or deleted according to workspace policy before deletion succeeds.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-delete.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the workspace to delete."},"confirm_delete":{"type":"boolean","description":"Must be true — destructive action (MCP = API confirm gate). Alias: confirm. Both spellings are accepted; send either one."},"confirm":{"type":"boolean","description":"Alias of confirm_delete (R260917). The sister endpoints trash-empty and document-legal-hold-release use this spelling; both are accepted here as well."},"confirm_name":{"type":"string","description":"Target confirmation (R20260916): must equal the exact workspace name as returned by workspaces-list. Replaces the former browser-only restriction — required for every non-UI caller."}},"required":["id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"ID of the workspace to delete."},"confirm_delete":{"type":"boolean","description":"Must be true — destructive action (MCP = API confirm gate). Alias: confirm. Both spellings are accepted; send either one."},"confirm":{"type":"boolean","description":"Alias of confirm_delete (R260917). The sister endpoints trash-empty and document-legal-hold-release use this spelling; both are accepted here as well."},"confirm_name":{"type":"string","description":"Target confirmation (R20260916): must equal the exact workspace name as returned by workspaces-list. Replaces the former browser-only restriction — required for every non-UI caller."}},"required":["id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"documents_queued":{"type":"integer"},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/workspaces-list":{"get":{"operationId":"po-workspaces-list","summary":"List workspaces","tags":["Document AI — DMS"],"description":"po_workspaces_list: List workspaces accessible to the current token. Returns workspace ID, name, workspace_tier, _capabilities (trash/recycle-bin, retention), document count and storage size. standard tier: no recycle bin; business...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-list.md"},"parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Response language: de_DE, en_US, es_ES, fr_FR, it_IT, pt_PT"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"List workspaces","properties":{"_aggregate":{"type":"object","properties":{"total_workspaces":{"type":"integer"},"total_docs":{"type":"integer"},"total_analyzed":{"type":"integer"},"total_unanalyzed":{"type":"integer"},"analyzed_pct":{"type":"integer"},"unanalyzed_pct":{"type":"integer"}}},"count":{"type":"integer"},"processing_time":{"type":"string"},"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"is_default":{"type":"integer"},"is_stealth":{"type":"integer"},"is_archived":{"type":"integer"},"image":{"type":"string"},"data_contact":{"type":"string"},"data_address":{"type":"string"},"data_settings":{"type":"string"},"metadata":{"type":"string"},"ai_dms_mode":{"type":"string"},"storage_mount_id":{"type":"string"},"storage_mount_path":{"type":"string"},"storage_mode":{"type":"string"},"auto_locked":{"type":"integer"},"auto_locked_reason":{"type":"string"},"default_locale":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"workspace_tier":{"type":"string"},"ai_dms_max_pages":{"type":"string"},"ai_dms_max_pages_basic":{"type":"string"},"ai_dms_max_pages_premium":{"type":"string"},"ai_dms_max_pages_ultra":{"type":"string"},"default_document_type_id":{"type":"string"},"is_compliance_vault":{"type":"integer"},"vault_retention_years":{"type":"string"},"vault_retention_mode":{"type":"string"},"vault_retention_legal_basis":{"type":"string"},"crm_contact_id":{"type":"string"},"container_delete_at":{"type":"string"},"default_processing_lane":{"type":"string"},"contact_firstname":{"type":"string"},"contact_lastname":{"type":"string"},"contact_email":{"type":"string"},"contact_phone":{"type":"string"},"address_street":{"type":"string"},"address_zip":{"type":"string"},"address_city":{"type":"string"},"address_country":{"type":"string"},"tier":{"type":"string"},"security_tier":{"type":"string"},"_capabilities":{"type":"object","properties":{"workspace_tier":{"type":"string"},"trash_enabled":{"type":"boolean"},"soft_delete_supported":{"type":"boolean"},"delete_mode_effective_default":{"type":"string"},"retention_at_document_type":{"type":"boolean"},"worm_at_document_level":{"type":"boolean"},"compliance_pdf_watermark":{"type":"boolean"},"audit_trail_readable":{"type":"boolean"},"audit_trail_source":{"type":"string"},"audit_trail_scope":{"type":"string"},"revision_trail_requires_document_worm":{"type":"boolean"},"headless_gobd_recommended_tier":{"type":"string"}}},"_tier_summary":{"type":"string"},"default_document_type_mode":{"type":"string"},"reference":{"type":"string"},"external_id":{"type":"string"},"cost_center":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"},"tags":{"type":"array","items":{}},"password_enabled":{"type":"boolean"},"sms_enabled":{"type":"boolean"},"sms_phone":{"type":"string"},"dual_auth_enabled":{"type":"boolean"},"dual_auth_phone_1":{"type":"string"},"dual_auth_phone_2":{"type":"string"},"session_max_duration":{"type":"integer"},"session_inactivity_timeout":{"type":"integer"},"contact_salutation":{"type":"string"},"contact_position":{"type":"string"},"contact_department":{"type":"string"},"contact_mobile":{"type":"string"},"contact_notes":{"type":"string"},"company_name":{"type":"string"},"company_vatid":{"type":"string"},"company_taxnr":{"type":"string"},"crm_account_id":{"type":"string"},"contact_mode":{"type":"string"},"crm_contact_ids":{"type":"array","items":{}},"crm_contact_links":{"type":"array","items":{}},"address_extra":{"type":"string"},"address_line3":{"type":"string"},"address_region":{"type":"string"},"address_country_code":{"type":"string"},"stats":{"type":"object","properties":{"doc_count":{"type":"integer"},"analyzed_count":{"type":"integer"},"unanalyzed_count":{"type":"integer"},"storage_only_count":{"type":"integer"},"ai_dms_basic_count":{"type":"integer"},"ai_dms_premium_count":{"type":"integer"},"ai_dms_ultra_count":{"type":"integer"},"intelligence_score":{"type":"integer"},"intelligence_level":{"type":"string"},"analyzed_pct":{"type":"integer"},"unanalyzed_pct":{"type":"integer"},"total_pages":{"type":"integer"},"storage_only_pages":{"type":"integer"},"unanalyzed_pages":{"type":"integer"},"storage_size_bytes":{"type":"integer"},"storage_size":{"type":"string"},"retention_active_count":{"type":"integer"},"retention_compliance_count":{"type":"integer"},"retention_latest_until":{"type":"string"},"retention_delete_block_count":{"type":"integer"},"legal_hold_active_count":{"type":"integer"},"legal_hold_live_count":{"type":"integer"},"audit_quarantine_count":{"type":"integer"},"protection_check_failed":{"type":"boolean"}}},"retention_active_count":{"type":"integer"},"retention_compliance_count":{"type":"integer"},"retention_latest_until":{"type":"string"},"retention_delete_block_count":{"type":"integer"},"legal_hold_active_count":{"type":"integer"},"legal_hold_live_count":{"type":"integer"},"is_revision_secure":{"type":"boolean"},"revision_proof_locked":{"type":"boolean"},"document_count":{"type":"integer"},"audit_quarantine_count":{"type":"integer"},"protection_check_failed":{"type":"boolean"},"documents_count":{"type":"integer"},"analyzed_count":{"type":"integer"},"unanalyzed_count":{"type":"integer"},"storage_only_count":{"type":"integer"},"ai_dms_basic_count":{"type":"integer"},"ai_dms_premium_count":{"type":"integer"},"ai_dms_ultra_count":{"type":"integer"},"total_pages":{"type":"integer"},"storage_only_pages":{"type":"integer"},"unanalyzed_pages":{"type":"integer"},"intelligence_score":{"type":"integer"},"intelligence_level":{"type":"string"},"analyzed_pct":{"type":"integer"},"unanalyzed_pct":{"type":"integer"},"processing_lane":{"type":"string"},"has_workspace_password":{"type":"boolean"}}}},"status":{"type":"string"},"total_count":{"type":"integer"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"is_default":{"type":"integer"},"is_stealth":{"type":"integer"},"is_archived":{"type":"integer"},"image":{"type":"string"},"data_contact":{"type":"string"},"data_address":{"type":"string"},"data_settings":{"type":"string"},"metadata":{"type":"string"},"ai_dms_mode":{"type":"string"},"storage_mount_id":{"type":"string"},"storage_mount_path":{"type":"string"},"storage_mode":{"type":"string"},"auto_locked":{"type":"integer"},"auto_locked_reason":{"type":"string"},"default_locale":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"workspace_tier":{"type":"string"},"ai_dms_max_pages":{"type":"string"},"ai_dms_max_pages_basic":{"type":"string"},"ai_dms_max_pages_premium":{"type":"string"},"ai_dms_max_pages_ultra":{"type":"string"},"default_document_type_id":{"type":"string"},"is_compliance_vault":{"type":"integer"},"vault_retention_years":{"type":"string"},"vault_retention_mode":{"type":"string"},"vault_retention_legal_basis":{"type":"string"},"crm_contact_id":{"type":"string"},"container_delete_at":{"type":"string"},"default_processing_lane":{"type":"string"},"contact_firstname":{"type":"string"},"contact_lastname":{"type":"string"},"contact_email":{"type":"string"},"contact_phone":{"type":"string"},"address_street":{"type":"string"},"address_zip":{"type":"string"},"address_city":{"type":"string"},"address_country":{"type":"string"},"tier":{"type":"string"},"security_tier":{"type":"string"},"_capabilities":{"type":"object","properties":{"workspace_tier":{"type":"string"},"trash_enabled":{"type":"boolean"},"soft_delete_supported":{"type":"boolean"},"delete_mode_effective_default":{"type":"string"},"retention_at_document_type":{"type":"boolean"},"worm_at_document_level":{"type":"boolean"},"compliance_pdf_watermark":{"type":"boolean"},"audit_trail_readable":{"type":"boolean"},"audit_trail_source":{"type":"string"},"audit_trail_scope":{"type":"string"},"revision_trail_requires_document_worm":{"type":"boolean"},"headless_gobd_recommended_tier":{"type":"string"}}},"_tier_summary":{"type":"string"},"default_document_type_mode":{"type":"string"},"reference":{"type":"string"},"external_id":{"type":"string"},"cost_center":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"},"tags":{"type":"array","items":{}},"password_enabled":{"type":"boolean"},"sms_enabled":{"type":"boolean"},"sms_phone":{"type":"string"},"dual_auth_enabled":{"type":"boolean"},"dual_auth_phone_1":{"type":"string"},"dual_auth_phone_2":{"type":"string"},"session_max_duration":{"type":"integer"},"session_inactivity_timeout":{"type":"integer"},"contact_salutation":{"type":"string"},"contact_position":{"type":"string"},"contact_department":{"type":"string"},"contact_mobile":{"type":"string"},"contact_notes":{"type":"string"},"company_name":{"type":"string"},"company_vatid":{"type":"string"},"company_taxnr":{"type":"string"},"crm_account_id":{"type":"string"},"contact_mode":{"type":"string"},"crm_contact_ids":{"type":"array","items":{}},"crm_contact_links":{"type":"array","items":{}},"address_extra":{"type":"string"},"address_line3":{"type":"string"},"address_region":{"type":"string"},"address_country_code":{"type":"string"},"stats":{"type":"object","properties":{"doc_count":{"type":"integer"},"analyzed_count":{"type":"integer"},"unanalyzed_count":{"type":"integer"},"storage_only_count":{"type":"integer"},"ai_dms_basic_count":{"type":"integer"},"ai_dms_premium_count":{"type":"integer"},"ai_dms_ultra_count":{"type":"integer"},"intelligence_score":{"type":"integer"},"intelligence_level":{"type":"string"},"analyzed_pct":{"type":"integer"},"unanalyzed_pct":{"type":"integer"},"total_pages":{"type":"integer"},"storage_only_pages":{"type":"integer"},"unanalyzed_pages":{"type":"integer"},"storage_size_bytes":{"type":"integer"},"storage_size":{"type":"string"},"retention_active_count":{"type":"integer"},"retention_compliance_count":{"type":"integer"},"retention_latest_until":{"type":"string"},"retention_delete_block_count":{"type":"integer"},"legal_hold_active_count":{"type":"integer"},"legal_hold_live_count":{"type":"integer"},"audit_quarantine_count":{"type":"integer"},"protection_check_failed":{"type":"boolean"}}},"retention_active_count":{"type":"integer"},"retention_compliance_count":{"type":"integer"},"retention_latest_until":{"type":"string"},"retention_delete_block_count":{"type":"integer"},"legal_hold_active_count":{"type":"integer"},"legal_hold_live_count":{"type":"integer"},"is_revision_secure":{"type":"boolean"},"revision_proof_locked":{"type":"boolean"},"document_count":{"type":"integer"},"audit_quarantine_count":{"type":"integer"},"protection_check_failed":{"type":"boolean"},"documents_count":{"type":"integer"},"analyzed_count":{"type":"integer"},"unanalyzed_count":{"type":"integer"},"storage_only_count":{"type":"integer"},"ai_dms_basic_count":{"type":"integer"},"ai_dms_premium_count":{"type":"integer"},"ai_dms_ultra_count":{"type":"integer"},"total_pages":{"type":"integer"},"storage_only_pages":{"type":"integer"},"unanalyzed_pages":{"type":"integer"},"intelligence_score":{"type":"integer"},"intelligence_level":{"type":"string"},"analyzed_pct":{"type":"integer"},"unanalyzed_pct":{"type":"integer"},"processing_lane":{"type":"string"},"has_workspace_password":{"type":"boolean"}}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/documents/workspaces-update":{"post":{"operationId":"po-workspaces-update","summary":"Update workspace","tags":["Document AI — DMS"],"description":"po_workspaces_update: Update workspace fields (name, business type, tier, AI-DMS, IDP pipeline, access protection, contacts, storage, document-type preset). workspace_tier changes affect trash/recycle-bin behaviour for new deletes (see...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-update.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Workspace ID from workspaces-list (canonical)."},"name":{"type":"string","description":"New workspace name."},"description":{"type":"string","description":"New description."},"workspace_tier":{"type":"string","description":"Security tier (only Upgrade erlaubt, no Downgrade).","enum":["standard","confidential","compliance"]},"is_revision_secure":{"type":"boolean","description":"Enable revision-safe mode (one-time, irreversible)."},"retention_years":{"type":"integer","description":"Retention period in years. Increase allowed only for WORM only.","minimum":1,"maximum":99},"ai_dms_mode":{"type":"string","description":"AI-DMS processing mode for the workspace. When changed, existing documents may be reprocessed according to the new mode.","enum":["disabled","basic","premium","ultra"]},"default_locale":{"type":"string","description":"Default language/region.","pattern":"^[a-z]{2}:[A-Z]{2}$"},"workspace_password":{"type":"string","description":"New workspace password."},"status":{"type":"string","description":"Workspace-Status."},"type":{"type":"string","description":"Business workspace type (optional on update)."},"image":{"type":"string","description":"Image URL."},"priority":{"type":"integer","description":"LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product. For workspaces: legacy plan-gated weight 100–999 — not Start-SLA; use default_processing_lane.","minimum":0,"maximum":900,"deprecated":true},"is_default":{"type":"boolean","description":"Mark as standard."},"is_stealth":{"type":"boolean","description":"Stealth-Modus."},"is_archived":{"type":"boolean","description":"Archiviert."},"color":{"type":"string","description":"Color code."},"icon":{"type":"string","description":"Workspace icon key or emoji shown in the UI."},"tags":{"type":"array","description":"Comma-separated workspace tags for filtering.","items":{"type":"string"}},"contact_salutation":{"type":"string","description":"Contact salutation (e.g. Mr, Ms, Dr)."},"contact_firstname":{"type":"string","description":"Contact given name for workspace metadata."},"contact_lastname":{"type":"string","description":"Contact family name for workspace metadata."},"contact_email":{"type":"string","description":"Contact email address for workspace metadata."},"contact_phone":{"type":"string","description":"Contact phone number (E.164 recommended)."},"company_name":{"type":"string","description":"Company or organization name."},"address_street":{"type":"string","description":"Street address line."},"address_zip":{"type":"string","description":"Postal or ZIP code."},"address_city":{"type":"string","description":"City name."},"address_country":{"type":"string","description":"Country ISO 3166-1 alpha-2 code."},"metadata":{"type":"object","description":"Additional metadata"},"password_enabled":{"type":"boolean","description":"Enable or disable password protection."},"sms_enabled":{"type":"boolean","description":"SMS-Verifizierung enable."},"sms_phone":{"type":"string","description":"Phone number for SMS verification."},"dual_auth_enabled":{"type":"boolean","description":"2-persons-approval enable."},"dual_auth_phone_1":{"type":"string","description":"Phone number Person 1."},"dual_auth_phone_2":{"type":"string","description":"Phone number Person 2."},"workspace_id":{"type":"integer","description":"Alias for `id` (same numeric workspace ID)."},"default_processing_lane":{"type":"string","description":"Workspace default Start-SLA. Used when Auto AI-DMS omits processing_lane. Alias: processing_lane.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"],"default":"no_sla"}},"required":["id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Update workspace (settings, tier, AI-DMS)","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"workspace_tier":{"type":"string","description":"Security level after the update","enum":["standard","confidential","compliance"]},"ai_dms_backfill":{"type":"object","description":"AI-DMS backfill result (only on tier change)","properties":{"documents_queued":{"type":"integer","description":"Newly scheduled documents"},"documents_tier_updated":{"type":"integer","description":"Documents with a changed tier"},"ai_dms_tier":{"type":"string","description":"AI-DMS processing tier"},"source":{"type":"string","description":"Source","enum":["activation","tier_change"]}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/fakeemail/check":{"post":{"operationId":"po-email-detector-check-email","summary":"Check email","tags":["Security AI — Fake Email"],"description":"Check whether an email address is disposable or fake.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-email-detector-check-email.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to check for disposable/fake patterns.","format":"email"}},"required":["email"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to check for disposable/fake patterns.","format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Check email for fake or fraudulent senders","properties":{"processing_time":{"type":"string","description":"Processing time (format: 123.45ms)"},"is_fake":{"type":"boolean","description":"Is fake"},"score":{"type":"number","description":"Score"},"reason":{"type":"string","description":"Reason"},"domain_info":{"type":"object","description":"Domain info"},"status":{"type":"string","description":"Request status: \"success\" or \"error\"","enum":["success","error"]}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/fakeemail/check_bulk":{"post":{"operationId":"po-email-detector-bulk-check-emails","summary":"Check emails","tags":["Security AI — Fake Email"],"description":"Validate a batch of email addresses for deliverability and disposable-domain signals.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-email-detector-bulk-check-emails.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","description":"List of email addresses for verification (max. 100)","items":{"type":"string"}}},"required":["emails"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Bulk E-Mail-Check","properties":{"processing_time":{"type":"string","description":"Processing time (format: 123.45ms)"},"results":{"type":"array","description":"Ergebnis-Array","items":{"type":"object","properties":{"email":{"type":"string","description":"Email"},"is_fake":{"type":"boolean","description":"Is fake"},"score":{"type":"number","description":"Score"}}}},"total_checked":{"type":"number","description":"Total checked"},"status":{"type":"string","description":"Request status: \"success\" or \"error\"","enum":["success","error"]}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/fingerprint/device":{"post":{"operationId":"po-fingerprint-get-device-details","summary":"Get fingerprint device details","tags":["Security AI — Fingerprint"],"description":"Load detailed device attributes for a known fingerprint hash — platform, browser family, first/last seen timestamps, and linked session metadata (tenant-scoped).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-fingerprint-get-device-details.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Visitor device ID (32 characters). Aliases: visitor_id, visitorId"},"visitor_id":{"type":"string","description":"Alias for id (snake_case variant)"},"visitorId":{"type":"string","description":"camelCase alias for id (visitorId) for SDK compatibility"}},"anyOf":[{"required":["id"],"properties":{"id":{}}},{"required":["visitor_id"],"properties":{"visitor_id":{}}},{"required":["visitorId"],"properties":{"visitorId":{}}}]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Visitor device ID (32 characters). Aliases: visitor_id, visitorId"},"visitor_id":{"type":"string","description":"Alias for id (snake_case variant)"},"visitorId":{"type":"string","description":"camelCase alias for id (visitorId) for SDK compatibility"}},"anyOf":[{"required":["id"],"properties":{"id":{}}},{"required":["visitor_id"],"properties":{"visitor_id":{}}},{"required":["visitorId"],"properties":{"visitorId":{}}}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Geraetedetails","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"device_id":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"last_seen":{"type":"string","format":"date-time"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/fingerprint/identify":{"post":{"operationId":"po-fingerprint-identify-device-v2","summary":"Identify device (fingerprint)","tags":["Security AI — Fingerprint"],"description":"Identify a browser or app visitor from first-party signals (fingerprint hash). Returns a device profile for fraud prevention and session correlation within your tenant; it is stored only when a stable client visitorId (e.g. from the...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-fingerprint-identify-device-v2.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"components":{"type":"object","description":"Client-side fingerprint components from the JavaScript SDK (Canvas, WebGL, Audio, Fonts, Behavioral)"},"include":{"type":"string","description":"Comma-separated Enrichment Modules (e.g., anonywithy, currency) or core for minimal Response"},"language":{"type":"string","description":"Language code for enriched data (ISO 639-1)","default":"en"},"visitorId":{"type":"string","description":"Visitor-ID pre-calculated by the client"},"confidence":{"type":"number","description":"Client-seitig berechneter confidence-Score (0-100)","default":0},"botDetection":{"type":"object","description":"Client-seitige Bot-detectionsdaten with signals-Array"},"network_pool":{"type":"boolean","description":"Cross-tenant Network Intelligence pool (requires PaperOffice-approved add-on; default false = tenant-isolated)","default":false}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"components":{"type":"object","description":"Client-side fingerprint components from the JavaScript SDK (Canvas, WebGL, Audio, Fonts, Behavioral)"},"include":{"type":"string","description":"Comma-separated Enrichment Modules (e.g., anonywithy, currency) or core for minimal Response"},"language":{"type":"string","description":"Language code for enriched data (ISO 639-1)","default":"en"},"visitorId":{"type":"string","description":"Visitor-ID pre-calculated by the client"},"confidence":{"type":"number","description":"Client-seitig berechneter confidence-Score (0-100)","default":0},"botDetection":{"type":"object","description":"Client-seitige Bot-detectionsdaten with signals-Array"},"network_pool":{"type":"boolean","description":"Cross-tenant Network Intelligence pool (requires PaperOffice-approved add-on; default false = tenant-isolated)","default":false}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Geraet identifizieren","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"device_id":{"type":"string"},"confidence":{"type":"number"},"is_known":{"type":"boolean"},"risk_score":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/fingerprint/linked":{"post":{"operationId":"po-fingerprint-get-linked-devices-v2","summary":"Get linked devices (fingerprint)","tags":["Security AI — Fingerprint"],"description":"List devices linked through shared network and behavioral signals (IP clustering, visitor graph) within your tenant.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-fingerprint-get-linked-devices-v2.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Visitor-ID for network connection lookup (32 characters)"},"network_pool":{"type":"boolean","description":"Cross-tenant Network Intelligence pool (requires PaperOffice-approved add-on; default false = tenant-isolated)","default":false}},"required":["id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Visitor-ID for network connection lookup (32 characters)"},"network_pool":{"type":"boolean","description":"Cross-tenant Network Intelligence pool (requires PaperOffice-approved add-on; default false = tenant-isolated)","default":false}},"required":["id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Linked devices","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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"network_device_count":{"type":"integer"},"processing_time":{"type":"string"},"same_network":{"type":"array","items":{}},"status":{"type":"string"},"visitor_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/fingerprint/similar":{"post":{"operationId":"po-fingerprint-find-similar-devices-v2","summary":"Find similar devices (fingerprint)","tags":["Security AI — Fingerprint"],"description":"Find devices with similar fingerprint signals in your tenant. Returns ranked matches with similarity scores for fraud and duplicate-account analysis.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-fingerprint-find-similar-devices-v2.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Visitor-Reference device ID (32-character SHA-256 hash)"},"threshold":{"type":"number","description":"Minimum similarity threshold for filtering results (0.0–1.0).","default":0.7,"minimum":0,"maximum":1},"network_pool":{"type":"boolean","description":"Cross-tenant Network Intelligence pool (requires PaperOffice-approved add-on; default false = tenant-isolated)","default":false}},"required":["id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Visitor-Reference device ID (32-character SHA-256 hash)"},"threshold":{"type":"number","description":"Minimum similarity threshold for filtering results (0.0–1.0).","default":0.7,"minimum":0,"maximum":1},"network_pool":{"type":"boolean","description":"Cross-tenant Network Intelligence pool (requires PaperOffice-approved add-on; default false = tenant-isolated)","default":false}},"required":["id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Aehnliche Geraete finden","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"devices":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/fingerprint/verify":{"post":{"operationId":"po-fingerprint-verify-fingerprint","summary":"Verify fingerprint","tags":["Security AI — Fingerprint"],"description":"Verify whether a submitted fingerprint hash matches a known device profile in your tenant. Useful for step-up checks and login risk scoring.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-fingerprint-verify-fingerprint.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"visitorId":{"type":"string","description":"Expected visitor ID to verify against","default":"abc123def456..."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"visitorId":{"type":"string","description":"Expected visitor ID to verify against","default":"abc123def456..."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Verify fingerprint","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"verified":{"type":"boolean"},"confidence":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/geocoding/forward":{"post":{"operationId":"po-geocoding-forward","summary":"Forward geocoding","tags":["Data AI — Geocoding"],"description":"Forward geocoding: resolve a street address or place name to latitude/longitude coordinates.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-geocoding-forward.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Full or partial address in any language/script"},"lang":{"type":"string","description":"Response language de, en, ja, ru, ar, zh, etc.","default":"de"}},"required":["address"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Full or partial address in any language/script"},"lang":{"type":"string","description":"Response language de, en, ja, ru, ar, zh, etc.","default":"de"}},"required":["address"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Vorwaerts-Geocoding (Adresse → Koordinaten)","properties":{"processing_time":{"type":"string","description":"Processing time (format: 123.45ms)"},"latitude":{"type":"number","description":"Latitude"},"longitude":{"type":"number","description":"Longitude"},"formatted_address":{"type":"string","description":"Formatted address"},"components":{"type":"object","description":"Components"},"status":{"type":"string","description":"Request status: \"success\" or \"error\"","enum":["success","error"]}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/geocoding/reverse":{"get":{"operationId":"po-geocoding-reverse","summary":"Reverse-geocode coordinates","tags":["Data AI — Geocoding"],"description":"Resolves GPS coordinates to a human-readable address.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-geocoding-reverse.md"},"parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"},"description":"Latitude (-90 to 90)."},{"name":"lng","in":"query","required":true,"schema":{"type":"number"},"description":"Longitude (-180 to 180). Alias: lon on the API."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"de"},"description":"Response language (e.g. de, en)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Rueckwaerts-Geocoding (Koordinaten → Adresse)","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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"found":{"type":"boolean"},"lat":{"type":"number"},"lng":{"type":"number"},"processing_time":{"type":"string"},"status":{"type":"string"},"success":{"type":"boolean"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/geocoding/status":{"get":{"operationId":"po-geocoding-service-status","summary":"Get geocoding service status","tags":["Data AI — Geocoding"],"description":"Geocoding service health. Success uses status: \"operational\" (not the generic status: \"success\" envelope).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-geocoding-service-status.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Geocoding Service Status","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"status":{"type":"string"},"available":{"type":"boolean"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/health":{"get":{"operationId":"po-jobs-ping","summary":"Health ping","tags":["Workflow AI — Job Management"],"description":"API connectivity check. Returns pong when reachable.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-jobs-ping.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"API Ping","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"}}}}},"message":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"success":{"type":"boolean"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/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"}},"additionalProperties":true}}}},"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","items":{}},"processing_time":{"type":"string"},"status":{"type":"string"},"total":{"type":"integer"}},"additionalProperties":true}}}},"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"}}}},"additionalProperties":true}}}},"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"}},"additionalProperties":true}}}},"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"}}}},"additionalProperties":true}}}},"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"}}}},"additionalProperties":true}}}},"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"}},"additionalProperties":true}}}},"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":true,"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}}}},"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}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"tasks":{"type":"array","items":{}},"counts":{"type":"object"}},"additionalProperties":true}}}},"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"}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-cancel":{"post":{"operationId":"po-import-cancel","summary":"Cancel import job","tags":["Document AI — Import & Migration"],"description":"Cancel a running import job. Already imported files remain; queued work is stopped.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-cancel.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"integer","description":"ID of the import job to cancel."}},"required":["job_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Import cancelled","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"import_id":{"type":"string","description":"Import id"},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"data":{"type":"string","description":"Data"},"job_id":{"type":"string","description":"Job id"},"files_skipped":{"type":"string","description":"Files skipped"},"retried_files":{"type":"string","description":"Retried files"},"deleted_files":{"type":"string","description":"Deleted files"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-create":{"post":{"operationId":"po-import-create","summary":"Create import job","tags":["Document AI — Import & Migration"],"description":"Create an import job.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Target workspace into which the files will be imported"},"source_type":{"type":"string","description":"Import source: sftp, local_upload, or watchfolder.","enum":["sftp","local_upload","watchfolder"]},"source_config":{"type":"object","description":"Source-specific connection object (see endpoint description)."},"include_subfolders":{"type":"boolean","description":"Include subfolders (default: true)"},"file_pattern":{"type":"string","description":"File filter pattern, e.g. \"*.pdf\" (default: \"*\")"},"ai_processing":{"type":"boolean","description":"Enable AI processing (derived from workspace setting if omitted)"},"ai_tier":{"type":"string","description":"AI processing tier (basic, premium, ultra)","enum":["basic","premium","ultra"]},"max_file_size_mb":{"type":"integer","description":"Optional max file size in MB (default server limit)."},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["workspace_id","source_type","source_config"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Import-Job erstellt","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"import":{"type":"object","description":"Import","properties":{"import_id":{"type":"string","description":"Import id"},"status":{"type":"string","description":"Request status (ok/error)","enum":["pending","scanning","processing","completed","failed","cancelled"]},"total_files":{"type":"integer","description":"Total number of files"},"processed_files":{"type":"integer","description":"Processed files"},"failed_files":{"type":"integer","description":"Failed files"},"progress_percent":{"type":"number","description":"Progress percent"},"created_at":{"type":"string","description":"Erstellungszeitpunkt","format":"date-time"}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-delete":{"post":{"operationId":"po-import-delete","summary":"Delete import job","tags":["Document AI — Import & Migration"],"description":"Delete an import job record and its temporary staging artifacts. Does not delete documents already committed to the DMS.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-delete.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"integer","description":"ID of the import job to delete, including all file entries."}},"required":["job_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Import deleted","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"import_id":{"type":"string","description":"Import id"},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"data":{"type":"string","description":"Data"},"job_id":{"type":"string","description":"Job id"},"deleted_files":{"type":"string","description":"Deleted files"},"session_id":{"type":"string","description":"Session id"},"upload_dir":{"type":"string","description":"Upload dir"},"batch_uploaded":{"type":"string","description":"Batch uploaded"},"batch_bytes":{"type":"string","description":"Batch bytes"},"total_files":{"type":"string","description":"Total files"},"total_bytes":{"type":"string","description":"Total bytes"},"errors":{"type":"string","description":"Errors"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-files":{"post":{"operationId":"po-import-files","summary":"List import files","tags":["Document AI — Import & Migration"],"description":"Return the paginated file list for an import job.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-files.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"integer","description":"Import job ID whose file list is returned."},"skip":{"type":"integer","description":"0-based offset into the merged live + snapshot file list. When set (including 0), skip wins over page.","default":0,"minimum":0},"limit":{"type":"integer","description":"Page size (default 50, max 500).","default":50,"minimum":1,"maximum":500},"page":{"type":"integer","description":"1-based page (used when skip is omitted). Offset = (page-1)*limit.","default":1,"minimum":1},"status":{"type":"string","description":"Optional file-status filter: pending, downloading, processing, completed, failed, skipped. Alias imported = completed.","enum":["pending","downloading","processing","completed","failed","skipped","imported"]}},"required":["job_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Import files","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"files":{"type":"array","description":"List of files","items":{"type":"object","properties":{"filename":{"type":"string","description":"Filename"},"status":{"type":"string","description":"Request status (ok/error)"},"pofid":{"type":"string","description":"PaperOffice File ID"},"error":{"type":"string","description":"Fehlerdetails falls vorhanden"}}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"data":{"type":"string","description":"Data"},"total":{"type":"string","description":"Total"},"page":{"type":"string","description":"Page"},"limit":{"type":"string","description":"Limit"},"total_pages":{"type":"string","description":"Total pages"},"job_id":{"type":"string","description":"Job id"},"files_skipped":{"type":"string","description":"Files skipped"},"retried_files":{"type":"string","description":"Retried files"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-jobs-list":{"post":{"operationId":"po-import-jobs-list","summary":"List import jobs","tags":["Document AI — Import & Migration"],"description":"List all import jobs of the account including KPI statistics (Total, Completed, In Progress, Failed).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-jobs-list.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Maximum number Jobs (Default: 50, Max: 200)","default":50},"offset":{"type":"integer","description":"Offset for pagination (Default: 0)","default":0},"status":{"type":"string","description":"Filter by job status (pending, scanning, scan_complete, importing, completed, failed, cancelled)","enum":["pending","scanning","scan_complete","importing","completed","failed","cancelled"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Maximum number Jobs (Default: 50, Max: 200)","default":50},"offset":{"type":"integer","description":"Offset for pagination (Default: 0)","default":0},"status":{"type":"string","description":"Filter by job status (pending, scanning, scan_complete, importing, completed, failed, cancelled)","enum":["pending","scanning","scan_complete","importing","completed","failed","cancelled"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Standard API-Response","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"},"credits_billed":{"type":"integer"},"pricing":{"type":"object","properties":{"credits_per_unit":{"type":"integer"},"unit":{"type":"string"},"unit_count":{"type":"integer"},"addons":{"type":"string"}}}}},"credits_billed":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}}}},"data":{"type":"object","properties":{"jobs":{"type":"array","items":{}},"kpi":{"type":"object","properties":{"total":{"type":"integer"},"completed":{"type":"integer"},"running":{"type":"integer"},"failed":{"type":"integer"}}},"pagination":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"returned":{"type":"integer"}}}}},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-retry":{"post":{"operationId":"po-import-retry","summary":"Retry import job","tags":["Document AI — Import & Migration"],"description":"Retry a failed import job from the last checkpoint. Use after fixing source files or connector configuration.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-retry.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"integer","description":"ID of the import job whose failed files are retried."}},"required":["job_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Import restarted","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"import":{"type":"object","description":"Import","properties":{"import_id":{"type":"string","description":"Import id"},"status":{"type":"string","description":"Request status (ok/error)","enum":["pending","scanning","processing","completed","failed","cancelled"]},"total_files":{"type":"integer","description":"Total number of files"},"processed_files":{"type":"integer","description":"Processed files"},"failed_files":{"type":"integer","description":"Failed files"},"progress_percent":{"type":"number","description":"Progress percent"},"created_at":{"type":"string","description":"Erstellungszeitpunkt","format":"date-time"}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"data":{"type":"string","description":"Data"},"job_id":{"type":"string","description":"Job id"},"retried_files":{"type":"string","description":"Retried files"},"deleted_files":{"type":"string","description":"Deleted files"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-scan":{"post":{"operationId":"po-import-scan","summary":"Scan import source","tags":["Document AI — Import & Migration"],"description":"Scans the import source and lists all found files. Returns count, sizes, and type breakdown.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-scan.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"integer","description":"ID of the import job for which the source is scanned."}},"required":["job_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Import-Scan","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"files":{"type":"array","description":"List of files","items":{"type":"object","properties":{"filename":{"type":"string","description":"Filename"},"size":{"type":"integer","description":"Size"},"mime_type":{"type":"string","description":"Mime type"}}}},"total_size":{"type":"integer","description":"Total size"},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"data":{"type":"string","description":"Data"},"job_id":{"type":"string","description":"Job id"},"total_files_found":{"type":"string","description":"Total files found"},"total_size_bytes":{"type":"string","description":"Total size bytes"},"total_size_human":{"type":"string","description":"Total size human"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-start":{"post":{"operationId":"po-import-start","summary":"Start import job","tags":["Document AI — Import & Migration"],"description":"Start an import batch. Returns progress_percent and status. Call repeatedly until completed.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-start.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"integer","description":"Identify the import jobs that have started (status must be scan_complete)"}},"required":["job_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Import started","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"message":{"type":"string","description":"Status message"},"import":{"type":"object","description":"Import","properties":{"import_id":{"type":"string","description":"Import id"},"status":{"type":"string","description":"Request status (ok/error)","enum":["pending","scanning","processing","completed","failed","cancelled"]},"total_files":{"type":"integer","description":"Total number of files"},"processed_files":{"type":"integer","description":"Processed files"},"failed_files":{"type":"integer","description":"Failed files"},"progress_percent":{"type":"number","description":"Progress percent"},"created_at":{"type":"string","description":"Erstellungszeitpunkt","format":"date-time"}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"data":{"type":"string","description":"Data"},"job_id":{"type":"string","description":"Job id"},"total_files_imported":{"type":"string","description":"Total files imported"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/import-status":{"post":{"operationId":"po-import-status","summary":"Get import status","tags":["Document AI — Import & Migration"],"description":"Returns the current import job status including live file counters.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-status.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"integer","description":"ID of the import job whose current status is queried."},"include_report":{"type":"boolean","description":"Include detailed import report in response"}},"required":["job_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Import job status","properties":{"status":{"type":"string","enum":["success","error"]},"data":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string"},"result_state":{"type":"string"},"total_files":{"type":"integer","description":"Alias for total_files_found"},"processed_files":{"type":"integer","description":"imported + failed + skipped"},"total_files_found":{"type":"integer"},"total_files_imported":{"type":"integer"},"total_files_failed":{"type":"integer"},"total_files_skipped":{"type":"integer"},"progress_percent":{"type":"number"}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/request-upload-url":{"post":{"operationId":"po-import-request-upload-url","summary":"Request import upload URL","tags":["Document AI — Import & Migration"],"description":"Generate a signed upload URL for direct file upload (Cloudflare bypass).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-request-upload-url.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","description":"Upload purpose. Default and only allowed value: import/upload-source (ZIP bulk import, max. 5 GB).","enum":["import/upload-source"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Upload-URL generiert","properties":{"credits":{"type":"object","description":"Credits","properties":{"credits":{"type":"object","description":"Credits","properties":{"total_monthly":{"type":"integer"},"remaining_monthly":{"type":"integer"}}},"job":{"type":"string","description":"Job"}}},"data":{"type":"object","description":"Response payload","properties":{"upload_url":{"type":"string","description":"URL for the file upload"},"upload_token":{"type":"string","description":"Token for the upload"},"expires_in":{"type":"integer","description":"Ablaufzeit in Sekunden"},"max_size_bytes":{"type":"integer","description":"Maximum file size in bytes"},"max_size_hr":{"type":"string","description":"Maximum file size (human-readable)"}}},"processing_time":{"type":"string","description":"Processing duration in milliseconds"},"status":{"type":"string","description":"Request status (ok/error)"},"upload_url":{"type":"string","description":"Upload url"},"upload_token":{"type":"string","description":"Upload token"},"expires_in":{"type":"string","description":"Expires in"},"max_size_bytes":{"type":"string","description":"Max size bytes"},"max_size_hr":{"type":"string","description":"Max size hr"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/import/upload-source":{"post":{"operationId":"po-import-upload-source","summary":"Upload ZIP source for import","tags":["Document AI — Import & Migration"],"description":"Upload a ZIP archive for bulk import (local_upload ZIP or historical ELO export).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-import-upload-source.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"ZIP archive (max. 5 GB)","format":"binary"},"source_type":{"type":"string","description":"Import source type for the ZIP.","enum":["elo_office","local_upload"]}},"required":["file"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"ZIP archive (max. 5 GB)","format":"binary"},"source_type":{"type":"string","description":"Import source type for the ZIP.","enum":["elo_office","local_upload"]}},"required":["file"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Upload source ZIP staged","properties":{"status":{"type":"string","enum":["success","error"]},"data":{"type":"object","properties":{"temp_file_id":{"type":"string","description":"Opaque handle for import-create source_config.temp_file_id"},"file_name":{"type":"string"},"file_size":{"type":"integer"},"source_type":{"type":"string"},"next_step":{"type":"object"}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/ip2location/countrylist":{"post":{"operationId":"po-ip-geolocation-country-list","summary":"List IP countries","tags":["Data AI — IP Geolocation"],"description":"Get list of all supported countries with basic info. Returns: - Country codes ISO 2-letter - Country names - Currency codes - Primary languages","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-ip-geolocation-country-list.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"language":{"type":"string","description":"Language for country names (e.g. de, en, fr).","default":"en"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"language":{"type":"string","description":"Language for country names (e.g. de, en, fr).","default":"en"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Laenderliste","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"countries":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/ip2location/device":{"post":{"operationId":"po-ip-geolocation-device-fingerprint","summary":"Get IP device fingerprint","tags":["Data AI — IP Geolocation"],"description":"Analyzes device/browser signals and returns a device fingerprint hash plus risk indicators.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-ip-geolocation-device-fingerprint.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"ip":{"type":"string","description":"IP address to analyze for device fingerprint"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"ip":{"type":"string","description":"IP address to analyze for device fingerprint"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Device Fingerprint via IP","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"fingerprint":{"type":"string"},"confidence":{"type":"number"},"device_info":{"type":"object"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/ip2location/full":{"get":{"operationId":"po-ip-geolocation-full-all-information","summary":"Get IP full information","tags":["Data AI — IP Geolocation"],"description":"Full IP Information Get complete IP geolocation and ISP data.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-ip-geolocation-full-all-information.md"},"parameters":[{"name":"ip","in":"query","required":false,"schema":{"type":"string"},"description":"IP address to look up. If omitted, the callers IP is used."},{"name":"locale","in":"query","required":false,"schema":{"type":"string","default":"en"},"description":"Response locale (en, de, fr, es, etc.)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"IP Geolocation alle Informationen","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"ip":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"region":{"type":"string"},"city":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"timezone":{"type":"string"},"isp":{"type":"string"},"is_vpn":{"type":"boolean"},"is_proxy":{"type":"boolean"},"threat_score":{"type":"number"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/ip2location/location":{"post":{"operationId":"po-ip-geolocation-location","summary":"Get IP location only","tags":["Data AI — IP Geolocation"],"description":"IP Location Only Get basic location data for an IP.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-ip-geolocation-location.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"ip":{"type":"string","description":"IPv4 or IPv6 address to look up. Omit to use the caller's IP address."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"ip":{"type":"string","description":"IPv4 or IPv6 address to look up. Omit to use the caller's IP address."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"IP nur Location","properties":{"processing_time":{"type":"string","description":"Processing time (format: 123.45ms)"},"ip":{"type":"string","description":"Ip"},"country":{"type":"string","description":"Country"},"city":{"type":"string","description":"City"},"latitude":{"type":"number","description":"Latitude"},"longitude":{"type":"number","description":"Longitude"},"status":{"type":"string","description":"Request status: \"success\" or \"error\"","enum":["success","error"]}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/ip2location/vpn":{"post":{"operationId":"po-ip-geolocation-vpn-detection","summary":"Detect IP VPN usage","tags":["Data AI — IP Geolocation"],"description":"Detect VPN, proxy, Tor, iCloud Private Relay and data-center use for an IP address (read-only; IP lists plus a provider-name fallback). Parameter: ip (optional IPv4/IPv6 or hostname; default is the caller IP). HTTP: GET /ip2location/vpn...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-ip-geolocation-vpn-detection.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"ip":{"type":"string","description":"IPv4 or IPv6 address to look up. Omit to use the caller's IP address."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"ip":{"type":"string","description":"IPv4 or IPv6 address to look up. Omit to use the caller's IP address."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"ip":{"type":"string"},"is_vpn":{"type":"boolean"},"is_proxy":{"type":"boolean"},"is_tor":{"type":"boolean"},"provider":{"type":"string"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/ip2location/weather":{"get":{"operationId":"po-weather-by-ip","summary":"Get weather by IP","tags":["Data AI — IP Geolocation"],"description":"Weather for an IP address (geolocation + weather).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-weather-by-ip.md"},"parameters":[{"name":"ip","in":"query","required":false,"schema":{"type":"string"},"description":"Public IPv4/IPv6 to geolocate. If omitted, the caller IP is used (often unsuitable in server-side/MCP calls)."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en"},"description":"Response language."},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Alias for lang."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Weather by IP address","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"},"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"}}},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"ip":{"type":"object","properties":{"ip":{"type":"string"},"location":{"type":"object","properties":{"timezone":{"type":"object","properties":{"name":{"type":"string"},"offsethours":{"type":"integer"}}},"geo_lat":{"type":"string"},"geo_lon":{"type":"string"},"city":{"type":"object","properties":{"name":{"type":"string"},"zip":{"type":"string"},"district":{"type":"string"}}},"region":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}}},"continent":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"}}},"country":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"currency":{"type":"string"},"spoken_languages":{"type":"string"},"capital":{"type":"string"},"callingcode":{"type":"string"},"primary_language":{"type":"string"}}}}},"provider":{"type":"object","properties":{"as":{"type":"string"},"asname":{"type":"string"},"isp":{"type":"string"},"org":{"type":"string"}}},"status":{"type":"string"},"language":{"type":"object","properties":{"by_country":{"type":"string"}}},"locale":{"type":"object","properties":{"by_browser":{"type":"boolean"}}},"country_details":{"type":"object","properties":{"warnings":{"type":"array","items":{}}}}}},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/ip2location/weathericon_get":{"get":{"operationId":"po-weather-icons","summary":"List weather icons","tags":["Data AI — IP Geolocation"],"description":"Returns weather icons (Base64 PNG or CDN fallback) for one or more WMO condition_code values from weather responses.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-weather-icons.md"},"parameters":[{"name":"condition_code","in":"query","required":true,"schema":{"type":"string"},"description":"WMO weather condition code(s). Comma-separated for multiple icons (e.g. 1000 or 1000,1003,1006)."},{"name":"size","in":"query","required":false,"schema":{"type":"string","enum":["64x64","128x128"],"default":"128x128"},"description":"Icon dimensions. Must match available static assets."},{"name":"is_day","in":"query","required":false,"schema":{"type":"string","default":"true"},"description":"Day (true) or night (false) icon variant."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Weather-icon mapping (WMO codes to icon URLs)","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"icons":{"type":"object","description":"Mapping of WMO weather codes to icon URLs and descriptions","additionalProperties":{"type":"object","properties":{"day":{"type":"string","description":"Icon URL for day"},"night":{"type":"string","description":"Icon URL for night"},"description":{"type":"string","description":"Wetterbeschreibung"}}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/paperoffice_aiocr___generate":{"post":{"operationId":"po-aiocr-analyze","summary":"Analyze document with AI-OCR","tags":["Document AI — OCR & IDP"],"x-paperoffice-variants":[{"slug":"po-aiocr-analyze","name":"Analyze document with AI-OCR","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-analyze.md"},{"slug":"po-aiocr-gridboxes","name":"Extract AI-OCR grid boxes","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-gridboxes.md"},{"slug":"po-aiocr-text-only","name":"Extract AI-OCR plain text","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-text-only.md"},{"slug":"po-aiocr-complete-analysis","name":"Run complete AI-OCR analysis","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-complete-analysis.md"},{"slug":"po-extraction-government-forms","name":"Extract government form data","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-government-forms.md"},{"slug":"po-extraction-handwritten-customer-form","name":"Extract handwritten customer form","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-handwritten-customer-form.md"},{"slug":"po-extraction-handwritten-document","name":"Extract handwritten document","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-handwritten-document.md"},{"slug":"po-extraction-us-tax-forms","name":"Extract US tax forms","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-us-tax-forms.md"}],"description":"AI-powered OCR document analysis — extract text, detect tables, layout, bounding boxes. Modes: text (fast), grid (+ bounding boxes/QR), complete (+ tables/layout/markdown). Optional: create searchable PDF. File input...\n\nThis operation has 8 documented variants (same method and path, different fields):\n- [Analyze document with AI-OCR](https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-analyze.md) — AI-powered OCR document analysis — extract text, detect tables, layout, bounding boxes. Modes: text (fast), grid (+ bounding boxes/QR), complete (+ tables/layout/markdown). Optional: create searchable PDF. File input...\n- [Extract AI-OCR grid boxes](https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-gridboxes.md) — Aiocr: AI-OCR Grid/Boxes OCR with bounding boxes - includes precise text positions for each line. Required for Document Anonymization! --- When to Use - Document Anonymization redacting sensitive data - IDP Intelligent Document...\n- [Extract AI-OCR plain text](https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-text-only.md) — Fast plain-text OCR extraction (no full layout analysis).\n- [Run complete AI-OCR analysis](https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-complete-analysis.md) — Aiocr: AI-OCR Complete Analysis Full document analysis - includes text, bounding boxes, table detection, and layout analysis. --- When to Use - Complex documents with tables and structured layouts - Financial reports, invoices with...\n- [Extract government form data](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-government-forms.md) — Extract data from government and official forms (applications, civic/ID forms). Fields: all_fields, checkboxes, signatures. Pipeline: paperoffice_aiocr___generate — not IDP workflow.\n- [Extract handwritten customer form](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-handwritten-customer-form.md) — Handwritten customer/intake form recognition (filled forms). Fields: extracted_text, confidence, language. Pipeline: paperoffice_aiocr___generate.\n- [Extract handwritten document](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-handwritten-document.md) — General handwritten page/note recognition (not a structured intake form). Fields: extracted_text, confidence, language. Pipeline: paperoffice_aiocr___generate. Use processing_lane for Start-SLA...\n- [Extract US tax forms](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-us-tax-forms.md) — Extract data from US tax forms (W-2, 1040, 1099 and similar). Fields: all_fields, checkboxes, signatures. Pipeline: paperoffice_aiocr___generate — not IDP workflow.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-aiocr-analyze.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"anyOf":[{"title":"Analyze document with AI-OCR","type":"object","properties":{"upload_id":{"type":"string","description":"Upload ID from the upload page"},"file_url":{"type":"string","description":"Public URL of a PDF or image (Alternative to file_1 upload)."},"file_name":{"type":"string","description":"Filename (e.g. \"invoice.pdf\", \"scan.png\")"},"pofid":{"type":"string","description":"PaperOffice File ID (Alternative to file_1 upload)."},"ocr_mode":{"type":"string","description":"\"text\" = text only (about 3s/page), \"grid\" = + bounding boxes (about 5s/page), \"complete\" = + tables/layout (about 7s/page). Default: \"complete\"","enum":["text","grid","complete"]},"output_searchable_pdf":{"type":"boolean","description":"Create searchable PDF (sandwich PDF with invisible OCR layer). Default: false"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"file_1":{"type":"string","format":"binary","description":"Image or PDF upload (multipart). Supported: PNG, JPG, JPEG, TIFF, BMP, WEBP, PDF."},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"anyOf":[{"required":["file_1"],"properties":{"file_1":{}}},{"required":["pofid"],"properties":{"pofid":{}}},{"required":["file_url"],"properties":{"file_url":{}}}]},{"title":"Extract AI-OCR grid boxes","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"ocr_mode":{"type":"string","description":"OCR mode: text fastest, text only, grid + bounding boxes, complete + tables + layout","default":"grid"},"output_searchable_pdf":{"type":"string","description":"Create searchable PDF Sandwich PDF with invisible OCR layer. Default: false","default":"false"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]},{"title":"Extract AI-OCR plain text","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"ocr_mode":{"type":"string","description":"OCR mode: text fastest, text only, grid + bounding boxes, complete + tables + layout","default":"text"},"output_searchable_pdf":{"type":"string","description":"Create searchable PDF Sandwich PDF with invisible OCR layer. Default: false","default":"false"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]},{"title":"Run complete AI-OCR analysis","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"ocr_mode":{"type":"string","description":"OCR mode: text fastest, text only, grid + bounding boxes, complete + tables + layout","default":"complete"},"output_searchable_pdf":{"type":"string","description":"Create searchable PDF Sandwich PDF with invisible OCR layer. Default: false","default":"false"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]},{"title":"Extract government form data","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"government_forms"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]},{"title":"Extract handwritten customer form","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"handwritten_customer_form"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]},{"title":"Extract handwritten document","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"handwritten_document"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]},{"title":"Extract US tax forms","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"us_tax_forms"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]}]}},"application/x-www-form-urlencoded":{"schema":{"anyOf":[{"title":"Analyze document with AI-OCR","type":"object","properties":{"upload_id":{"type":"string","description":"Upload ID from the upload page"},"file_url":{"type":"string","description":"Public URL of a PDF or image (Alternative to file_1 upload)."},"file_name":{"type":"string","description":"Filename (e.g. \"invoice.pdf\", \"scan.png\")"},"pofid":{"type":"string","description":"PaperOffice File ID (Alternative to file_1 upload)."},"ocr_mode":{"type":"string","description":"\"text\" = text only (about 3s/page), \"grid\" = + bounding boxes (about 5s/page), \"complete\" = + tables/layout (about 7s/page). Default: \"complete\"","enum":["text","grid","complete"]},"output_searchable_pdf":{"type":"boolean","description":"Create searchable PDF (sandwich PDF with invisible OCR layer). Default: false"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"file_1":{"type":"string","format":"binary","description":"Image or PDF upload (multipart). Supported: PNG, JPG, JPEG, TIFF, BMP, WEBP, PDF."},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"anyOf":[{"required":["file_1"],"properties":{"file_1":{}}},{"required":["pofid"],"properties":{"pofid":{}}},{"required":["file_url"],"properties":{"file_url":{}}}]},{"title":"Extract AI-OCR grid boxes","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"ocr_mode":{"type":"string","description":"OCR mode: text fastest, text only, grid + bounding boxes, complete + tables + layout","default":"grid"},"output_searchable_pdf":{"type":"string","description":"Create searchable PDF Sandwich PDF with invisible OCR layer. Default: false","default":"false"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]},{"title":"Extract AI-OCR plain text","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"ocr_mode":{"type":"string","description":"OCR mode: text fastest, text only, grid + bounding boxes, complete + tables + layout","default":"text"},"output_searchable_pdf":{"type":"string","description":"Create searchable PDF Sandwich PDF with invisible OCR layer. Default: false","default":"false"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]},{"title":"Run complete AI-OCR analysis","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"ocr_mode":{"type":"string","description":"OCR mode: text fastest, text only, grid + bounding boxes, complete + tables + layout","default":"complete"},"output_searchable_pdf":{"type":"string","description":"Create searchable PDF Sandwich PDF with invisible OCR layer. Default: false","default":"false"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]},{"title":"Extract government form data","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"government_forms"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]},{"title":"Extract handwritten customer form","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"handwritten_customer_form"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]},{"title":"Extract handwritten document","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"handwritten_document"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]},{"title":"Extract US tax forms","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"us_tax_forms"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["model","file_1"]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/paperoffice_dataripper___email_parser":{"post":{"operationId":"po-convert-email-parser","summary":"Parse email files (EML, MSG, PST)","tags":["Document AI — OCR & IDP"],"description":"Parse email containers (EML, MSG, PST) into structured parts and attachments for downstream document ingestion.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-convert-email-parser.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"string","format":"binary","description":"Email file upload (EML, MSG, or PST). Multipart field `files`."},"extract_attachments":{"type":"boolean","description":"Extract file attachments from the email into separate outputs","default":true},"parse_headers":{"type":"boolean","description":"Parse email headers (From, To, Subject, Date, Message-ID)","default":true},"decode_html":{"type":"boolean","description":"Decode HTML body content to plain text where applicable","default":true},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"file":{"type":"string","description":"Multipart file upload (primary input).","format":"binary"},"file_1":{"type":"string","description":"Multipart file upload field `file_1`.","format":"binary"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"string","format":"binary","description":"Email file upload (EML, MSG, or PST). Multipart field `files`."},"extract_attachments":{"type":"boolean","description":"Extract file attachments from the email into separate outputs","default":true},"parse_headers":{"type":"boolean","description":"Parse email headers (From, To, Subject, Date, Message-ID)","default":true},"decode_html":{"type":"boolean","description":"Decode HTML body content to plain text where applicable","default":true},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"file":{"type":"string","description":"Multipart file upload (primary input).","format":"binary"},"file_1":{"type":"string","description":"Multipart file upload field `file_1`.","format":"binary"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"E-Mail Parser (EML/MSG)","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":"string"},"date":{"type":"string"},"body_text":{"type":"string"},"body_html":{"type":"string"},"attachments":{"type":"array","items":{}}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/paperoffice_dataripper___redact_image":{"post":{"operationId":"po-anonymization-apply-redaction","summary":"Apply redaction","tags":["Document AI — Anonymization"],"x-paperoffice-variants":[{"slug":"po-anonymization-apply-redaction","name":"Apply redaction","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-apply-redaction.md"},{"slug":"po-redact-image-regions","name":"Redact image regions","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-redact-image-regions.md"}],"description":"POST /job/add/paperoffice_dataripper___redact_image. After document_anonymize_preview: send page image URLs (files/page_files), OCR bounding_boxes, redact_boxes/boxes_by_page from detected_pii and partial_regions (detected_pii...\n\nThis operation has 2 documented variants (same method and path, different fields):\n- [Apply redaction](https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-apply-redaction.md) — POST /job/add/paperoffice_dataripper___redact_image. After document_anonymize_preview: send page image URLs (files/page_files), OCR bounding_boxes, redact_boxes/boxes_by_page from detected_pii and partial_regions (detected_pii...\n- [Redact image regions](https://api.paperoffice.ai/latest/docs/endpoints/po-redact-image-regions.md) — POST /job/add/paperoffice_dataripper___redact_image. Used after PII preview to produce anonymized PDF. Required: files, bounding_boxes, redact_boxes.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-apply-redaction.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"anyOf":[{"title":"Apply redaction","type":"object","properties":{"files":{"type":"string","description":"Page images from preview: HTTPS download URL(s) or JSON array of page image URLs (from preview original_images / page files). Multipart file uploads also accepted."},"page_files":{"type":"string","description":"Optional JSON array [{\"page\": \"00001\", \"file\": \"<page image URL>\"}] with the explicit page order (takes precedence over files; same payload as UI and MCP)."},"bounding_boxes":{"type":"string","description":"OCR geometry: JSON ocr_pages / bounding boxes from preview (required for production apply)."},"redact_boxes":{"type":"string","description":"JSON: which boxes to black out — typically detected_pii.redact_box_ids (per-page or global)."},"boxes_by_page":{"type":"string","description":"Alias for redact_boxes as page-keyed index arrays (e.g. {\"00001\":[0,2,5]})."},"override_boxes":{"type":"array","description":"Optional manual box IDs overriding auto detection. Send only when non-empty; an empty array is ignored (R20260914.1444).","items":{}},"partial_regions":{"type":"string","description":"Partial regions per page from the preview (detected_pii.partial_regions, page-keyed JSON object): fragments inside a line and, with redact_mode=pseudonymize, the replacement texts. Pass them along unchanged, otherwise fragments stay visible and no pseudonymized PDF is produced. Extra rectangles {x, y, width, height} in percent may be added per page."},"redact_color":{"type":"string","description":"Redaction fill color (hex)","default":"#000000"},"output_pdf":{"type":"string","description":"true = anonymized PDF; false = redacted page images","default":"true"},"priority":{"type":"integer","description":"Queue priority (1–900). Omit = plan default. 900 = sync when capacity allows.","minimum":0,"maximum":900},"client_wait":{"type":"boolean","description":"Connection hold: true = hold HTTP until done (dynamic timeout, cap about 295s) or 202+job_id; false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id}.","default":false}},"required":["files","bounding_boxes","redact_boxes"]},{"title":"Redact image regions","type":"object","properties":{"files":{"type":"array","description":"Image files to redact (PNG, JPG, WEBP)","items":{}},"bounding_boxes":{"type":"array","description":"OCR bounding boxes per page (from a prior OCR pass)","items":{}},"redact_boxes":{"type":"array","description":"List the box-IDs to be blacked out","items":{}},"override_boxes":{"type":"array","description":"Optional manual box IDs to override auto-detected redaction regions","default":[],"items":{}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files","bounding_boxes","redact_boxes"]}]}},"application/x-www-form-urlencoded":{"schema":{"anyOf":[{"title":"Apply redaction","type":"object","properties":{"files":{"type":"string","description":"Page images from preview: HTTPS download URL(s) or JSON array of page image URLs (from preview original_images / page files). Multipart file uploads also accepted."},"page_files":{"type":"string","description":"Optional JSON array [{\"page\": \"00001\", \"file\": \"<page image URL>\"}] with the explicit page order (takes precedence over files; same payload as UI and MCP)."},"bounding_boxes":{"type":"string","description":"OCR geometry: JSON ocr_pages / bounding boxes from preview (required for production apply)."},"redact_boxes":{"type":"string","description":"JSON: which boxes to black out — typically detected_pii.redact_box_ids (per-page or global)."},"boxes_by_page":{"type":"string","description":"Alias for redact_boxes as page-keyed index arrays (e.g. {\"00001\":[0,2,5]})."},"override_boxes":{"type":"array","description":"Optional manual box IDs overriding auto detection. Send only when non-empty; an empty array is ignored (R20260914.1444).","items":{}},"partial_regions":{"type":"string","description":"Partial regions per page from the preview (detected_pii.partial_regions, page-keyed JSON object): fragments inside a line and, with redact_mode=pseudonymize, the replacement texts. Pass them along unchanged, otherwise fragments stay visible and no pseudonymized PDF is produced. Extra rectangles {x, y, width, height} in percent may be added per page."},"redact_color":{"type":"string","description":"Redaction fill color (hex)","default":"#000000"},"output_pdf":{"type":"string","description":"true = anonymized PDF; false = redacted page images","default":"true"},"priority":{"type":"integer","description":"Queue priority (1–900). Omit = plan default. 900 = sync when capacity allows.","minimum":0,"maximum":900},"client_wait":{"type":"boolean","description":"Connection hold: true = hold HTTP until done (dynamic timeout, cap about 295s) or 202+job_id; false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id}.","default":false}},"required":["files","bounding_boxes","redact_boxes"]},{"title":"Redact image regions","type":"object","properties":{"files":{"type":"array","description":"Image files to redact (PNG, JPG, WEBP)","items":{}},"bounding_boxes":{"type":"array","description":"OCR bounding boxes per page (from a prior OCR pass)","items":{}},"redact_boxes":{"type":"array","description":"List the box-IDs to be blacked out","items":{}},"override_boxes":{"type":"array","description":"Optional manual box IDs to override auto-detected redaction regions","default":[],"items":{}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files","bounding_boxes","redact_boxes"]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/paperoffice_imagestudio___generate":{"post":{"operationId":"po-image-generate-image-premium-max-1280x1280","summary":"Generate image","tags":["Media AI — Image Studio"],"description":"Image generate: POST /job/add/paperoffice_imagestudio___generate. Requires prompt. model basic|premium|ultra sets max size. output inline|base64|url (Postman default inline). precompile_prompt, inject_weather, force_location, num_images...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-image-generate-image-premium-max-1280x1280.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text description of the image to generate (required). Default demo: photorealistic portrait with legible \"Tokyo\" sign — pair with force_location=Tokyo.","default":"{see_params_tab}"},"model":{"type":"string","description":"Resolution tier: basic (max 512×512), premium (max 1280×1280), ultra (max 2048×2048). Default: premium.","enum":["basic","premium","ultra"],"default":"premium"},"width":{"type":"integer","description":"Width in pixels (snapped to 16 px grid, clamped to model tier). Optional.","default":896,"minimum":128,"maximum":2048},"height":{"type":"integer","description":"Height in pixels (snapped to 16 px grid, clamped to model tier). Optional.","default":1152,"minimum":128,"maximum":2048},"output":{"type":"string","description":"Delivery mode: `inline` (binary HTTP body), `base64`, or `url`. When `output` is `inline` or `base64`, set `client_wait=true` (default) — otherwise HTTP 400 `CLIENT_WAIT_REQUIRED`.","enum":["inline","base64","url"],"default":"inline"},"precompile_prompt":{"type":"string","description":"true = AI prompt optimizer (default). false = use exact prompt (pair with fixed seed for reproducibility).","enum":["true","false"],"default":"true"},"inject_weather":{"type":"string","description":"true = include local weather in prompt optimizer (default). false = omit weather context.","enum":["true","false"],"default":"true"},"force_location":{"type":"string","description":"Optional. City/region name or IP. Default demo: Tokyo (pairs with the sign text in the default prompt).","default":"Tokyo"},"num_images":{"type":"integer","description":"Number of images to generate in one job (1–8). Each image is processed as a separate unit in the job result.","default":1,"minimum":1,"maximum":8},"negative_prompt":{"type":"string","description":"Optional. Elements to exclude (e.g. blurry, misspelled letters, distorted typography).","default":"blurry, low quality, watermark, misspelled letters, distorted typography"},"seed":{"type":"integer","description":"Optional. Fixed seed ≥ 0 for reproducibility; omit or -1 for random. Use with precompile_prompt=false.","default":-1},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["prompt"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"prompt":{"type":"string","description":"Text description of the image to generate (required). Default demo: photorealistic portrait with legible \"Tokyo\" sign — pair with force_location=Tokyo.","default":"{see_params_tab}"},"model":{"type":"string","description":"Resolution tier: basic (max 512×512), premium (max 1280×1280), ultra (max 2048×2048). Default: premium.","enum":["basic","premium","ultra"],"default":"premium"},"width":{"type":"integer","description":"Width in pixels (snapped to 16 px grid, clamped to model tier). Optional.","default":896,"minimum":128,"maximum":2048},"height":{"type":"integer","description":"Height in pixels (snapped to 16 px grid, clamped to model tier). Optional.","default":1152,"minimum":128,"maximum":2048},"output":{"type":"string","description":"Delivery mode: `inline` (binary HTTP body), `base64`, or `url`. When `output` is `inline` or `base64`, set `client_wait=true` (default) — otherwise HTTP 400 `CLIENT_WAIT_REQUIRED`.","enum":["inline","base64","url"],"default":"inline"},"precompile_prompt":{"type":"string","description":"true = AI prompt optimizer (default). false = use exact prompt (pair with fixed seed for reproducibility).","enum":["true","false"],"default":"true"},"inject_weather":{"type":"string","description":"true = include local weather in prompt optimizer (default). false = omit weather context.","enum":["true","false"],"default":"true"},"force_location":{"type":"string","description":"Optional. City/region name or IP. Default demo: Tokyo (pairs with the sign text in the default prompt).","default":"Tokyo"},"num_images":{"type":"integer","description":"Number of images to generate in one job (1–8). Each image is processed as a separate unit in the job result.","default":1,"minimum":1,"maximum":8},"negative_prompt":{"type":"string","description":"Optional. Elements to exclude (e.g. blurry, misspelled letters, distorted typography).","default":"blurry, low quality, watermark, misspelled letters, distorted typography"},"seed":{"type":"integer","description":"Optional. Fixed seed ≥ 0 for reproducibility; omit or -1 for random. Use with precompile_prompt=false.","default":-1},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["prompt"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Bild-Generierung Premium (max 1280x1280)","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated images as download URLs","additionalProperties":{"type":"string","format":"uri"}},"output":{"type":"object","description":"Output","properties":{"width":{"type":"number"},"height":{"type":"number"},"seed":{"type":"number","description":"Seed used for reproducibility"},"steps":{"type":"number"},"guidance_scale":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/paperoffice_imagestudio___remove_bg":{"post":{"operationId":"po-image-remove-background","summary":"Remove background","tags":["Media AI — Image Studio"],"description":"Image remove background: POST /job/add/paperoffice_imagestudio___remove_bg with file upload. output_format webp|png. output inline|base64|url (Postman default inline). Optional segmentation profile via API (Not a public request...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-image-remove-background.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"Image file to process (required). JPEG, PNG, WebP, GIF, BMP.","format":"binary"},"output_format":{"type":"string","description":"Output format: webp (default, smaller) or png (lossless transparency).","enum":["webp","png"],"default":"webp"},"output":{"type":"string","description":"Delivery mode: `inline` (binary HTTP body), `base64`, or `url`. When `output` is `inline` or `base64`, set `client_wait=true` (default) — otherwise HTTP 400 `CLIENT_WAIT_REQUIRED`.","enum":["inline","base64","url"],"default":"inline"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"Image file to process (required). JPEG, PNG, WebP, GIF, BMP.","format":"binary"},"output_format":{"type":"string","description":"Output format: webp (default, smaller) or png (lossless transparency).","enum":["webp","png"],"default":"webp"},"output":{"type":"string","description":"Delivery mode: `inline` (binary HTTP body), `base64`, or `url`. When `output` is `inline` or `base64`, set `client_wait=true` (default) — otherwise HTTP 400 `CLIENT_WAIT_REQUIRED`.","enum":["inline","base64","url"],"default":"inline"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Hintergrund-Entfernung","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated images as download URLs","additionalProperties":{"type":"string","format":"uri"}},"output":{"type":"object","description":"Output","properties":{"width":{"type":"number"},"height":{"type":"number"},"seed":{"type":"number","description":"Seed used for reproducibility"},"steps":{"type":"number"},"guidance_scale":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/paperoffice_voice___stt":{"post":{"operationId":"po-stt-transcribe-audio","summary":"Transcribe audio","tags":["Media AI — Voice"],"description":"STT transcribe: POST /job/add/paperoffice_voice___stt with audio_file upload. quality basic|premium|ultra; output_format json|srt|vtt|rttm with tier rules. Optional language. Hybrid client_wait about 295s. Use processing_lane for Start...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-stt-transcribe-audio.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"audio_file":{"type":"string","description":"Audio file upload (required). MP3, WAV, M4A, FLAC, OGG, WebM, AAC.","format":"binary"},"quality":{"type":"string","description":"Tier: basic (JSON transcript), premium (timestamps, SRT/VTT), ultra (speaker diarization, RTTM).","enum":["basic","premium","ultra"],"default":"basic"},"output_format":{"type":"string","description":"json (all tiers), srt/vtt (premium+), rttm (ultra only). Default: json.","enum":["json","srt","vtt","rttm"],"default":"json"},"language":{"type":"string","description":"Optional ISO language (de, en, …). Omit for auto-detection."},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["audio_file"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"audio_file":{"type":"string","description":"Audio file upload (required). MP3, WAV, M4A, FLAC, OGG, WebM, AAC.","format":"binary"},"quality":{"type":"string","description":"Tier: basic (JSON transcript), premium (timestamps, SRT/VTT), ultra (speaker diarization, RTTM).","enum":["basic","premium","ultra"],"default":"basic"},"output_format":{"type":"string","description":"json (all tiers), srt/vtt (premium+), rttm (ultra only). Default: json.","enum":["json","srt","vtt","rttm"],"default":"json"},"language":{"type":"string","description":"Optional ISO language (de, en, …). Omit for auto-detection."},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["audio_file"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Audio-Transkription (Speech-to-Text)","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output":{"type":"object","description":"Output","properties":{"text":{"type":"string","description":"Transkribierter Text"},"language":{"type":"string","description":"Erkannte Sprache"},"confidence":{"type":"number"},"duration_seconds":{"type":"number","description":"Audio-Laenge in Sekunden"},"segments":{"type":"array","description":"Zeitgestempelte Segmente","items":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"text":{"type":"string"}}}}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/paperoffice_voice___tts":{"post":{"operationId":"po-tts-voice-cloning","summary":"Clone voice (TTS)","tags":["Media AI — Voice"],"x-paperoffice-variants":[{"slug":"po-tts-voice-cloning","name":"Clone voice (TTS)","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-tts-voice-cloning.md"},{"slug":"po-tts-multivoice-4-speakers","name":"Generate multi-speaker TTS (inline tags)","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-tts-multivoice-4-speakers.md"},{"slug":"po-tts-generate-speech","name":"Generate speech (single voice)","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-tts-generate-speech.md"}],"description":"TTS voice clone: POST /job/add/paperoffice_voice___tts with voice_sample file (no catalog voice). quality premium|ultra only. Sample min 10s; reference_text (alias voice_sample_text) strongly recommended. Defaults: premium, inline, mp3...\n\nThis operation has 3 documented variants (same method and path, different fields):\n- [Clone voice (TTS)](https://api.paperoffice.ai/latest/docs/endpoints/po-tts-voice-cloning.md) — TTS voice clone: POST /job/add/paperoffice_voice___tts with voice_sample file (no catalog voice). quality premium|ultra only. Sample min 10s; reference_text (alias voice_sample_text) strongly recommended. Defaults: premium, inline, mp3...\n- [Generate multi-speaker TTS (inline tags)](https://api.paperoffice.ai/latest/docs/endpoints/po-tts-multivoice-4-speakers.md) — TTS multi-speaker: POST /job/add/paperoffice_voice___tts with voice=Multi and inline speaker tags. Requires text, voice, language. Catalog names from POST /voice/voices. Tag syntax: XML, [lang|Name], or [voice:Name lang:xx]. Hybrid...\n- [Generate speech (single voice)](https://api.paperoffice.ai/latest/docs/endpoints/po-tts-generate-speech.md) — TTS single voice: language wins on mismatch, voice substituted (Abigail+language=de → Anneliese, warnings[]). POST /job/add/paperoffice_voice___tts. Requires text, voice, language (POST /voice/voices). Defaults: voice=Abigail...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tts-voice-cloning.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"anyOf":[{"title":"Clone voice (TTS)","type":"object","properties":{"text":{"type":"string","description":"Text to speak (max 50,000 characters). Inline emotion markers: [chuckle] [laugh] [sigh] [breath] [whisper] [happy] [excited]. Default demo after voice_sample upload.","default":"[happy] This is your cloned voice on PaperOffice neural TTS. [breath] Support ticket TCK-88421 is now marked resolved. [excited] Record one clean sample, then narrate any new script with emotions like [sigh] or [whisper] — no extra studio session required."},"voice_sample":{"type":"string","description":"Voice sample audio file (required). Minimum 10 seconds, recommended 15–30 s, clean single-speaker speech, max 10 MB. WAV, MP3, OGG, FLAC, M4A, WebM, AAC.","format":"binary"},"reference_text":{"type":"string","description":"Transcript of the spoken content in voice_sample (strongly recommended for clone quality). Max 2,000 characters. Alias: voice_sample_text.","default":"Welcome to PaperOffice. This is the spoken content of my voice sample for cloning.","maxLength":2000},"quality":{"type":"string","description":"Quality tier: premium (balanced) or ultra (best). Basic is NOT supported for cloning.","enum":["premium","ultra"],"default":"premium"},"output_format":{"type":"string","description":"Audio format: mp3, wav, ogg. Default: mp3.","enum":["mp3","wav","ogg"],"default":"mp3"},"output":{"type":"string","description":"Response: inline (audio stream in HTTP body, default), base64 (JSON), or url (download link in JSON).","enum":["inline","base64","url"],"default":"inline"},"language":{"type":"string","description":"Language of the output text (optional). Omit or use auto to detect from the text to speak — not from the voice sample.","default":"auto"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["text","voice_sample"]},{"title":"Generate multi-speaker TTS (inline tags)","type":"object","properties":{"text":{"type":"string","description":"Script with speaker tags on every segment (max 50,000 characters). Examples: [en|Abigail] Hello [en|James] Hi. Default demo: support dialog with emotions.","default":"[en|Abigail][happy] Welcome to PaperOffice Voice AI — thanks for calling support today. [en|James][breath] Hi, I am James. Your order SO-24091 shipped this morning. [en|Abigail][excited] We can narrate up to fifty thousand characters in one job — with speaker tags, emotions, and natural handoffs. [en|James][whisper] Try quality ultra when the message must sound executive-ready."},"voice":{"type":"string","description":"Must be Multi for multi-speaker mode.","enum":["Multi"],"default":"Multi"},"language":{"type":"string","description":"Top-level language code (required). Use the same codes as POST /voice/voices (e.g. en, de).","default":"en"},"quality":{"type":"string","description":"Quality tier: basic, premium (default), ultra.","enum":["basic","premium","ultra"],"default":"premium"},"output_format":{"type":"string","description":"Audio format: mp3, wav, ogg. Default: mp3.","enum":["mp3","wav","ogg"],"default":"mp3"},"output":{"type":"string","description":"Response delivery: inline (audio in HTTP body, default), base64, url.","enum":["inline","base64","url"],"default":"inline"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["text","voice","language"]},{"title":"Generate speech (single voice)","type":"object","properties":{"text":{"type":"string","description":"Text to convert to speech (max 50,000 characters). Inline emotion markers: [chuckle] [laugh] [sigh] [breath] [whisper] [happy] [excited]. Default demo showcases emotions and reference IDs (e.g. SO-24091).","default":"{see_params_tab}"},"voice":{"type":"string","description":"Voice name from POST /voice/voices. Prefer the same language bucket as `language`. On mismatch, language wins: the API substitutes the default female catalog voice for that language (e.g. Abigail + language=de → Anneliese) and returns warnings[]. Default demo: Abigail (en, female).","default":"Abigail"},"language":{"type":"string","description":"Language code from the voice catalog (required). Language wins on mismatch with `voice` (voice is substituted). Omit or send auto to keep the voice catalog language. Default: en for Abigail. List pairs via POST /voice/voices.","default":"en"},"quality":{"type":"string","description":"Quality tier: basic (fast), premium (balanced), ultra (best). Default: premium.","enum":["basic","premium","ultra"],"default":"premium"},"output_format":{"type":"string","description":"Audio format: mp3 (compressed), wav (lossless), ogg. Default: mp3.","enum":["mp3","wav","ogg"],"default":"mp3"},"output":{"type":"string","description":"Response delivery: inline (audio stream, default), base64 (JSON), url (download link in JSON).","enum":["inline","base64","url"],"default":"inline"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["text","voice","language"]}]}},"application/x-www-form-urlencoded":{"schema":{"anyOf":[{"title":"Clone voice (TTS)","type":"object","properties":{"text":{"type":"string","description":"Text to speak (max 50,000 characters). Inline emotion markers: [chuckle] [laugh] [sigh] [breath] [whisper] [happy] [excited]. Default demo after voice_sample upload.","default":"[happy] This is your cloned voice on PaperOffice neural TTS. [breath] Support ticket TCK-88421 is now marked resolved. [excited] Record one clean sample, then narrate any new script with emotions like [sigh] or [whisper] — no extra studio session required."},"voice_sample":{"type":"string","description":"Voice sample audio file (required). Minimum 10 seconds, recommended 15–30 s, clean single-speaker speech, max 10 MB. WAV, MP3, OGG, FLAC, M4A, WebM, AAC.","format":"binary"},"reference_text":{"type":"string","description":"Transcript of the spoken content in voice_sample (strongly recommended for clone quality). Max 2,000 characters. Alias: voice_sample_text.","default":"Welcome to PaperOffice. This is the spoken content of my voice sample for cloning.","maxLength":2000},"quality":{"type":"string","description":"Quality tier: premium (balanced) or ultra (best). Basic is NOT supported for cloning.","enum":["premium","ultra"],"default":"premium"},"output_format":{"type":"string","description":"Audio format: mp3, wav, ogg. Default: mp3.","enum":["mp3","wav","ogg"],"default":"mp3"},"output":{"type":"string","description":"Response: inline (audio stream in HTTP body, default), base64 (JSON), or url (download link in JSON).","enum":["inline","base64","url"],"default":"inline"},"language":{"type":"string","description":"Language of the output text (optional). Omit or use auto to detect from the text to speak — not from the voice sample.","default":"auto"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["text","voice_sample"]},{"title":"Generate multi-speaker TTS (inline tags)","type":"object","properties":{"text":{"type":"string","description":"Script with speaker tags on every segment (max 50,000 characters). Examples: [en|Abigail] Hello [en|James] Hi. Default demo: support dialog with emotions.","default":"[en|Abigail][happy] Welcome to PaperOffice Voice AI — thanks for calling support today. [en|James][breath] Hi, I am James. Your order SO-24091 shipped this morning. [en|Abigail][excited] We can narrate up to fifty thousand characters in one job — with speaker tags, emotions, and natural handoffs. [en|James][whisper] Try quality ultra when the message must sound executive-ready."},"voice":{"type":"string","description":"Must be Multi for multi-speaker mode.","enum":["Multi"],"default":"Multi"},"language":{"type":"string","description":"Top-level language code (required). Use the same codes as POST /voice/voices (e.g. en, de).","default":"en"},"quality":{"type":"string","description":"Quality tier: basic, premium (default), ultra.","enum":["basic","premium","ultra"],"default":"premium"},"output_format":{"type":"string","description":"Audio format: mp3, wav, ogg. Default: mp3.","enum":["mp3","wav","ogg"],"default":"mp3"},"output":{"type":"string","description":"Response delivery: inline (audio in HTTP body, default), base64, url.","enum":["inline","base64","url"],"default":"inline"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["text","voice","language"]},{"title":"Generate speech (single voice)","type":"object","properties":{"text":{"type":"string","description":"Text to convert to speech (max 50,000 characters). Inline emotion markers: [chuckle] [laugh] [sigh] [breath] [whisper] [happy] [excited]. Default demo showcases emotions and reference IDs (e.g. SO-24091).","default":"{see_params_tab}"},"voice":{"type":"string","description":"Voice name from POST /voice/voices. Prefer the same language bucket as `language`. On mismatch, language wins: the API substitutes the default female catalog voice for that language (e.g. Abigail + language=de → Anneliese) and returns warnings[]. Default demo: Abigail (en, female).","default":"Abigail"},"language":{"type":"string","description":"Language code from the voice catalog (required). Language wins on mismatch with `voice` (voice is substituted). Omit or send auto to keep the voice catalog language. Default: en for Abigail. List pairs via POST /voice/voices.","default":"en"},"quality":{"type":"string","description":"Quality tier: basic (fast), premium (balanced), ultra (best). Default: premium.","enum":["basic","premium","ultra"],"default":"premium"},"output_format":{"type":"string","description":"Audio format: mp3 (compressed), wav (lossless), ogg. Default: mp3.","enum":["mp3","wav","ogg"],"default":"mp3"},"output":{"type":"string","description":"Response delivery: inline (audio stream, default), base64 (JSON), url (download link in JSON).","enum":["inline","base64","url"],"default":"inline"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["text","voice","language"]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___compress_pdf":{"post":{"operationId":"po-pdfstudio-compress","summary":"Compress PDF","tags":["Document AI — PDF"],"description":"Compress a PDF to reduce file size while preserving readability. Submit with file or source_url. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-compress.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"quality":{"type":"string","description":"Compression quality: low (72dpi, smallest), medium (150dpi, balanced), high (300dpi, best quality), lossless (no quality loss)","enum":["low","medium","high","lossless"],"default":"medium"},"linearize":{"type":"boolean","description":"Linearize PDF for fast web view (default: true)","default":true},"remove_metadata":{"type":"boolean","description":"Remove metadata during compression (default: false)"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"quality":{"type":"string","description":"Compression quality: low (72dpi, smallest), medium (150dpi, balanced), high (300dpi, best quality), lossless (no quality loss)","enum":["low","medium","high","lossless"],"default":"medium"},"linearize":{"type":"boolean","description":"Linearize PDF for fast web view (default: true)","default":true},"remove_metadata":{"type":"boolean","description":"Remove metadata during compression (default: false)"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF komprimieren","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___ebook_to_pdf":{"post":{"operationId":"po-convert-ebook-to-pdf","summary":"Convert eBook to PDF","tags":["Document AI — PDF"],"description":"Convert eBook formats to PDF for unified document processing.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-convert-ebook-to-pdf.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"JSON array of HTTPS file URLs or multipart `files[]` uploads.","items":{"type":"string"}},"output_format":{"type":"string","description":"Output format (default: pdf)","enum":["pdf"],"default":"pdf"},"page_size":{"type":"string","description":"Target page size for e-book conversion (e.g. A4, letter).","enum":["A4","A3","Letter"],"default":"A4"},"margin":{"type":"integer","description":"Seitenrand in mm","default":20,"minimum":0,"maximum":50},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"file":{"type":"string","description":"Multipart file upload (primary input).","format":"binary"},"file_1":{"type":"string","description":"Multipart file upload field `file_1`.","format":"binary"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"JSON array of HTTPS file URLs or multipart `files[]` uploads.","items":{"type":"string"}},"output_format":{"type":"string","description":"Output format (default: pdf)","enum":["pdf"],"default":"pdf"},"page_size":{"type":"string","description":"Target page size for e-book conversion (e.g. A4, letter).","enum":["A4","A3","Letter"],"default":"A4"},"margin":{"type":"integer","description":"Seitenrand in mm","default":20,"minimum":0,"maximum":50},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"file":{"type":"string","description":"Multipart file upload (primary input).","format":"binary"},"file_1":{"type":"string","description":"Multipart file upload field `file_1`.","format":"binary"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"E-Book zu PDF","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___edit_metadata_pdf":{"post":{"operationId":"po-pdfstudio-edit-metadata","summary":"Edit PDF metadata","tags":["Document AI — PDF"],"description":"Edit or read PDF metadata via pipeline pdfstudio___edit_metadata_pdf.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-edit-metadata.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF file URL(s) or paths.","items":{"type":"string"}},"operation":{"type":"string","description":"read, edit, or remove. edit requires metadata or title/author/subject/keywords. Invalid values return HTTP 400.","enum":["read","edit","remove"],"default":"read"},"metadata":{"type":"object","description":"Required when operation=edit (title, author, subject, keywords).","properties":{"title":{"type":"string"},"author":{"type":"string"},"subject":{"type":"string"},"keywords":{"type":"string"}}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","default":50,"deprecated":true},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF file URL(s) or paths.","items":{"type":"string"}},"operation":{"type":"string","description":"read, edit, or remove. edit requires metadata or title/author/subject/keywords. Invalid values return HTTP 400.","enum":["read","edit","remove"],"default":"read"},"metadata":{"type":"object","description":"Required when operation=edit (title, author, subject, keywords).","properties":{"title":{"type":"string"},"author":{"type":"string"},"subject":{"type":"string"},"keywords":{"type":"string"}}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","default":50,"deprecated":true},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Edit PDF metadata","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___image_to_pdf":{"post":{"operationId":"po-convert-images-to-pdf","summary":"Convert images to PDF","tags":["Document AI — PDF"],"description":"Convert one or more raster images into a single PDF document. Supports common image formats and optional page sizing. Use after upload or when ingesting scans from connectors. Use processing_lane for Start-SLA...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-convert-images-to-pdf.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"JSON array of HTTPS file URLs or multipart `files[]` uploads.","items":{"type":"string"}},"fit_to_a4":{"type":"boolean","description":"Place each image on an A4 page (595.28 × 841.89 pt).","default":false},"merge":{"type":"boolean","description":"true/1 = one PDF. false/0 = one PDF per image. String \"false\" is false.","default":true},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"file":{"type":"string","description":"Multipart file upload (primary input).","format":"binary"},"file_1":{"type":"string","description":"Multipart file upload field `file_1`.","format":"binary"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"JSON array of HTTPS file URLs or multipart `files[]` uploads.","items":{"type":"string"}},"fit_to_a4":{"type":"boolean","description":"Place each image on an A4 page (595.28 × 841.89 pt).","default":false},"merge":{"type":"boolean","description":"true/1 = one PDF. false/0 = one PDF per image. String \"false\" is false.","default":true},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"file":{"type":"string","description":"Multipart file upload (primary input).","format":"binary"},"file_1":{"type":"string","description":"Multipart file upload field `file_1`.","format":"binary"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Image to PDF conversion","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___lock_with_password_pdf":{"post":{"operationId":"po-pdfstudio-security-password-add","summary":"Add password to PDF","tags":["Document AI — PDF"],"description":"Add password protection to a PDF via the PDF Studio workflow pipeline.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-security-password-add.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"password":{"type":"string","description":"PDF password to set (min. 8 characters).","minLength":8},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"password":{"type":"string","description":"PDF password to set (min. 8 characters).","minLength":8},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Add PDF password protection","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}},"job_type":{"type":"string","description":"Job type"},"processing_mode":{"type":"string","description":"Processing mode"}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___merge_pdf":{"post":{"operationId":"po-pdfstudio-merge","summary":"Merge pdf","tags":["Document AI — PDF"],"description":"Merge multiple PDFs into one document.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-merge.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pofids":{"type":"array","description":"Array of PaperOffice Document IDs (pofids) to merge in order. Min 2, max 50.","minItems":2,"maxItems":50,"items":{"type":"string"}},"file_urls":{"type":"array","description":"Alternative: public URLs of PDFs to download and merge.","minItems":2,"maxItems":50,"items":{"type":"string","format":"uri"}},"pofid":{"type":"string","description":"Single PaperOffice Document ID (rarely useful alone — merge expects 2+)."},"order":{"type":"array","description":"Optional explicit merge order as 0-based indices into pofids/file_urls.","items":{"type":"integer"}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"output_filename":{"type":"string","description":"Name of the merged output file","default":"merged.pdf"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"anyOf":[{"required":["pofids"],"properties":{"pofids":{}}},{"required":["file_urls"],"properties":{"file_urls":{}}}]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"pofids":{"type":"array","description":"Array of PaperOffice Document IDs (pofids) to merge in order. Min 2, max 50.","minItems":2,"maxItems":50,"items":{"type":"string"}},"file_urls":{"type":"array","description":"Alternative: public URLs of PDFs to download and merge.","minItems":2,"maxItems":50,"items":{"type":"string","format":"uri"}},"pofid":{"type":"string","description":"Single PaperOffice Document ID (rarely useful alone — merge expects 2+)."},"order":{"type":"array","description":"Optional explicit merge order as 0-based indices into pofids/file_urls.","items":{"type":"integer"}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"output_filename":{"type":"string","description":"Name of the merged output file","default":"merged.pdf"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"anyOf":[{"required":["pofids"],"properties":{"pofids":{}}},{"required":["file_urls"],"properties":{"file_urls":{}}}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF zusammenfuegen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___office_to_pdf":{"post":{"operationId":"po-convert-office-to-pdf","summary":"Convert Office files to PDF","tags":["Document AI — PDF"],"description":"Convert Microsoft Office documents to PDF for archival and OCR pipelines.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-convert-office-to-pdf.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"JSON array of HTTPS file URLs or multipart `files[]` uploads.","items":{"type":"string"}},"provider":{"type":"string","description":"Conversion Engine (automatic selection for optimal quality)","enum":["auto"],"default":"auto"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"file":{"type":"string","description":"Multipart file upload (primary input).","format":"binary"},"file_1":{"type":"string","description":"Multipart file upload field `file_1`.","format":"binary"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"JSON array of HTTPS file URLs or multipart `files[]` uploads.","items":{"type":"string"}},"provider":{"type":"string","description":"Conversion Engine (automatic selection for optimal quality)","enum":["auto"],"default":"auto"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"file":{"type":"string","description":"Multipart file upload (primary input).","format":"binary"},"file_1":{"type":"string","description":"Multipart file upload field `file_1`.","format":"binary"},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___pdf_to_excel":{"post":{"operationId":"po-pdfstudio-convert-to-excel","summary":"Convert PDF to Excel","tags":["Document AI — PDF"],"description":"Convert a PDF spreadsheet or table layout into an Excel workbook. Pipeline: pdfstudio___pdf_to_excel. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-convert-to-excel.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF to Excel conversion","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___pdf_to_jpg":{"post":{"operationId":"po-pdfstudio-convert-to-jpg","summary":"Convert PDF to JPG","tags":["Document AI — PDF"],"description":"Rasterize PDF pages to JPG images. Pipeline: pdfstudio___pdf_to_jpg. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-convert-to-jpg.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"quality":{"type":"integer","description":"Quality (Integer)","default":70,"minimum":10,"maximum":100},"max_size":{"type":"integer","description":"Maximum image size (longest side in pixels). Default 2000.","default":2000,"minimum":100,"maximum":8000},"dpi":{"type":"integer","description":"Resolution in DPI (default: 150)","default":150},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"quality":{"type":"integer","description":"Quality (Integer)","default":70,"minimum":10,"maximum":100},"max_size":{"type":"integer","description":"Maximum image size (longest side in pixels). Default 2000.","default":2000,"minimum":100,"maximum":8000},"dpi":{"type":"integer","description":"Resolution in DPI (default: 150)","default":150},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF to JPG conversion","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___pdf_to_pdfa":{"post":{"operationId":"po-pdfstudio-convert-to-pdfa","summary":"Convert PDF to PDF/A","tags":["Document AI — PDF"],"description":"Convert a PDF to PDF/A for long-term archival compliance. Pipeline: pdfstudio___pdf_to_pdfa. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-convert-to-pdfa.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"level":{"type":"string","description":"PDF/A level: pdfa-1b, pdfa-2b, or pdfa-3b. Invalid values return HTTP 400 JOB_CONFIG_INVALID.","enum":["pdfa-1b","pdfa-2b","pdfa-3b"],"default":"pdfa-2b"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"level":{"type":"string","description":"PDF/A level: pdfa-1b, pdfa-2b, or pdfa-3b. Invalid values return HTTP 400 JOB_CONFIG_INVALID.","enum":["pdfa-1b","pdfa-2b","pdfa-3b"],"default":"pdfa-2b"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF to PDF/A archive conversion","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___pdf_to_powerpoint":{"post":{"operationId":"po-pdfstudio-convert-to-powerpoint","summary":"Convert PDF to PowerPoint","tags":["Document AI — PDF"],"description":"Convert a PDF presentation into an editable PowerPoint file. Pipeline: pdfstudio___pdf_to_powerpoint. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-convert-to-powerpoint.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF to PowerPoint conversion","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___pdf_to_webp":{"post":{"operationId":"po-pdfstudio-convert-to-webp","summary":"Convert PDF to WebP","tags":["Document AI — PDF"],"description":"Rasterize PDF pages to WebP images. Pipeline: pdfstudio___pdf_to_webp. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-convert-to-webp.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"quality":{"type":"integer","description":"Quality (Integer)","default":70,"minimum":10,"maximum":100},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"quality":{"type":"integer","description":"Quality (Integer)","default":70,"minimum":10,"maximum":100},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF to WebP conversion","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___pdf_to_word":{"post":{"operationId":"po-pdfstudio-convert-to-word","summary":"Convert PDF to Word","tags":["Document AI — PDF"],"description":"PDF processing: conversion, editing, and optimization. Convert PDF to Word document (DOCX). Parameter: required: files. Optional: client_wait. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-convert-to-word.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF to Word conversion","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___remove_restrictions_pdf":{"post":{"operationId":"po-pdfstudio-security-remove-restrictions","summary":"Remove restrictions","tags":["Document AI — PDF"],"description":"PDF Remove Restrictions Remove printing/editing restrictions.## Request parameters Authenticate with your Bearer token.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-security-remove-restrictions.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF-Einschraenkungen entfernen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___rotate_pdf":{"post":{"operationId":"po-pdfstudio-rotate","summary":"Rotate pdf","tags":["Document AI — PDF"],"description":"Rotate PDF pages by 90°, 180°, or 270°. Pipeline: pdfstudio___rotate_pdf. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-rotate.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"angle":{"type":"string","description":"Rotation angle in degrees (clockwise): 90, 180, or 270","enum":["90","180","270"],"default":"90"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"page_range":{"type":"string","description":"Pages to rotate: \"all\" (default) or specific pages like \"1-5,7,9-10\"","default":"all"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"angle":{"type":"string","description":"Rotation angle in degrees (clockwise): 90, 180, or 270","enum":["90","180","270"],"default":"90"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"page_range":{"type":"string","description":"Pages to rotate: \"all\" (default) or specific pages like \"1-5,7,9-10\"","default":"all"},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF-Seiten rotieren","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___split_pdf":{"post":{"operationId":"po-pdfstudio-split","summary":"Split PDF","tags":["Document AI — PDF"],"description":"Split a PDF into separate files by page ranges or bookmarks. Pipeline: pdfstudio___split_pdf. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-split.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF file to split","items":{}},"mode":{"type":"string","description":"Split mode: burst = every page becomes a separate PDF (default), ranges = custom page ranges via splits parameter","enum":["burst","ranges"],"default":"burst"},"splits":{"type":"array","description":"For ranges mode: [{pages, filename}, …]. Multipart: splits[0][pages], splits[0][filename] — JSON objects in repeated splits[] fields are not parsed. For ranges mode: Array of split definitions. Each item has pages (e.g. 1-5,7) and optional filename.","items":{"type":"object","properties":{"pages":{"type":"string","description":"Page range like 1-5 or 1-3,7,10-12"},"filename":{"type":"string","description":"Optional output filename for this split"}}}},"output_prefix":{"type":"string","description":"Prefix for burst mode output filenames (default: page_)"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"files":{"type":"array","description":"PDF file to split","items":{}},"mode":{"type":"string","description":"Split mode: burst = every page becomes a separate PDF (default), ranges = custom page ranges via splits parameter","enum":["burst","ranges"],"default":"burst"},"splits":{"type":"array","description":"For ranges mode: [{pages, filename}, …]. Multipart: splits[0][pages], splits[0][filename] — JSON objects in repeated splits[] fields are not parsed. For ranges mode: Array of split definitions. Each item has pages (e.g. 1-5,7) and optional filename.","items":{"type":"object","properties":{"pages":{"type":"string","description":"Page range like 1-5 or 1-3,7,10-12"},"filename":{"type":"string","description":"Optional output filename for this split"}}}},"output_prefix":{"type":"string","description":"Prefix for burst mode output filenames (default: page_)"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"PDF aufteilen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___unlock_with_password_pdf":{"post":{"operationId":"po-pdfstudio-security-password-remove","summary":"Remove password from PDF","tags":["Document AI — PDF"],"x-paperoffice-variants":[{"slug":"po-pdfstudio-security-password-remove","name":"Remove password from PDF","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-security-password-remove.md"},{"slug":"po-pdfstudio-unlock-with-password","name":"Unlock PDF with password","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-unlock-with-password.md"}],"description":"Remove known password protection from a PDF (alias of unlock-with-password). Pipeline: pdfstudio___unlock_with_password_pdf — same job as po_pdfstudio_unlock_with_password.\n\nThis operation has 2 documented variants (same method and path, different fields):\n- [Remove password from PDF](https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-security-password-remove.md) — Remove known password protection from a PDF (alias of unlock-with-password). Pipeline: pdfstudio___unlock_with_password_pdf — same job as po_pdfstudio_unlock_with_password.\n- [Unlock PDF with password](https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-unlock-with-password.md) — Unlock an encrypted PDF when the password is supplied. Primary pipeline: pdfstudio___unlock_with_password_pdf. Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant). Legacy priority is internal only.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-security-password-remove.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"anyOf":[{"title":"Remove password from PDF","type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID to decrypt the PDFs"},"password":{"type":"string","description":"Current PDF password (required to remove protection).","minLength":1},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["pofid","password"]},{"title":"Unlock PDF with password","type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"password":{"type":"string","description":"Current PDF password required to unlock the file."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files","password"]}]}},"application/x-www-form-urlencoded":{"schema":{"anyOf":[{"title":"Remove password from PDF","type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID to decrypt the PDFs"},"password":{"type":"string","description":"Current PDF password (required to remove protection).","minLength":1},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["pofid","password"]},{"title":"Unlock PDF with password","type":"object","properties":{"files":{"type":"array","description":"PDF files","items":{}},"password":{"type":"string","description":"Current PDF password required to unlock the file."},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["files","password"]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Remove PDF password protection","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___url_to_pdf":{"post":{"operationId":"po-pdfstudio-url-to","summary":"Convert URL to PDF","tags":["Document AI — PDF"],"description":"Convert a public web page to PDF using a headless browser renderer.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-pdfstudio-url-to.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL to render. Private, loopback, and metadata IPs are blocked server-side."},"screen_width":{"type":"integer","description":"Browser viewport width in pixels","default":1920},"screen_height":{"type":"integer","description":"Browser viewport height in pixels","default":1080},"page_size":{"type":"string","description":"PDF page size","enum":["A4","A3","A5","Letter","Legal","Tabloid"],"default":"A4"},"page_orientation":{"type":"string","description":"Page orientation: portrait or landscape.","enum":["portrait","landscape"],"default":"portrait"},"page_margins":{"type":"integer","description":"Page margins in pixels","default":20},"scale":{"type":"string","description":"Scale factor 0.1-2.0","default":"1"},"print_background":{"type":"string","description":"Print background colors/images (true/false)","enum":["true","false"],"default":"true"},"page_ranges":{"type":"string","description":"Pages to print, e.g. 1-5,8"},"header_template":{"type":"string","description":"HTML header template"},"footer_template":{"type":"string","description":"HTML footer template"},"remove_classes":{"type":"string","description":"CSS selectors to remove"},"user_agent":{"type":"string","description":"Custom User-Agent"},"wait_until":{"type":"string","description":"Navigation completion event","enum":["load","domcontentloaded","networkidle0","networkidle2"],"default":"networkidle0"},"timeout":{"type":"integer","description":"Navigation timeout in ms","default":60000},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"hide_cookie_banners":{"type":"boolean","description":"Hide common cookie/consent banners before rendering (fixed, server-side rule — no custom scripts).","default":false},"wait_for_selector":{"type":"string","description":"Wait up to 10s for this CSS selector to appear before rendering (plain selector, max 200 chars)."}},"required":["url"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL to render. Private, loopback, and metadata IPs are blocked server-side."},"screen_width":{"type":"integer","description":"Browser viewport width in pixels","default":1920},"screen_height":{"type":"integer","description":"Browser viewport height in pixels","default":1080},"page_size":{"type":"string","description":"PDF page size","enum":["A4","A3","A5","Letter","Legal","Tabloid"],"default":"A4"},"page_orientation":{"type":"string","description":"Page orientation: portrait or landscape.","enum":["portrait","landscape"],"default":"portrait"},"page_margins":{"type":"integer","description":"Page margins in pixels","default":20},"scale":{"type":"string","description":"Scale factor 0.1-2.0","default":"1"},"print_background":{"type":"string","description":"Print background colors/images (true/false)","enum":["true","false"],"default":"true"},"page_ranges":{"type":"string","description":"Pages to print, e.g. 1-5,8"},"header_template":{"type":"string","description":"HTML header template"},"footer_template":{"type":"string","description":"HTML footer template"},"remove_classes":{"type":"string","description":"CSS selectors to remove"},"user_agent":{"type":"string","description":"Custom User-Agent"},"wait_until":{"type":"string","description":"Navigation completion event","enum":["load","domcontentloaded","networkidle0","networkidle2"],"default":"networkidle0"},"timeout":{"type":"integer","description":"Navigation timeout in ms","default":60000},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"hide_cookie_banners":{"type":"boolean","description":"Hide common cookie/consent banners before rendering (fixed, server-side rule — no custom scripts).","default":false},"wait_for_selector":{"type":"string","description":"Wait up to 10s for this CSS selector to appear before rendering (plain selector, max 200 chars)."}},"required":["url"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"URL/Webseite zu PDF","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Human-readable status message"},"pipeline":{"type":"string","description":"Name of the executed pipeline"},"operation":{"type":"string","description":"Executed operation"},"processing_time":{"type":"string","description":"Total processing time including queue (format: 123.45ms)"},"result":{"type":"object","description":"The actual processing result","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-specific status message"},"duration_ms":{"type":"string","description":"Pure pipeline processing time in ms"},"output_files":{"type":"object","description":"Generated files as download URLs, indexed by page number (00001, 00002, ...)","additionalProperties":{"type":"string","description":"Download URL for the generated file","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/pdfstudio___whitepage_scan":{"post":{"operationId":"po-analysis-whitepage-scan","summary":"Run whitepage scan analysis","tags":["Document AI — DMS"],"description":"Scan PDFs or images for blank pages and embedded barcodes/QR codes. Canonical whitepage endpoint — uses the PaperOffice workflow pipeline.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-analysis-whitepage-scan.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"whitepage_threshold":{"type":"string","description":"Whitespace threshold 0.0-1.0, default: 0.95","default":"0.95"},"detect_code":{"type":"string","description":"Detect barcodes and QR codes","default":"true"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"whitepage_threshold":{"type":"string","description":"Whitespace threshold 0.0-1.0, default: 0.95","default":"0.95"},"detect_code":{"type":"string","description":"Detect barcodes and QR codes","default":"true"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]}},"required":["file_1"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"is_whitepage":{"type":"boolean"},"confidence":{"type":"number"},"content_detected":{"type":"boolean"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/add/workflow":{"post":{"operationId":"po-extraction-identity-document-id-cardpassport","summary":"Extract ID card or passport","tags":["Document AI — OCR & IDP","Document AI — PDF","Document AI — Anonymization"],"x-paperoffice-variants":[{"slug":"po-extraction-identity-document-id-cardpassport","name":"Extract ID card or passport","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-identity-document-id-cardpassport.md"},{"slug":"po-extraction-insurance-policy","name":"Extract insurance policy","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-insurance-policy.md"},{"slug":"po-extraction-legal-document","name":"Extract legal document","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-legal-document.md"},{"slug":"po-documents-trust-check","name":"Start adhoc document integrity check","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trust-check.md"},{"slug":"po-extraction-payroll-pay-stub","name":"Extract payroll / pay stub","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-payroll-pay-stub.md"},{"slug":"po-extraction-hotel-invoice","name":"Extract hotel invoice","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-hotel-invoice.md"},{"slug":"po-extraction-accounting-datev-skr03","name":"Export DATEV SKR03 accounting","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-accounting-datev-skr03.md"},{"slug":"po-extraction-bank-check","name":"Extract bank check data","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-bank-check.md"},{"slug":"po-extraction-bank-details","name":"Extract bank details","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-bank-details.md"},{"slug":"po-extraction-cash-receipt","name":"Extract cash receipt data","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-cash-receipt.md"},{"slug":"po-extraction-custom-fields-idp-fields","name":"Extract custom fields (IDP)","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-custom-fields-idp-fields.md"},{"slug":"po-extraction-invoice","name":"Extract invoice","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-invoice.md"},{"slug":"po-extraction-invoice-germandeutsch","name":"Extract invoice (German/DATEV-optimized)","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-invoice-germandeutsch.md"},{"slug":"po-extraction-invoice-light-basic-fields","name":"Extract invoice basic fields","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-invoice-light-basic-fields.md"},{"slug":"po-extraction-statement-of-account","name":"Extract statement of account","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-statement-of-account.md"},{"slug":"po-extraction-utility-bill","name":"Extract utility bill","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-utility-bill.md"},{"slug":"po-extraction-letter-mail","name":"Extract letter or mail","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-letter-mail.md"},{"slug":"po-extraction-receipt","name":"Extract receipt","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-receipt.md"},{"slug":"po-extraction-delivery-note","name":"Extract delivery note","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-delivery-note.md"},{"slug":"po-extraction-purchase-order","name":"Extract purchase order","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-purchase-order.md"},{"slug":"po-extraction-shipping-waybill","name":"Extract shipping waybill","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-shipping-waybill.md"},{"slug":"po-extraction-construction-plan-blueprint","name":"Extract construction plan/blueprint","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-construction-plan-blueprint.md"},{"slug":"po-extraction-vehicle-registration","name":"Extract vehicle registration","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-vehicle-registration.md"},{"slug":"po-editing-pdf-ai-split","name":"Split PDF via AI","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-editing-pdf-ai-split.md"},{"slug":"po-anonymization-anonymize-document","name":"Anonymize document (single-step)","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-anonymize-document.md"},{"slug":"po-anonymization-detect-pii-preview","name":"Detect PII preview","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-detect-pii-preview.md"},{"slug":"po-anonymization-finalize-redaction","name":"Finalize anonymize (workflow)","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-finalize-redaction.md"}],"description":"WHEN TO USE: identity cards and passports — extracts document number, holder name, dates of birth, issue and expiry via the prepared \"Identity Document\" profile.\n\nThis operation has 27 documented variants (same method and path, different fields):\n- [Extract ID card or passport](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-identity-document-id-cardpassport.md) — WHEN TO USE: identity cards and passports — extracts document number, holder name, dates of birth, issue and expiry via the prepared \"Identity Document\" profile.\n- [Extract insurance policy](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-insurance-policy.md) — Extract insurance policy fields — policy number, insured party, coverage period, and premium.\n- [Extract legal document](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-legal-document.md) — Extract structured sections and parties from legal documents and contracts.\n- [Start adhoc document integrity check](https://api.paperoffice.ai/latest/docs/endpoints/po-documents-trust-check.md) — WRITE: start an adhoc Trust / integrity scan (credits). No agent id. Required: pofid or documents_id. Optional profile and tier. Then read po_documents_trust_get. Use processing_lane for Start-SLA...\n- [Extract payroll / pay stub](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-payroll-pay-stub.md) — Payroll / Pay Stub Extract salary and payroll data. Fields: employee_name, pay_period, gross, net, deductions, taxes, employer\n- [Extract hotel invoice](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-hotel-invoice.md) — Extract hotel invoice fields — guest, stay dates, room charges, taxes, and total amount.\n- [Export DATEV SKR03 accounting](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-accounting-datev-skr03.md) — Extract structured accounting data in DATEV SKR03 format. Fields: document date, document number, posting text, debit/credit account, amount, tax rate.\n- [Extract bank check data](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-bank-check.md) — WHEN TO USE: cheque documents — extracts cheque number, date, payee, amounts, bank and account data via the prepared \"Process Bank Check\" profile. For bank statements use po_extraction_bank_details.\n- [Extract bank details](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-bank-details.md) — Extract bank account details from financial documents — IBAN, BIC, account holder, and bank name fields.\n- [Extract cash receipt data](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-cash-receipt.md) — Extract structured fields from cash receipts — amount, date, vendor, and payment method.\n- [Extract custom fields (IDP)](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-custom-fields-idp-fields.md) — WHEN TO USE: extraction with your OWN field definitions (free profile) instead of a prepared one. Field keys use the canonical form with a leading underscore (_check_number). Keys without it are normalized automatically; the result...\n- [Extract invoice](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-invoice.md) — Extract structured invoice fields via the IDP workflow (POST /job/add/workflow).\n- [Extract invoice (German/DATEV-optimized)](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-invoice-germandeutsch.md) — Extract data from German invoices with DATEV-compatible fields. Fields: invoice number, date, supplier, customer, net, gross, VAT, IBAN, BIC.\n- [Extract invoice basic fields](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-invoice-light-basic-fields.md) — Lightweight invoice extraction with essential fields only — vendor, total, date, and invoice number.\n- [Extract statement of account](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-statement-of-account.md) — Extract account statement fields — period, opening balance, transactions, and closing balance.\n- [Extract utility bill](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-utility-bill.md) — Extract utility bill fields — provider, billing period, consumption, and amount due.\n- [Extract letter or mail](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-letter-mail.md) — Letters: Letter / Mail Extract letter metadata and content. Fields: sender, recipient, date, subject, body_summary. category: letters Use processing_lane for Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).\n- [Extract receipt](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-receipt.md) — Extract retail receipt fields — merchant, line items, tax, and total.\n- [Extract delivery note](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-delivery-note.md) — Extract delivery note fields — shipper, recipient, items, quantities, and delivery date.\n- [Extract purchase order](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-purchase-order.md) — Orders: Purchase Order Extract purchase order data. Fields: order_number, date, vendor, buyer, items, delivery_date, total\n- [Extract shipping waybill](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-shipping-waybill.md) — Extract shipping waybill fields — tracking number, carrier, sender, recipient, and weight.\n- [Extract construction plan/blueprint](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-construction-plan-blueprint.md) — Extract metadata and annotations from construction plans and blueprints via AI-IDP workflow.\n- [Extract vehicle registration](https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-vehicle-registration.md) — Vehicle Registration Extract vehicle registration data. Fields: plate_number, make, model, VIN, owner, registration_date\n- [Split PDF via AI](https://api.paperoffice.ai/latest/docs/endpoints/po-editing-pdf-ai-split.md) — Split a multi-document PDF into separate files using AI layout analysis.\n- [Anonymize document (single-step)](https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-anonymize-document.md) — POST /job/add/workflow. template=document_anonymize. Params: file|pofid, model (required: basic|premium|ultra; without it 400 MODEL_REQUIRED before billing), redact_categories, whitelist, custom_redact, custom_instructions, scenario...\n- [Detect PII preview](https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-detect-pii-preview.md) — POST /job/add/workflow multipart. template=document_anonymize_preview (required). Params: file|pofid, model (required: basic|premium|ultra; without it 400 MODEL_REQUIRED before billing), redact_categories, whitelist, custom_redact...\n- [Finalize anonymize (workflow)](https://api.paperoffice.ai/latest/docs/endpoints/po-anonymization-finalize-redaction.md) — POST /job/add/workflow template=document_anonymize_finalize. Alternative to paperoffice_dataripper___redact_image when staying in workflow templates. Params: preview_images, preview_bounding_boxes, redact_boxes. Canonical apply for...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-extraction-identity-document-id-cardpassport.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"anyOf":[{"title":"Extract ID card or passport","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"identity_document"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract insurance policy","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"insurance_policy"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract legal document","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"legal_document"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Start adhoc document integrity check","type":"object","properties":{"pofid":{"type":"string","description":"PaperOffice File ID of a stored PDF"},"documents_id":{"type":"integer","description":"Numeric document ID — Alternative to pofid"},"profile":{"type":"string","description":"Integrity profile. Default general.","enum":["general","invoice","bank_statement","contract","identity_document","payslip","application","utility_bill","receipt","certificate","official_letter","medical_certificate","insurance","delivery_note","rental_agreement","power_of_attorney","vehicle_document","email_export"]},"tier":{"type":"string","description":"Check depth / billing tier. Default premium.","enum":["basic","premium","ultra"]},"include_visual_evidence":{"type":"boolean","description":"Premium/Ultra: include visual evidence. Ignored on basic."},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128}}},{"title":"Extract payroll / pay stub","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"payroll"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract hotel invoice","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"hotel_invoice"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Export DATEV SKR03 accounting","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"accounting_datev"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract bank check data","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"bank_check"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract bank details","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"basic"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"bank_details"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id} every 5–10s.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract cash receipt data","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"cash_receipt"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract custom fields (IDP)","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_fields":{"type":"string","description":"Custom extraction fields as JSON array Field keys use the canonical form with a leading underscore (_check_number). Keys without it are normalized automatically; the result carries the canonical key. Each entry: {\"key\":\"_my_field\",\"description\":\"what to extract\"}.","default":"[{\"key\":\"_company_name\",\"description\":\"Name of the company\"},{\"key\":\"_invoice_number\",\"description\":\"Invoice number\"},{\"key\":\"_total_amount\",\"description\":\"Total amount with currency\"}]"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract invoice","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP template name. Default: invoice (English). For localized versions use the dedicated tools (e.g. the German/DATEV-optimized extraction profile in Document AI). Advanced: append :lang:LOCALE for custom localization e.g. invoice:fr:FR","default":"invoice"},"idp_fields":{"type":"string","description":"OPTIONAL: Additional fields as JSON, e.g., {\"key\":\"has_stamp\",\"description\":\"Is there a stamp?\"}","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract invoice (German/DATEV-optimized)","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"invoice:de = German output, invoice:en = English, invoice:es = Spanish","default":"invoice:de"},"idp_fields":{"type":"string","description":"OPTIONAL: Additional fields as JSON","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract invoice basic fields","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"basic"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"idp_light"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract statement of account","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"statement_of_account"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract utility bill","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"utility_bill"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract letter or mail","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"letter_mail"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract receipt","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"receipt"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract delivery note","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"delivery_note"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract purchase order","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"order"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract shipping waybill","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"shipping_waybill"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract construction plan/blueprint","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"ultra"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"construction_plan"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Extract vehicle registration","type":"object","properties":{"file_1":{"type":"string","format":"binary","description":"Multipart file upload (PDF or image). At least one document input is required."},"model":{"type":"string","description":"AI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI thinking, Ultra=+AI reasoning. pro/pro-max variants add higher page limits.","enum":["basic","basic-pro","basic-pro-max","premium","premium-pro","premium-pro-max","ultra","ultra-pro","ultra-pro-max"],"default":"premium"},"idp_collection":{"type":"string","description":"IDP collection slug for workflow discrimination (e.g. invoice, receipt, bank_check).","default":"vehicle_license"},"idp_fields":{"type":"string","description":"OPTIONAL: Extra fields as JSON array","default":""},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["model","file_1"]},{"title":"Split PDF via AI","type":"object","properties":{"file":{"type":"string","description":"PDF file to analyze and split"},"template":{"type":"string","description":"Workflow template (required discriminator for this tool).","default":"pdf_ai_split"},"naming_instruction":{"type":"string","description":"Naming pattern for output files optional","default":"documenttyp_Datum_Absender"},"locale":{"type":"string","description":"Locale for ALL output: 'de_DE', 'en_US', 'fr_FR' - affects document_type, reasoning, filenames","default":"de_DE"},"document_types":{"type":"string","description":"Allowed types, comma-separated: 'invoice,Schreiben,quote' optional","default":""},"date_format":{"type":"string","description":"Date format: 'YYYY-MM-DD', 'DD.MM.YYYY', 'MM/DD/YYYY' optional","default":"DD.MM.YYYY"},"model":{"type":"string","description":"Split tier — decides content and price: 'basic' = document boundaries and file names; 'premium' = plus the response fields document_type, date and sender per document; 'ultra' = plus reasoning. Default: basic. The former fields include_document_type, include_date, include_sender and include_reasoning are ignored since 17.10.2026 — the tier decides. PDF AI Split always runs asynchronously (client_wait is ignored) — poll GET /job/get/{job_id}.","enum":["basic","premium","ultra"],"default":"basic"},"priority":{"type":"integer","description":"Legacy, internal compatibility only. Do not send; use processing_lane.","minimum":0,"maximum":900,"deprecated":true},"client_wait":{"type":"boolean","description":"Connection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Force async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.","default":false},"processing_lane":{"type":"string","description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128},"pofid":{"type":"string","description":"Existing document POFID as an alternative to multipart upload (`file` / `file_1` / `files`). JSON `files` URL arrays are not supported on `/job/add/workflow`."}},"required":["file"]},{"title":"Anonymize document (single-step)","type":"object","properties":{"template":{"type":"string","description":"Must be document_anonymize (detect + redact + PDF in one workflow).","default":"document_anonymize"},"file":{"type":"string","description":"PDF or image to anonymize (multipart file)"},"pofid":{"type":"string","description":"Or existing DMS POFID","default":""},"redact_categories":{"type":"string","description":"all | none | CSV category list","default":"all"},"whitelist":{"type":"string","description":"Terms that must NEVER be redacted (e.g. your own company). Separate entries by line break, comma or semicolon; entries match whole words only. A whitelist entry overrides custom_redact only for exactly the same text.","default":""},"custom_redact":{"type":"string","description":"Terms that must ALWAYS be redacted. Separate entries by line break, semicolon or comma; a comma between two digits stays part of the term (e.g. \"18,5 %\", \"1,000\"). Matching is substring-based and ignores case and accents; the whole line or table cell containing the term is redacted (if the same line also contains a whitelist text, only the term itself).","default":""},"custom_instructions":{"type":"string","description":"Free-text AI policy","default":""},"scenario":{"type":"string","description":"Redaction policy scenario (default gdpr_disclosure). Scenarios: gdpr_disclosure, external_sharing, public_publication, court_proceedings, whistleblower, internal_audit, medical_records, anonymous_application, hr_personnel_file, research, financial_data, contact_data, custom. Controls visibility floors (e.g. GDPR subject-access whitelist vs external sharing). Legacy internal keys (gdpr_auskunft, externe_weitergabe, oeffentliche_publikation, gerichtsverfahren, whistleblower_hinschg, interne_revision, medizinische_unterlagen, anonyme_bewerbung, personalakte_hr, forschung_wissenschaft, finanzdaten, kontaktdaten, benutzerdefiniert) are still accepted.","enum":["gdpr_disclosure","external_sharing","public_publication","court_proceedings","whistleblower","internal_audit","medical_records","anonymous_application","hr_personnel_file","research","financial_data","contact_data","custom","gdpr_auskunft","externe_weitergabe","oeffentliche_publikation","gerichtsverfahren","whistleblower_hinschg","interne_revision","medizinische_unterlagen","anonyme_bewerbung","personalakte_hr","forschung_wissenschaft","finanzdaten","kontaktdaten","benutzerdefiniert"],"default":"gdpr_disclosure"},"model":{"type":"string","description":"Required. Anonymize model tier: basic | premium | ultra — list price per page 300 / 500 / 900 credits, multiplied by the processing_lane factor. Without model the request is rejected with 400 MODEL_REQUIRED before billing; unknown values with 400 INVALID_MODEL.","enum":["basic","premium","ultra"]},"redact_mode":{"type":"string","description":"blackout (default): black boxes. pseudonymize: identifiers (names, contacts, IBAN/BIC, IDs, birth dates/places, addresses, companies) are replaced by consistent fictitious values so the document stays readable for external chat; Art. 9/criminal/credential data and job titles stay black; amounts stay visible. Requires model=ultra. Not available for whistleblower, court_proceedings, public_publication and anonymous_application (400 REDACT_MODE_LOCKED). Result adds detected_pii.redact_mode, detected_pii.pseudonym_meta and detected_pii.pseudonym_mapping (original -> replacement, for the controller only, never inside the PDF).","enum":["blackout","pseudonymize"],"default":"blackout"},"priority":{"type":"integer","description":"Queue priority (1–900). Omit = plan default. 900 = sync when capacity allows.","minimum":0,"maximum":900},"client_wait":{"type":"boolean","description":"Connection hold: true = hold HTTP until done (dynamic timeout, cap about 295s) or 202+job_id; false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id}.","default":false},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128}},"required":["file","model"]},{"title":"Detect PII preview","type":"object","properties":{"template":{"type":"string","description":"Must be document_anonymize_preview (PDF→PNG→OCR→PII detect, no PDF output).","default":"document_anonymize_preview"},"file":{"type":"string","description":"PDF or image file (PNG/JPG) via multipart field file"},"pofid":{"type":"string","description":"Optional DMS document ID instead of file","default":""},"redact_categories":{"type":"string","description":"all | none | CSV: names,addresses,phone,email,iban,tax_ids,dates,financial,contact,identity","default":"all"},"whitelist":{"type":"string","description":"Terms that must NEVER be redacted (e.g. your own company). Separate entries by line break, comma or semicolon; entries match whole words only. A whitelist entry overrides custom_redact only for exactly the same text.","default":""},"custom_redact":{"type":"string","description":"Terms that must ALWAYS be redacted. Separate entries by line break, semicolon or comma; a comma between two digits stays part of the term (e.g. \"18,5 %\", \"1,000\"). Matching is substring-based and ignores case and accents; the whole line or table cell containing the term is redacted (if the same line also contains a whitelist text, only the term itself).","default":""},"custom_instructions":{"type":"string","description":"Free-text policy for the AI","default":""},"scenario":{"type":"string","description":"Redaction policy scenario (default gdpr_disclosure). Scenarios: gdpr_disclosure, external_sharing, public_publication, court_proceedings, whistleblower, internal_audit, medical_records, anonymous_application, hr_personnel_file, research, financial_data, contact_data, custom. Controls visibility floors (e.g. GDPR subject-access whitelist vs external sharing). Legacy internal keys (gdpr_auskunft, externe_weitergabe, oeffentliche_publikation, gerichtsverfahren, whistleblower_hinschg, interne_revision, medizinische_unterlagen, anonyme_bewerbung, personalakte_hr, forschung_wissenschaft, finanzdaten, kontaktdaten, benutzerdefiniert) are still accepted.","enum":["gdpr_disclosure","external_sharing","public_publication","court_proceedings","whistleblower","internal_audit","medical_records","anonymous_application","hr_personnel_file","research","financial_data","contact_data","custom","gdpr_auskunft","externe_weitergabe","oeffentliche_publikation","gerichtsverfahren","whistleblower_hinschg","interne_revision","medizinische_unterlagen","anonyme_bewerbung","personalakte_hr","forschung_wissenschaft","finanzdaten","kontaktdaten","benutzerdefiniert"],"default":"gdpr_disclosure"},"model":{"type":"string","description":"Required. Anonymize model tier: basic | premium | ultra — list price per page 300 / 500 / 900 credits, multiplied by the processing_lane factor. Without model the request is rejected with 400 MODEL_REQUIRED before billing; unknown values with 400 INVALID_MODEL.","enum":["basic","premium","ultra"]},"redact_mode":{"type":"string","description":"blackout (default): black boxes. pseudonymize: identifiers (names, contacts, IBAN/BIC, IDs, birth dates/places, addresses, companies) are replaced by consistent fictitious values so the document stays readable for external chat; Art. 9/criminal/credential data and job titles stay black; amounts stay visible. Requires model=ultra. Not available for whistleblower, court_proceedings, public_publication and anonymous_application (400 REDACT_MODE_LOCKED). Result adds detected_pii.redact_mode, detected_pii.pseudonym_meta and detected_pii.pseudonym_mapping (original -> replacement, for the controller only, never inside the PDF).","enum":["blackout","pseudonymize"],"default":"blackout"},"priority":{"type":"integer","description":"Queue priority (1–900). Omit = plan default. 900 = sync when capacity allows.","minimum":0,"maximum":900},"client_wait":{"type":"boolean","description":"Connection hold: true = hold HTTP until done (dynamic timeout, cap about 295s) or 202+job_id; false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id}.","default":false},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128}},"required":["file","model"]},{"title":"Finalize anonymize (workflow)","type":"object","properties":{"template":{"type":"string","description":"Must be document_anonymize_finalize (no OCR/LLM — apply boxes to preview images).","default":"document_anonymize_finalize"},"preview_images":{"type":"string","description":"JSON array of preview page image URLs from document_anonymize_preview"},"preview_bounding_boxes":{"type":"string","description":"OCR/bounding geometry from preview"},"redact_boxes":{"type":"string","description":"Boxes to redact (often user-edited after HITL review)"},"partial_regions":{"type":"string","description":"Optional: detected_pii.partial_regions from the preview (fragment rectangles and pseudonymization regions); without it only whole boxes are redacted","default":""},"priority":{"type":"integer","description":"Queue priority (1–900). Omit = plan default. 900 = sync when capacity allows.","minimum":0,"maximum":900},"client_wait":{"type":"boolean","description":"Connection hold: true = hold HTTP until done (dynamic timeout, cap about 295s) or 202+job_id; false = immediate job_id.","default":true},"async_only":{"type":"boolean","description":"Same as client_wait=false: immediate job_id — poll GET /job/get/{job_id}.","default":false},"idempotency_key":{"type":"string","description":"OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).","minLength":8,"maxLength":128}},"required":["preview_images","preview_bounding_boxes","redact_boxes"]}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/download/{download_token}":{"get":{"operationId":"po-jobs-download-result","summary":"Download Job Result","tags":["Workflow AI — Job Management"],"description":"Download the result file of a completed job. The download_token is returned in the job result from /job/get/{job_id} when the job status is \"completed\". The token is temporary and expires. Supported result types: images (PNG/JPG/WebP)...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-jobs-download-result.md"},"parameters":[{"name":"download_token","in":"path","required":true,"schema":{"type":"string"},"description":"Temporary download token from the job result (returned by /job/get/{job_id})"}],"responses":{"200":{"description":"File content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"Binary file content. Content-Type header indicates format (image/png, application/pdf, audio/mpeg, etc.)"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/get/{job_id}":{"get":{"operationId":"po-jobs-get-job-status-result","summary":"Get job status and result","tags":["Workflow AI — Job Management"],"description":"Use after async submissions (HTTP 202, connection hold timeout, or client_wait=false). Returns envelope status: \"success\" and job_status (pending, processing, completed, failed), progress metadata, and the result payload when finished.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-jobs-get-job-status-result.md"},"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string"},"description":"Opaque job ID returned by a prior async submit."},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"When true (default), omit large OCR/preview blobs. Workflow/IDP payload is in `result` (`pages_idp`, `pages_aiocr` remain); OCR payload is in `job_result`. Set false for full output."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Job status query response (for polling)","properties":{"status":{"type":"string","description":"Request status (ok/error)","enum":["success","error"]},"job_id":{"type":"string","description":"Pipeline job ID"},"job_status":{"type":"string","description":"Job status","enum":["waiting","processing","completed","failed","timeout"]},"progress":{"type":"number","description":"0-100"},"result":{"type":"object"},"queue_position":{"type":"number","description":"Position in the queue (when waiting)"},"estimated_time_ms":{"type":"number","description":"Estimated time ms"},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"job_type":{"type":"string","description":"Job type"},"pipeline":{"type":"string","description":"Pipeline"},"operation":{"type":"string","description":"Operation"},"model":{"type":"string","description":"Model"},"current_step":{"type":"string","description":"Current step"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/job/pricelist":{"get":{"operationId":"po-jobs-get-pricelist","summary":"Get pricelist","tags":["Workflow AI — Job Management"],"description":"Returns all available job pipelines with credit costs and billing units. Keys are pipeline names (e.g. paperoffice_aiocr___generate, paperoffice_imagestudio___generate, paperoffice_voice___tts). Image Studio uses one pipeline with...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-jobs-get-pricelist.md"},"parameters":[{"name":"processing_lane","in":"query","required":false,"schema":{"type":"string","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Complete price list with tiers, priority system, and add-ons","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"},"credits_billed":{"type":"integer"},"pricing":{"type":"object","properties":{"credits_per_unit":{"type":"integer"},"unit":{"type":"string"},"unit_count":{"type":"integer"},"addons":{"type":"string"}}}}},"credits_billed":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}}}},"global_addons":{"type":"object"},"meta":{"type":"object","properties":{"pricing_rule":{"type":"string"},"last_updated":{"type":"string"}}},"pricelist":{"type":"object","properties":{"paperoffice_aiocr___generate":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"},"addons":{"type":"object","properties":{"ocr_premium":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"request_param":{"type":"string"},"applies_when":{"type":"string"}}},"ocr_ultra":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"request_param":{"type":"string"},"applies_when":{"type":"string"}}},"ocr_grid_legacy":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"request_param":{"type":"string"},"applies_when":{"type":"string"}}},"ocr_complete_legacy":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"request_param":{"type":"string"},"applies_when":{"type":"string"}}},"ocr_bounding_boxes_legacy":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"request_param":{"type":"string"},"applies_when":{"type":"string"}}},"ocr_full_legacy":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"request_param":{"type":"string"},"applies_when":{"type":"string"}}}}}}},"paperoffice_aiocr___generate___premium":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_aiocr___generate___ultra":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_dataripper___email_parser":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_dataripper___redact_image":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_imagestudio___generate":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_imagestudio___remove_bg":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_voice___stt":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_voice___stt___basic":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_voice___stt___premium":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_voice___stt___ultra":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_voice___tts":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"},"tier_variants":{"type":"object","properties":{"basic":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"}}},"premium":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"}}},"ultra":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"}}},"voices_info":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"}}}}}}},"paperoffice_voice___tts___basic":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_voice___tts___premium":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_voice___tts___ultra":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"paperoffice_voice___tts___voices_info":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___compress_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___ebook_to_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___edit_metadata_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___image_to_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___lock_with_password_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___merge_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___office_to_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___pdf_to_excel":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___pdf_to_jpg":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"},"billing_key":{"type":"string"}}},"pdfstudio___pdf_to_pdfa":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___pdf_to_powerpoint":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___pdf_to_webp":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"},"billing_key":{"type":"string"}}},"pdfstudio___pdf_to_word":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___remove_restrictions_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___rotate_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___split_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___unlock_with_password_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___url_to_pdf":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}},"pdfstudio___whitepage_scan":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"require_paid_tier":{"type":"boolean"}}}}},"processing_time":{"type":"string"},"resource_billing":{"type":"object","properties":{"degressive_discount_by_tier":{"type":"object","properties":{"APP-FREE":{"type":"integer"},"APP-LITE":{"type":"integer"},"APP-T1":{"type":"integer"},"APP-T2":{"type":"number"},"APP-T3":{"type":"number"},"APP-T4":{"type":"number"},"APP-T5":{"type":"number"}}},"workspace":{"type":"object","properties":{"base_cost_eur_monthly":{"type":"integer"},"base_cost_credits_monthly":{"type":"integer"},"billing_method":{"type":"string"},"_price_by_tier":{"type":"object","properties":{"T1":{"type":"string"},"T2":{"type":"string"},"T3":{"type":"string"},"T4":{"type":"string"},"T5":{"type":"string"}}},"type_pricing_ref":{"type":"string"}}},"user_account":{"type":"object","properties":{"base_cost_eur_monthly":{"type":"integer"},"base_cost_credits_monthly":{"type":"integer"},"billing_method":{"type":"string"},"_price_by_tier":{"type":"object","properties":{"T1":{"type":"string"},"T2":{"type":"string"},"T3":{"type":"string"},"T4":{"type":"string"},"T5":{"type":"string"}}}}},"storage_mount":{"type":"object","properties":{"base_cost_eur_monthly":{"type":"integer"},"base_cost_credits_monthly":{"type":"integer"},"billing_method":{"type":"string"},"_price_by_tier":{"type":"object","properties":{"T1":{"type":"string"},"T2":{"type":"string"},"T3":{"type":"string"},"T4":{"type":"string"},"T5":{"type":"string"}}}}},"billing_schedule":{"type":"object","properties":{"frequency":{"type":"string"},"trigger":{"type":"string"},"cronjob":{"type":"string"}}}}},"status":{"type":"string"},"support_actions":{"type":"object","properties":{"email_ticket":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"available_in":{"type":"array","items":{}},"support_level":{"type":"integer"},"support_level_description":{"type":"string"},"max_messages":{"type":"integer"},"max_case_duration_days":{"type":"integer"}}},"chat_session_15min":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"available_in":{"type":"array","items":{}},"support_level":{"type":"integer"},"support_level_description":{"type":"string"},"duration_minutes":{"type":"integer"}}},"support_call_30min":{"type":"object","properties":{"credits":{"type":"integer"},"unit":{"type":"string"},"description":{"type":"string"},"available_in":{"type":"array","items":{}},"support_level":{"type":"integer"},"support_level_description":{"type":"string"},"duration_minutes":{"type":"integer"},"includes":{"type":"array","items":{}}}}}},"tiers":{"type":"object","properties":{"app_tiers":{"type":"object","properties":{"APP-T1":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"credits_monthly":{"type":"integer"},"price_monthly":{"type":"integer"},"resources":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"},"included_type":{"type":"string"},"available_types":{"type":"array","items":{}}}},"user_accounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}},"storage_mounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}}}},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}},"features":{"type":"object","properties":{"all_ai_functions":{"type":"boolean"},"api_access":{"type":"boolean"},"webhooks":{"type":"boolean"},"custom_integrations":{"type":"boolean"},"trust_center":{"type":"boolean"},"sso_saml":{"type":"boolean"},"audit_logs":{"type":"boolean"}}},"badge":{"type":"string"}}},"APP-T2":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"credits_monthly":{"type":"integer"},"price_monthly":{"type":"integer"},"resources":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"},"included_type":{"type":"string"},"available_types":{"type":"array","items":{}}}},"user_accounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}},"storage_mounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}}}},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}},"features":{"type":"object","properties":{"all_ai_functions":{"type":"boolean"},"api_access":{"type":"boolean"},"webhooks":{"type":"boolean"},"custom_integrations":{"type":"boolean"},"trust_center":{"type":"boolean"},"sso_saml":{"type":"boolean"},"audit_logs":{"type":"boolean"}}},"badge":{"type":"string"}}},"APP-T3":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"credits_monthly":{"type":"integer"},"price_monthly":{"type":"integer"},"resources":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"},"included_type":{"type":"string"},"available_types":{"type":"array","items":{}}}},"user_accounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}},"storage_mounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}}}},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}},"features":{"type":"object","properties":{"all_ai_functions":{"type":"boolean"},"api_access":{"type":"boolean"},"webhooks":{"type":"boolean"},"custom_integrations":{"type":"boolean"},"trust_center":{"type":"boolean"},"sso_saml":{"type":"boolean"},"audit_logs":{"type":"boolean"}}},"badge":{"type":"string"}}},"APP-T4":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"credits_monthly":{"type":"integer"},"price_monthly":{"type":"integer"},"resources":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"},"included_type":{"type":"string"},"available_types":{"type":"array","items":{}}}},"user_accounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}},"storage_mounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}}}},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}},"features":{"type":"object","properties":{"all_ai_functions":{"type":"boolean"},"api_access":{"type":"boolean"},"webhooks":{"type":"boolean"},"custom_integrations":{"type":"boolean"},"trust_center":{"type":"boolean"},"sso_saml":{"type":"boolean"},"audit_logs":{"type":"boolean"}}},"badge":{"type":"string"}}},"APP-T5":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"credits_monthly":{"type":"integer"},"price_monthly":{"type":"integer"},"resources":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"},"included_type":{"type":"string"},"available_types":{"type":"array","items":{}}}},"user_accounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}},"storage_mounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}}}},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}},"features":{"type":"object","properties":{"all_ai_functions":{"type":"boolean"},"api_access":{"type":"boolean"},"webhooks":{"type":"boolean"},"custom_integrations":{"type":"boolean"},"trust_center":{"type":"boolean"},"sso_saml":{"type":"boolean"},"audit_logs":{"type":"boolean"},"custom_contracts":{"type":"boolean"},"data_residency":{"type":"boolean"}}},"badge":{"type":"string"}}},"APP-T6":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"credits_monthly":{"type":"integer"},"price_monthly":{"type":"integer"},"resources":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"},"included_type":{"type":"string"},"available_types":{"type":"array","items":{}}}},"user_accounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}},"storage_mounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"base_cost_eur":{"type":"integer"},"cost_eur_with_discount":{"type":"integer"}}}}},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}},"features":{"type":"object","properties":{"all_ai_functions":{"type":"boolean"},"api_access":{"type":"boolean"},"webhooks":{"type":"boolean"},"custom_integrations":{"type":"boolean"},"trust_center":{"type":"boolean"},"sso_saml":{"type":"boolean"},"audit_logs":{"type":"boolean"},"custom_contracts":{"type":"boolean"},"data_residency":{"type":"boolean"},"dedicated_tam":{"type":"boolean"},"white_glove_onboarding":{"type":"boolean"},"quarterly_business_reviews":{"type":"boolean"}}},"badge":{"type":"string"}}}}},"free_tiers":{"type":"object","properties":{"VPN":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"requests_per_second":{"type":"integer"},"requests_per_minute":{"type":"integer"},"requests_per_hour":{"type":"integer"},"requests_per_day":{"type":"integer"}}}}},"VISITOR":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"requests_per_second":{"type":"integer"},"requests_per_minute":{"type":"integer"},"requests_per_hour":{"type":"integer"},"requests_per_day":{"type":"integer"}}}}},"APP-LITE":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"requests_per_second":{"type":"integer"},"requests_per_minute":{"type":"integer"},"requests_per_hour":{"type":"integer"},"requests_per_day":{"type":"integer"}}}}},"API-T1":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}}}},"API-T2":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}}}},"API-T3":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}}}},"API-T4":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}}}},"API-T5":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}}}},"SLA-T1":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}}}},"SLA-T2":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}}}},"SLA-T3":{"type":"object","properties":{"name":{"type":"string"},"credits_monthly":{"type":"integer"},"rate_limits":{"type":"object","properties":{"second":{"type":"integer"},"minute":{"type":"integer"},"hour":{"type":"integer"},"day":{"type":"integer"}}}}}}},"app_free":{"type":"object","properties":{"APP-FREE":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"credits_monthly":{"type":"integer"},"price_monthly":{"type":"integer"},"resources":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"cost_per_additional_credits":{"type":"integer"},"included_type":{"type":"string"},"available_types":{"type":"array","items":{}}}},"user_accounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"cost_per_additional_credits":{"type":"integer"}}},"storage_mounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"cost_per_additional_credits":{"type":"integer"}}}}},"rate_limits":{"type":"object","properties":{"requests_per_second":{"type":"integer"},"requests_per_minute":{"type":"integer"},"requests_per_hour":{"type":"integer"},"requests_per_day":{"type":"integer"}}},"trial_days":{"type":"string"}}},"APP-FREE-BOOST":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"credits_monthly":{"type":"integer"},"price_monthly":{"type":"integer"},"resources":{"type":"object","properties":{"workspaces":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"cost_per_additional_credits":{"type":"integer"},"included_type":{"type":"string"},"available_types":{"type":"array","items":{}}}},"user_accounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"cost_per_additional_credits":{"type":"integer"}}},"storage_mounts":{"type":"object","properties":{"included":{"type":"integer"},"allow_additional":{"type":"boolean"},"cost_per_additional_credits":{"type":"integer"}}}}},"rate_limits":{"type":"object","properties":{"requests_per_second":{"type":"integer"},"requests_per_minute":{"type":"integer"},"requests_per_hour":{"type":"integer"},"requests_per_day":{"type":"integer"}}},"trial_days":{"type":"integer"}}}}}}},"units":{"type":"object","properties":{"page":{"type":"string"},"file":{"type":"string"},"minute":{"type":"string"},"image":{"type":"string"},"screenshot":{"type":"string"},"request":{"type":"string"},"tile":{"type":"string"},"case":{"type":"string"},"session":{"type":"string"},"poll":{"type":"string"},"per_million_requests":{"type":"string"}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/knowledge_graph/business_case":{"get":{"operationId":"po-knowledge-graph-business-case-get","summary":"Get business case graph","tags":["Analytics AI — Knowledge Graph"],"description":"Business case analysis — all documents belonging to a reference/transaction (invoice number, order number, contract). Shows timeline, graph and involved partners.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-business-case-get.md"},"parameters":[{"name":"reference","in":"query","required":true,"schema":{"type":"string"},"description":"Reference/transaction number (e.g. invoice number, order number, contract number)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/knowledge_graph/partner/{partner_name}":{"get":{"operationId":"po-knowledge-graph-partner-detail-get","summary":"Get partner graph detail","tags":["Analytics AI — Knowledge Graph"],"description":"Detailed view of a single business partner — all documents, business cases, graph connections, statistics. 360-degree partner view.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-partner-detail-get.md"},"parameters":[{"name":"partner_name","in":"path","required":true,"schema":{"type":"string"},"description":"Business partner name (exact or similar)"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/knowledge_graph/partners":{"get":{"operationId":"po-knowledge-graph-partners","summary":"List knowledge graph business partners","tags":["Analytics AI — Knowledge Graph"],"description":"List business partners extracted from the Knowledge Graph — companies and persons linked across documents, with relationship strength and document counts.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-partners.md"},"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Max number of partners (default: 50)."},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","enum":["document_count","total_amount","name"]},"description":"sorting"},{"name":"entity_type","in":"query","required":false,"schema":{"type":"string","enum":["company","person","all"]},"description":"Filter by type"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Optional workspace filter."},{"name":"query","in":"query","required":false,"schema":{"type":"string"},"description":"Optional name filter (substring match)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Knowledge-Graph-Partner","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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"aggregation_scope":{"type":"object","properties":{"partner_key":{"type":"string"},"amount_definition":{"type":"string"},"date_basis":{"type":"string"},"workspace_scope":{"type":"string"}}},"has_more":{"type":"boolean"},"limit":{"type":"integer"},"metric_definitions":{"type":"object","properties":{"total":{"type":"string"},"document_count":{"type":"string"},"document_types":{"type":"string"}}},"offset":{"type":"integer"},"partners":{"type":"array","items":{}},"processing_time":{"type":"string"},"query":{"type":"string"},"sort_by":{"type":"string"},"status":{"type":"string"},"total":{"type":"integer"},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/knowledge_graph/references":{"get":{"operationId":"po-knowledge-graph-references-get","summary":"List reference numbers","tags":["Analytics AI — Knowledge Graph"],"description":"Reference network — all detected reference numbers (invoice, order, contract numbers) and how many documents they connect.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-references-get.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"Reference type: invoice_number, order_number, contract_number"},{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":100},"description":"Max results (1-500)"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"processing_time":{"type":"string"},"reference_type":{"type":"string"},"references":{"type":"array","items":{}},"status":{"type":"string"},"tier":{"type":"string"},"total":{"type":"integer"},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/knowledge_graph/stats":{"get":{"operationId":"po-knowledge-graph-stats-get","summary":"Get knowledge graph statistics (KG counts)","tags":["Analytics AI — Knowledge Graph"],"description":"Returns knowledge graph statistics — document, relation, and entity counts, breakdowns by relation and entity type, and available feature flags for the workspace.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-stats-get.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string"},"description":"Optional: Filter by workspace"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Graph-Statistiken","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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"available_view_keys":{"type":"array","items":{}},"available_views":{"type":"object","properties":{"partners":{"type":"object","properties":{"key":{"type":"string"},"label_de":{"type":"string"}}},"workspace":{"type":"object","properties":{"key":{"type":"string"},"label_de":{"type":"string"}}},"document":{"type":"object","properties":{"key":{"type":"string"},"label_de":{"type":"string"}}},"business_case":{"type":"object","properties":{"key":{"type":"string"},"label_de":{"type":"string"}}},"timeline":{"type":"object","properties":{"key":{"type":"string"},"label_de":{"type":"string"}}},"references":{"type":"object","properties":{"key":{"type":"string"},"label_de":{"type":"string"}}}}},"processing_time":{"type":"string"},"stats":{"type":"object","properties":{"total_documents":{"type":"integer"},"documents_with_partner":{"type":"integer"},"unique_partners":{"type":"integer"},"documents_with_references":{"type":"integer"},"type_distribution":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"count":{"type":"integer"},"aliases":{"type":"array","items":{}}}}},"stock_document_count":{"type":"integer"},"stock_count_basis":{"type":"string"},"type_source":{"type":"string"},"canonical_map":{"type":"string"},"relationship_types":{"type":"array","items":{}},"total_edges":{"type":"integer"},"relationship_types_status":{"type":"string"},"graph_node_count":{"type":"integer"},"graph_node_count_status":{"type":"string"},"total_nodes":{"type":"integer"},"total_nodes_status":{"type":"string"},"metric_definitions":{"type":"object","properties":{"type_distribution":{"type":"string"},"unique_partners":{"type":"string"},"graph_node_count":{"type":"string"}}},"aggregation_scope":{"type":"string"}}},"status":{"type":"string"},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/knowledge_graph/timeline":{"get":{"operationId":"po-knowledge-graph-timeline-get","summary":"Get document timeline","tags":["Analytics AI — Knowledge Graph"],"description":"Chronological timeline — documents and events sorted by date, filterable by partner and workspace.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-timeline-get.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit to workspace"},{"name":"partner","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by business partner"},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"Start date (YYYY-MM-DD)"},{"name":"to","in":"query","required":false,"schema":{"type":"string"},"description":"End date (YYYY-MM-DD)"},{"name":"limit","in":"query","required":false,"schema":{"type":"number","default":50},"description":"Max results (1-200)"},{"name":"offset","in":"query","required":false,"schema":{"type":"number","default":0},"description":"Pagination offset"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"date_range":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"partner_filter":{"type":"string"},"processing_time":{"type":"string"},"stats":{"type":"object","properties":{"by_month":{"type":"object","properties":{"2026-03":{"type":"integer"}}},"by_type":{"type":"object","properties":{"[\"other\"]":{"type":"integer"}}},"by_partner":{"type":"object","properties":{"Unbekannt":{"type":"integer"}}}}},"status":{"type":"string"},"tier":{"type":"string"},"timeline":{"type":"array","items":{"type":"object","properties":{"documents_id":{"type":"integer"},"pofid":{"type":"string"},"file_name":{"type":"string"},"date":{"type":"string"},"document_type":{"type":"string"},"partner":{"type":"string"},"amount":{"type":"string"},"thumbnail_url":{"type":"string"}}}},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/knowledge_graph/types":{"get":{"operationId":"po-knowledge-graph-types-get","summary":"List knowledge graph types","tags":["Analytics AI — Knowledge Graph"],"description":"Available relationship, document and reference types in the knowledge graph. Schema/vocabulary reference.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-types-get.md"},"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"document_types":{"type":"object","properties":{"invoice":{"type":"object","properties":{"label":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}}},"quote":{"type":"object","properties":{"label":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}}},"contract":{"type":"object","properties":{"label":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}}},"delivery_note":{"type":"object","properties":{"label":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}}},"order":{"type":"object","properties":{"label":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}}},"letter":{"type":"object","properties":{"label":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}}},"document":{"type":"object","properties":{"label":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}}}}},"processing_time":{"type":"string"},"reference_types":{"type":"object","properties":{"invoice_number":{"type":"string"},"order_number":{"type":"string"},"contract_number":{"type":"string"},"customer_number":{"type":"string"},"delivery_number":{"type":"string"},"quote_number":{"type":"string"},"project_number":{"type":"string"}}},"relation_types":{"type":"object","properties":{"same_partner":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"same_reference":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"business_flow":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"invoice_for":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"quote_for":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"delivery_for":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"contract_with":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"order_for":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"payment_for":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"related_to":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}},"duplicate_candidate":{"type":"object","properties":{"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"}}}}},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/knowledge_graph/universe":{"get":{"operationId":"po-knowledge-graph-universe-get","summary":"Get knowledge graph universe","tags":["Analytics AI — Knowledge Graph"],"description":"Sampled knowledge-graph view for visualization — not an unbounded export of every document.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-knowledge-graph-universe-get.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"number"},"description":"Limit graph to one workspace (required for sub-users)."},{"name":"max_nodes","in":"query","required":false,"schema":{"type":"number","default":100},"description":"Maximum graph nodes sampled (1–300, default 100)."},{"name":"similarity_threshold","in":"query","required":false,"schema":{"type":"number","default":0.65},"description":"Embedding similarity threshold (0.0–1.0)."},{"name":"include_embeddings","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"Include embedding similarity edges."},{"name":"include_entities","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"Include entity nodes."},{"name":"include_relations","in":"query","required":false,"schema":{"type":"boolean","default":true},"description":"Include document relation edges."},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Compact mode: strip verbose node/edge metadata (about 70% smaller)."}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}}}},"clusters":{"type":"object","properties":{"by_type":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"},"label":{"type":"string"},"color":{"type":"string"},"icon":{"type":"string"},"count":{"type":"integer"},"doc_ids":{"type":"array","items":{}}}}},"by_partner":{"type":"array","items":{}}}},"data_sources":{"type":"object","properties":{"documents":{"type":"integer"},"meta_fields":{"type":"integer"},"embeddings":{"type":"integer"},"entities":{"type":"integer"},"relations":{"type":"integer"},"embedding_edges":{"type":"integer"},"entity_edges":{"type":"integer"},"relation_edges":{"type":"integer"},"meta_edges":{"type":"integer"}}},"graph":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"shape":{"type":"string"},"color":{"type":"object","properties":{"background":{"type":"string"},"border":{"type":"string"},"highlight":{"type":"object","properties":{"background":{"type":"string"},"border":{"type":"string"}}},"hover":{"type":"object","properties":{"background":{"type":"string"},"border":{"type":"string"}}}}},"borderWidth":{"type":"integer"},"font":{"type":"object","properties":{"size":{"type":"integer"},"face":{"type":"string"},"color":{"type":"string"},"multi":{"type":"string"}}},"margin":{"type":"object","properties":{"top":{"type":"integer"},"bottom":{"type":"integer"},"left":{"type":"integer"},"right":{"type":"integer"}}},"widthConstraint":{"type":"object","properties":{"minimum":{"type":"integer"},"maximum":{"type":"integer"}}},"shadow":{"type":"object","properties":{"enabled":{"type":"boolean"},"color":{"type":"string"},"size":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}}},"data":{"type":"object","properties":{"documents_id":{"type":"integer"},"pofid":{"type":"string"},"file_name":{"type":"string"},"document_type":{"type":"string"},"type_info":{"type":"object","properties":{"label":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}}},"partner":{"type":"string"},"amount":{"type":"string"},"currency":{"type":"string"},"created_datetime":{"type":"string"},"total_pages":{"type":"integer"},"references":{"type":"array","items":{}},"entities":{"type":"array","items":{}},"has_embedding":{"type":"boolean"},"thumbnail_url":{"type":"string"}}}}}},"edges":{"type":"array","items":{}},"options":{"type":"object","properties":{"nodes":{"type":"object","properties":{"shape":{"type":"string"},"margin":{"type":"object","properties":{"top":{"type":"integer"},"bottom":{"type":"integer"},"left":{"type":"integer"},"right":{"type":"integer"}}},"widthConstraint":{"type":"object","properties":{"minimum":{"type":"integer"},"maximum":{"type":"integer"}}},"font":{"type":"object","properties":{"size":{"type":"integer"},"face":{"type":"string"},"color":{"type":"string"},"multi":{"type":"string"}}},"borderWidth":{"type":"integer"},"shadow":{"type":"object","properties":{"enabled":{"type":"boolean"},"color":{"type":"string"},"size":{"type":"integer"},"x":{"type":"integer"},"y":{"type":"integer"}}}}},"edges":{"type":"object","properties":{"font":{"type":"object","properties":{"size":{"type":"integer"},"align":{"type":"string"},"color":{"type":"string"}}},"smooth":{"type":"object","properties":{"type":{"type":"string"},"roundness":{"type":"number"}}},"hoverWidth":{"type":"integer"}}},"physics":{"type":"object","properties":{"enabled":{"type":"boolean"},"solver":{"type":"string"},"forceAtlas2Based":{"type":"object","properties":{"gravitationalConstant":{"type":"integer"},"centralGravity":{"type":"number"},"springLength":{"type":"integer"},"springConstant":{"type":"number"},"damping":{"type":"number"},"avoidOverlap":{"type":"number"}}},"stabilization":{"type":"object","properties":{"enabled":{"type":"boolean"},"iterations":{"type":"integer"},"updateInterval":{"type":"integer"},"fit":{"type":"boolean"}}},"minVelocity":{"type":"number"}}},"interaction":{"type":"object","properties":{"hover":{"type":"boolean"},"tooltipDelay":{"type":"integer"},"hideEdgesOnDrag":{"type":"boolean"},"selectConnectedEdges":{"type":"boolean"},"navigationButtons":{"type":"boolean"},"keyboard":{"type":"object","properties":{"enabled":{"type":"boolean"},"bindToWindow":{"type":"boolean"}}},"zoomSpeed":{"type":"number"}}},"layout":{"type":"object","properties":{"improvedLayout":{"type":"boolean"},"randomSeed":{"type":"integer"}}}}}}},"processing_time":{"type":"string"},"scope":{"type":"object","properties":{"tenant":{"type":"string"},"workspace_scope":{"type":"string"},"workspace_id":{"type":"string"},"sample_limit":{"type":"integer"},"sample_strategy":{"type":"string"},"scope_contract":{"type":"string"}}},"stats":{"type":"object","properties":{"document_count":{"type":"integer"},"edge_count":{"type":"integer"},"cluster_count":{"type":"integer"},"type_clusters":{"type":"integer"},"partner_clusters":{"type":"integer"},"documents_with_embeddings":{"type":"integer"},"documents_with_entities":{"type":"integer"}}},"status":{"type":"string"},"tier":{"type":"string"},"workspace_id":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/maptiles/staticmap":{"post":{"operationId":"po-map-tiles-static-map-coordinates","summary":"Get static map by coordinates","tags":["Data AI — Map Tiles"],"description":"Generates a static map image (PNG) or JSON metadata from GPS coordinates.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-map-tiles-static-map-coordinates.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude (-90 to 90)."},"lon":{"type":"number","description":"Longitude (-180 to 180)."},"zoom":{"type":"number","description":"Zoom level (1–16, default 12).","default":12,"minimum":1,"maximum":16},"width":{"type":"number","description":"Image width in pixels (default 400).","default":400,"minimum":100,"maximum":800},"height":{"type":"number","description":"Image height in pixels (default 150).","default":150,"minimum":50,"maximum":600},"marker":{"type":"string","description":"Show marker: `0` (no) or `1` (yes, default).","default":"1"},"format":{"type":"string","description":"Output format (default `image`).","enum":["image","png","json","base64"],"default":"image"}},"required":["lat","lon"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude (-90 to 90)."},"lon":{"type":"number","description":"Longitude (-180 to 180)."},"zoom":{"type":"number","description":"Zoom level (1–16, default 12).","default":12,"minimum":1,"maximum":16},"width":{"type":"number","description":"Image width in pixels (default 400).","default":400,"minimum":100,"maximum":800},"height":{"type":"number","description":"Image height in pixels (default 150).","default":150,"minimum":50,"maximum":600},"marker":{"type":"string","description":"Show marker: `0` (no) or `1` (yes, default).","default":"1"},"format":{"type":"string","description":"Output format (default `image`).","enum":["image","png","json","base64"],"default":"image"}},"required":["lat","lon"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"content_type":{"type":"string","const":"image/png"},"image_url":{"type":"string","format":"uri"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}},"get":{"operationId":"po-map-tiles-static-map-ip-address","summary":"Get static map by IP address","tags":["Data AI — Map Tiles"],"description":"Generates a static map image centered on an IP address (geolocation lookup).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-map-tiles-static-map-ip-address.md"},"parameters":[{"name":"ip","in":"query","required":true,"schema":{"type":"string"},"description":"Public IPv4/IPv6 to center the map (geolocation lookup)."},{"name":"zoom","in":"query","required":false,"schema":{"type":"number","default":12,"minimum":1,"maximum":16},"description":"Zoom level (1–16, default 12)."},{"name":"width","in":"query","required":false,"schema":{"type":"number","default":400,"minimum":100,"maximum":800},"description":"Image width in pixels (default 400)."},{"name":"height","in":"query","required":false,"schema":{"type":"number","default":150,"minimum":50,"maximum":600},"description":"Image height in pixels (default 150)."},{"name":"marker","in":"query","required":false,"schema":{"type":"string","default":"1"},"description":"Show marker: `0` (no) or `1` (yes, default)."},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["image","png","json","base64"],"default":"image"},"description":"Output format (default `image`)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"content_type":{"type":"string","const":"image/png"},"image_url":{"type":"string","format":"uri"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/maptiles/style.json":{"get":{"operationId":"po-map-tiles-style-json","summary":"Style json","tags":["Data AI — Map Tiles"],"description":"Get MapLibre/Mapbox style configuration. Returns: JSON style definition for MapLibre GL JS Use this URL directly in your MapLibre map initialization.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-map-tiles-style-json.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Kartenstil JSON","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"style":{"type":"object","description":"MapLibre Style JSON"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/maptiles/tiles/get/{z}/{x}/{y}.pbf":{"get":{"operationId":"po-map-tiles-get-map-tile","summary":"Get map tile","tags":["Data AI — Map Tiles"],"description":"Returns a Mapbox Vector Tile (.pbf, gzip) for the slippy-map indices z, x, y.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-map-tiles-get-map-tile.md"},"parameters":[{"name":"z","in":"path","required":true,"schema":{"type":"integer","minimum":0,"maximum":14},"description":"Zoom level (0–14). Higher = more detail."},{"name":"x","in":"path","required":true,"schema":{"type":"integer"},"description":"Tile X index at this zoom level."},{"name":"y","in":"path","required":true,"schema":{"type":"integer"},"description":"Tile Y index at this zoom level."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Kartenkachel abrufen","properties":{"processing_time":{"type":"string","description":"Verarbeitungszeit (Format: 123.45ms)"},"content_type":{"type":"string","const":"image/png"},"body":{"type":"string","format":"binary"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/accept_share":{"post":{"operationId":"po-workspaces-share-accept","summary":"Accept workspace share invitation","tags":["Document AI — DMS"],"description":"po_workspaces_share_accept: Accept share invitation via share_token. POST /paperoffice_account/accept_share.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-accept.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"share_token":{"type":"string","description":"Invitation token from email link"},"token":{"type":"string","description":"Alias for share_token"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/accept_share_by_id":{"post":{"operationId":"po-workspaces-share-accept-by-id","summary":"Accept workspace share by ID","tags":["Document AI — DMS"],"description":"po_workspaces_share_accept_by_id: Accept pending share from inbox by share_id. POST /paperoffice_account/accept_share_by_id.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-accept-by-id.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"integer","description":"Share ID from shared_with_me inbox"}},"required":["share_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/cancel_invite":{"post":{"operationId":"po-workspaces-share-cancel-invite","summary":"Cancel pending workspace share","tags":["Document AI — DMS"],"description":"po_workspaces_share_cancel_invite: Cancel pending invitation (owner). POST /paperoffice_account/cancel_invite.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-cancel-invite.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"integer","description":"Pending share ID"},"confirm":{"type":"boolean","description":"Must be true to confirm this destructive action."}},"required":["share_id","confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/decline_share":{"post":{"operationId":"po-workspaces-share-decline","summary":"Decline workspace share invitation","tags":["Document AI — DMS"],"description":"Declines a pending workspace share invitation.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-decline.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"integer","description":"Share ID to decline"}},"required":["share_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/external_users":{"get":{"operationId":"po-workspaces-external-users-list","summary":"List external workspace users","tags":["Document AI — DMS"],"description":"po_workspaces_external_users_list: List all external users with workspace access (admin view, root/administrator only). GET /paperoffice_account/external_users.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-external-users-list.md"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"data":{"type":"array","items":{}},"processing_time":{"type":"string"},"status":{"type":"string"},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/my_shares":{"get":{"operationId":"po-workspaces-shares-list","summary":"List my workspace shares","tags":["Document AI — DMS"],"description":"po_workspaces_shares_list: List workspace shares created by the current token (owner view). Optional workspace_id filter and include_history. GET /paperoffice_account/my_shares.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-shares-list.md"},"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Optional: filter by workspace"},{"name":"include_history","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Include revoked/expired shares"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/resend_invite":{"post":{"operationId":"po-workspaces-share-resend-invite","summary":"Resend workspace share invitation","tags":["Document AI — DMS"],"description":"Resends a pending share invitation (owner only, rate-limited).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-resend-invite.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"integer","description":"Pending share ID"}},"required":["share_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/revoke_share":{"post":{"operationId":"po-workspaces-share-revoke","summary":"Revoke or leave workspace share","tags":["Document AI — DMS"],"description":"po_workspaces_share_revoke: Revoke share as owner or leave as recipient. POST /paperoffice_account/revoke_share with share_id.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-revoke.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"integer","description":"Share ID to revoke or leave"},"confirm":{"type":"boolean","description":"Must be true to confirm this destructive action."}},"required":["share_id","confirm"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/share_info":{"get":{"operationId":"po-workspaces-share-info","summary":"Get workspace share info by token","tags":["Document AI — DMS"],"description":"po_workspaces_share_info: Public share metadata for signup flow (no login required). GET /paperoffice_account/share_info?token= or share_token=.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-info.md"},"parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"},"description":"Share token from invite link."},{"name":"share_token","in":"query","required":false,"schema":{"type":"string"},"description":"Alias for token."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/share_workspace":{"post":{"operationId":"po-workspaces-share-create","summary":"Create workspace share","tags":["Document AI — DMS"],"description":"Create an external workspace share (email and/or telephony channel).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Workspace ID to share"},"target_email":{"type":"string","description":"Recipient email (required when share_document_access=true)","format":"email"},"share_document_access":{"type":"boolean","description":"Enable email/document channel","default":true},"telephony_enabled":{"type":"boolean","description":"Enable telephony channel","default":false},"access_level":{"type":"string","description":"External share permission model (only these two values): read = view and download documents; upload = read plus uploading own documents. External shares never get edit or admin rights; write, admin and view are rejected with 400 INVALID_ACCESS_LEVEL.","enum":["read","upload"],"default":"read"},"message":{"type":"string","description":"Invitation message"},"expires_days":{"type":"integer","description":"Share validity in days (1–3650, default 30).","default":30,"minimum":1,"maximum":3650},"require_2fa":{"type":"boolean","description":"No longer supported; ignored (external recipients sign in with their own account security).","deprecated":true},"require_strict_email_match":{"type":"boolean","description":"When true, login email must exactly match target_email."},"folder_restriction":{"type":"string","description":"Optional folder restriction JSON"},"telephony_registered_phones":{"type":"array","description":"E.164 phone numbers allowed to call the share IVR (array of strings).","items":{"type":"string"}},"telephony_pin":{"type":"string","description":"Optional PIN callers must enter after the voice prompt."},"telephony_language":{"type":"string","description":"IVR language code (e.g. de, en) for voice prompts."},"telephony_prompt_addon":{"type":"string","description":"Optional extra text appended to the spoken welcome prompt."},"telephony_voice":{"type":"string","description":"TTS voice ID override for telephony prompts (provider-specific)."},"telephony_delivery_email":{"type":"string","description":"Email address for telephony access links or notifications.","format":"email"},"telephony_delivery_security_mode":{"type":"string","description":"How access credentials are delivered: link, pin, or sms."},"telephony_delivery_sms_phone":{"type":"string","description":"SMS destination when telephony_delivery_security_mode=sms."}},"required":["workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/shared_with_me":{"get":{"operationId":"po-workspaces-shares-shared-with-me","summary":"List workspaces shared with me","tags":["Document AI — DMS"],"description":"po_workspaces_shares_shared_with_me: List workspaces shared with the current token (recipient view). GET /paperoffice_account/shared_with_me.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-shares-shared-with-me.md"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"data":{"type":"array","items":{}},"pending":{"type":"array","items":{}},"pending_count":{"type":"integer"},"processing_time":{"type":"string"},"status":{"type":"string"},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/update_share":{"post":{"operationId":"po-workspaces-share-update","summary":"Update workspace share","tags":["Document AI — DMS"],"description":"Updates permissions and settings of an existing workspace share (owner only).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-share-update.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"share_id":{"type":"integer","description":"Workspace share ID to update or revoke."},"access_level":{"type":"string","description":"New permission for the share: read = view and download documents; upload = read plus uploading own documents. write, admin and view are rejected with 400 INVALID_ACCESS_LEVEL (no silent downgrade).","enum":["read","upload"]},"require_2fa":{"type":"boolean","description":"No longer supported on updates; the value is ignored and listed in ignored_fields (FIELD_REMOVED).","deprecated":true},"require_strict_email_match":{"type":"boolean","description":"When true, login email must exactly match the invited address."},"folder_restriction":{"type":"string","description":"JSON array of folder IDs the share may access (omit for full workspace)."},"expires_at":{"type":"string","description":"ISO 8601 expiry timestamp (UTC).","format":"date-time"},"telephony_enabled":{"type":"boolean","description":"Enable or disable the telephony channel for this share."},"telephony_registered_phones":{"type":"array","description":"E.164 phone numbers allowed to call the share IVR (array of strings).","items":{"type":"string"}},"telephony_pin":{"type":"string","description":"Optional PIN callers must enter after the voice prompt."},"telephony_language":{"type":"string","description":"IVR language code (e.g. de, en) for voice prompts."},"telephony_prompt_addon":{"type":"string","description":"Optional extra text appended to the spoken welcome prompt."},"telephony_voice":{"type":"string","description":"TTS voice ID override for telephony prompts (provider-specific)."},"telephony_delivery_email":{"type":"string","description":"Email address for telephony access links or notifications.","format":"email"},"telephony_delivery_security_mode":{"type":"string","description":"How access credentials are delivered: link, pin, or sms."},"telephony_delivery_sms_phone":{"type":"string","description":"SMS destination when telephony_delivery_security_mode=sms."}},"required":["share_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/workspace_set_telephony_agent":{"post":{"operationId":"po-workspaces-telephony-agent-set","summary":"Set workspace telephony agent assignment","tags":["Document AI — DMS"],"description":"po_workspaces_telephony_agent_set: Set or clear primary Conversation Agent for telephony shares. POST /paperoffice_account/workspace_set_telephony_agent with workspace_id and funnel_id (0 = clear).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-telephony-agent-set.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Numeric workspace ID."},"funnel_id":{"type":"integer","description":"Conversation Agent funnel ID (0 = clear assignment)"}},"required":["workspace_id","funnel_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"workspace_id":{"type":"integer","description":"Numeric workspace ID."},"funnel_id":{"type":"integer","description":"Conversation Agent funnel ID (0 = clear assignment)"}},"required":["workspace_id","funnel_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/paperoffice_account/workspace_telephony_agent":{"get":{"operationId":"po-workspaces-telephony-agent-get","summary":"Get workspace telephony agent assignment","tags":["Document AI — DMS"],"description":"po_workspaces_telephony_agent_get: Read primary Conversation Agent for telephony shares in a workspace. GET /paperoffice_account/workspace_telephony_agent?workspace_id=.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-telephony-agent-get.md"},"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"integer"},"description":"Numeric workspace ID."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/publishers/{publisher_id}/merge":{"post":{"operationId":"po-publishers-merge","summary":"Merge publisher","tags":["Document AI — DMS"],"description":"Merge two publisher profiles when duplicates exist. The {publisher_id} path segment is the source publisher to retire; provide target_publisher_id in the JSON body. Logos, aliases, and document references move to the target.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-publishers-merge.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"target_publisher_id":{"type":"integer","description":"ID of the publisher to keep — the source `{publisher_id}` from the URL is merged into this profile."}},"required":["target_publisher_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"target_publisher_id":{"type":"integer","description":"ID of the publisher to keep — the source `{publisher_id}` from the URL is merged into this profile."}},"required":["target_publisher_id"]}}}},"parameters":[{"name":"publisher_id","in":"path","required":true,"schema":{"type":"integer"},"description":"Source publisher to merge and retire (URL path {publisher_id}). Required."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Publisher zusammengefuehrt","properties":{"processing_time":{"type":"string","description":"Processing duration in milliseconds"},"status":{"type":"string","description":"Request status (ok/error)"},"welcome":{"type":"string","description":"Welcome"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/publishers/{publisher_id}/rename":{"post":{"operationId":"po-publishers-rename","summary":"Rename publisher","tags":["Document AI — DMS"],"description":"Rename a publisher profile. The {publisher_id} path segment identifies the publisher; provide new_name in the JSON body.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-publishers-rename.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"new_name":{"type":"string","description":"New display name for the publisher identified by `{publisher_id}` in the URL path."}},"required":["new_name"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"new_name":{"type":"string","description":"New display name for the publisher identified by `{publisher_id}` in the URL path."}},"required":["new_name"]}}}},"parameters":[{"name":"publisher_id","in":"path","required":true,"schema":{"type":"integer"},"description":"Publisher to rename (URL path {publisher_id}). Required."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Publisher umbenannt","properties":{"processing_time":{"type":"string","description":"Processing duration in milliseconds"},"status":{"type":"string","description":"Request status (ok/error)"},"welcome":{"type":"string","description":"Welcome"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/cancel_signing_request":{"post":{"operationId":"po-signature-links-cancel-signing-request","summary":"Cancel signing request (signing link)","tags":["Document AI — E-Signatures"],"description":"WHEN TO USE: cancel a signing LINK that was created with po_signature_links_send_signing_request. For a signature request created with po_esignatures_create_signature_request use po_esignatures_cancel_signature_request. If you do not...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-cancel-signing-request.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string","description":"Signing request ID to cancel."},"reason":{"type":"string","description":"Optional cancellation reason."}},"required":["request_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Unterschriftsanfrage stornieren","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"cancelled":{"type":"boolean"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/create_and_send":{"post":{"operationId":"po-signing-request-create","summary":"Create signature request (signing link)","tags":["Document AI — E-Signatures"],"description":"Create a signing request and send invitations.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signing-request-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"document_pofid":{"type":"string","description":"POFID of the document to sign (required)."},"signers":{"type":"array","description":"Signers array; each entry requires name, email, and phone (E.164).","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","description":"E.164 phone (required for SMS verification)."}}}},"channel":{"type":"string","description":"Invitation delivery: email (default) sends the invitation email; manual or none only returns the signing URL for the user to pass on. The signer receives the SMS one-time code on the signing page.","enum":["email","manual","none"],"default":"email"},"message":{"type":"string","description":"Personal message to signers"},"expires_days":{"type":"number","description":"Validity period in days (default: 30)"},"language":{"type":"string","description":"Language (de, en, es, fr, ...)"},"signature_fields":{"type":"array","description":"Positioning of signature fields in the PDF. Takes precedence over placement_template_uuid. page may be a number or last/all.","items":{"type":"object","properties":{"page":{"description":"Page number, or last/all for reusable layouts"},"page_anchor":{"type":"string","description":"Layout anchor; last/all are resolved against the document page count","enum":["absolute","last","all"]},"x":{"type":"number","description":"X-Position"},"y":{"type":"number","description":"Y-Position"},"width":{"type":"number","description":"Width"},"height":{"type":"number","description":"Height"},"relative":{"type":"boolean","description":"Relative 0–1 coordinates (default true)"},"signer_index":{"type":"integer","description":"Signer index (0-based)"}},"additionalProperties":true}},"reminder":{"type":"object","description":"Reminder configuration","properties":{"enabled":{"type":"boolean"},"first_after_days":{"type":"number"},"interval_days":{"type":"number"},"max_count":{"type":"number"}},"additionalProperties":false},"placement_template_uuid":{"type":"string","description":"UUID of a saved layout template (signature field positions per page, including last/all anchors). Used when signature_fields is omitted. Explicit signature_fields win if both are sent."},"placement_template_id":{"type":"string","description":"Alias for placement_template_uuid."},"template_uuid":{"type":"string","description":"Alias for placement_template_uuid."},"document_page_count":{"type":"integer","description":"Document page count for resolving last/all placement anchors. If omitted, the API uses the stored document page count.","minimum":1}},"required":["document_pofid","signers"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/download_signed_document":{"get":{"operationId":"po-signature-links-download-signed-document","summary":"Download Signing Link Document","tags":["Document AI — E-Signatures"],"description":"Download a signed PDF or certificate.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-download-signed-document.md"},"parameters":[{"name":"request_id","in":"query","required":false,"schema":{"type":"string"},"description":"Authenticated download: signing request ID."},{"name":"token","in":"query","required":false,"schema":{"type":"string"},"description":"Public signer download: access token from signing URL (?token=)."},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["full","certificate"],"default":"full"},"description":"Download package: full (signed PDF) or certificate (audit trail only)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Signiertes Dokument herunterladen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output_files":{"type":"object","additionalProperties":{"type":"string","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/generate_mobile_token":{"post":{"operationId":"po-signing-mobile-link-generate","summary":"Generate mobile signing link","tags":["Document AI — E-Signatures"],"description":"Generate a mobile-friendly signing link for an external signer. Returns a time-limited URL for the signature-link flow.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signing-mobile-link-generate.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"document_pofid":{"type":"string","description":"Document PO-FID for mobile QR signing."},"document_name":{"type":"string","description":"Display name shown to the signer on mobile."},"expires_hours":{"type":"integer","description":"Link validity in hours (default 24).","default":24},"language":{"type":"string","description":"Signer UI language code (e.g. de, en)."}},"required":["document_pofid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/get_batch_status":{"post":{"operationId":"po-signing-requests-list","summary":"List signature requests (signing link / batch)","tags":["Document AI — E-Signatures"],"description":"WHEN TO USE: signature status for specific documents (batch lookup by documents_id/pofid) or the detail of a single request. For a plain status-filtered list of all signature requests use po_esignatures_list_signature_requests instead.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signing-requests-list.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"number","description":"Specific request ID for detail view"},"request_uuid":{"type":"string","description":"UUID of a request (Alternative to request_id)"},"document_pofid":{"type":"string","description":"POFID to view all signatures of a document"},"document_pofids":{"type":"array","description":"Deprecated alias for pofids.","items":{"type":"string"}},"status":{"type":"string","description":"Filter by status","enum":["draft","pending","completed","cancelled","expired"]},"page":{"type":"number","description":"Page (default: 1)"},"limit":{"type":"number","description":"Results per page (default: 20)"},"pofids":{"type":"array","description":"POFID list for batch status (canonical). Alias: document_pofids.","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/get_document_signatures":{"get":{"operationId":"po-signature-links-get-document-signatures","summary":"Get document signatures","tags":["Document AI — E-Signatures"],"description":"List signature records and signer status for a document accessed via signature links.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-get-document-signatures.md"},"parameters":[{"name":"document_pofid","in":"query","required":true,"schema":{"type":"string"},"description":"Document PO-FID (aliases: pofid, document_id)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Dokument-Signaturen abrufen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"signatures":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/get_reminder_settings":{"get":{"operationId":"po-signing-reminders-configure","summary":"Configure signing reminders","tags":["Document AI — E-Signatures"],"description":"Returns global reminder settings for signing requests (GET only).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signing-reminders-configure.md"},"parameters":[{"name":"action","in":"query","required":true,"schema":{"type":"string","enum":["get","save"]},"description":"get = read settings, save = save settings"},{"name":"reminder_enabled","in":"query","required":false,"schema":{"type":"boolean"},"description":"Enable/disable reminders (only for save)"},{"name":"first_after_days","in":"query","required":false,"schema":{"type":"number"},"description":"Days until first reminder"},{"name":"interval_days","in":"query","required":false,"schema":{"type":"number"},"description":"Days between reminders"},{"name":"max_count","in":"query","required":false,"schema":{"type":"number"},"description":"Maximum number of reminders"},{"name":"channels","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}},"description":"Channels: email, sms"}],"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"processing_time":{"type":"string"},"settings":{"type":"object","properties":{"reminder_enabled":{"type":"boolean"},"first_after_days":{"type":"integer"},"interval_days":{"type":"integer"},"max_count":{"type":"integer"},"channels":{"type":"array","items":{}},"sms_window_start":{"type":"string"},"sms_window_end":{"type":"string"},"escalate_to_sender":{"type":"boolean"}}},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/get_signing_status":{"get":{"operationId":"po-signature-links-check-signing-status","summary":"Check signing status","tags":["Document AI — E-Signatures"],"description":"Check the signing status of a signature-link request — pending, completed, or expired.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-check-signing-status.md"},"parameters":[{"name":"request_id","in":"query","required":true,"schema":{"type":"string"},"description":"Signing request ID (legacy alias: signing_id)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"request_id":{"type":"string"},"status":{"type":"string","enum":["pending","signed","declined","expired"]},"signed_at":{"type":"string","format":"date-time"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/resend_invitation":{"post":{"operationId":"po-signature-links-resend-invitation","summary":"Resend invitation","tags":["Document AI — E-Signatures"],"description":"Resend a signing invitation email for a pending signature-link participant.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-resend-invitation.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signer_id":{"type":"integer","description":"Signer row ID from signatures table (legacy alias: invitation_id)."},"channel":{"type":"string","description":"Delivery channel for the invitation (currently email only).","enum":["email"],"default":"email"}},"required":["signer_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Einladung erneut senden","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"sent":{"type":"boolean"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/resend_otp":{"post":{"operationId":"po-signature-links-resend-otp","summary":"Resend signing OTP SMS","tags":["Document AI — E-Signatures"],"description":"Signer-facing public endpoint. Sends or resends the SMS one-time password for a signing-link session.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-resend-otp.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Signing token from the signing URL query (?token=). Raw string; MCP URL-encodes it. Example: {\"token\":\"<from signing URL>\"}"}},"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"method":{"type":"string"},"target":{"type":"string"},"expires_at":{"type":"string"},"code":{"type":"string"},"error":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/save_reminder_settings":{"post":{"operationId":"po-signature-link-save-reminder-settings","summary":"Save signing reminder settings","tags":["Document AI — E-Signatures"],"description":"Persist account-wide signing reminder defaults (not per signing request).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-link-save-reminder-settings.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reminder_enabled":{"type":"boolean","description":"Enable automatic reminders (default true)."},"first_after_days":{"type":"integer","description":"Days after send before first reminder (default 2)."},"interval_days":{"type":"integer","description":"Days between follow-up reminders (default 2)."},"max_count":{"type":"integer","description":"Maximum reminders per signer (default 3)."},"channels":{"type":"array","description":"Delivery channels, e.g. [\"email\"] or [\"email\",\"sms\"].","items":{"type":"string"}},"sms_window_start":{"type":"string","description":"SMS window start HH:MM (default 09:00)."},"sms_window_end":{"type":"string","description":"SMS window end HH:MM (default 20:00)."},"escalate_to_sender":{"type":"boolean","description":"Notify sender after max reminders (default true)."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"settings":{"type":"object"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/send_signing_request":{"post":{"operationId":"po-signature-links-send-signing-request","summary":"Send Signing Request","tags":["Document AI — E-Signatures"],"description":"Send a signature-link invitation for an existing signing request.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-send-signing-request.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"request_id":{"type":"string","description":"Signature request ID"},"signers":{"type":"array","description":"Optional. New signers to add and invite (name, email, phone). Omit to invite all pending signers already on request_id.","items":{"type":"object"}},"message":{"type":"string","description":"Message to the signer"},"channel":{"type":"string","description":"Invitation delivery: email (default) sends the invitation email; manual or none only returns the signing URL for the user to pass on. The signer receives the SMS one-time code on the signing page.","enum":["email","manual","none"],"default":"email"}},"required":["request_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Unterschriftsanfrage per Link senden","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"request_id":{"type":"string"},"signing_url":{"type":"string","format":"uri"},"status":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/sign":{"post":{"operationId":"po-signature-links-sign-document","summary":"Sign document","tags":["Document AI — E-Signatures"],"description":"Signer-facing public endpoint. Submit a signature for an active signing request after OTP verification.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-sign-document.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Same signing token as verify_otp (from ?token=). Example: {\"token\":\"<from signing URL>\",\"verified_token\":\"...\",\"signature\":\"Jane Doe\",\"signature_type\":\"type\"}"},"verified_token":{"type":"string","description":"Verification token returned by po_signature_links_verify_otp."},"signature":{"type":"string","description":"Signature payload (Base64 PNG for draw/upload, plain text for type)."},"signature_type":{"type":"string","description":"Signature method: drawn, typed, or uploaded image.","enum":["draw","type","upload"],"default":"draw"},"signer_name":{"type":"string","description":"Display name of the signer."},"client_data":{"type":"object","description":"Additional client data (IP, timestamp, User-Agent)."}},"required":["token","signature"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Dokument unterschreiben","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"signed":{"type":"boolean"},"signed_pofid":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/verify_document":{"post":{"operationId":"po-signing-verify","summary":"Verify signature","tags":["Document AI — E-Signatures"],"description":"Check whether a PDF is an unchanged signed document or certificate that PaperOffice issued for your account. The SHA-256 of the file is matched against every issued output; it does not validate cryptographic signatures, certificate...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signing-verify.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"document_pofid":{"type":"string","description":"POFID of the document to verify"},"upload_id":{"type":"string","description":"Upload ID from the upload page"},"file_url":{"type":"string","description":"Public URL of a PDF file"},"file_name":{"type":"string","description":"Filename for uploaded file"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"document_pofid":{"type":"string","description":"POFID of the document to verify"},"upload_id":{"type":"string","description":"Upload ID from the upload page"},"file_url":{"type":"string","description":"Public URL of a PDF file"},"file_name":{"type":"string","description":"Filename for uploaded file"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signature_link/verify_otp":{"post":{"operationId":"po-signature-links-verify-otp","summary":"Verify otp","tags":["Document AI — E-Signatures"],"description":"Signer-facing public endpoint. Verifies the one-time password (OTP) for a signing-link session.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signature-links-verify-otp.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Signing token from the signing URL query (?token=). Raw string; MCP URL-encodes it. Example: {\"token\":\"<from signing URL>\",\"otp\":\"123456\"}"},"otp":{"type":"string","description":"6-digit OTP from SMS. verify_otp only checks the code; send SMS with po_signature_links_resend_otp."}},"required":["token","otp"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"OTP verifizieren","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"verified":{"type":"boolean"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signatures/cancel":{"post":{"operationId":"po-esignatures-cancel-signature-request","summary":"Cancel signature request (eSignatures API)","tags":["Document AI — E-Signatures"],"description":"WHEN TO USE: cancel a signature request that was created with po_esignatures_create_signature_request. For a signing LINK created with po_signature_links_send_signing_request use po_signature_links_cancel_signing_request. If you do not...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-esignatures-cancel-signature-request.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signature_id":{"type":"string","description":"Signature request ID: the `uuid` (also `request.signature_id`) returned by POST /signatures/create. Aliases: request_uuid, uuid, request_id."},"request_uuid":{"type":"string","description":"Alias for signature_id (send instead of signature_id, not in addition with a different value)."},"uuid":{"type":"string","description":"Alias for signature_id (send instead of signature_id, not in addition with a different value)."},"request_id":{"type":"integer","description":"Numeric `request.id` from /signatures/create (used only when no UUID field is sent)."},"reason":{"type":"string","description":"Optional cancellation reason."}},"required":["signature_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Unterschriftsanfrage stornieren","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"cancelled":{"type":"boolean"},"signature_id":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signatures/create":{"post":{"operationId":"po-esignatures-create-signature-request","summary":"Create signature request (eSignatures API)","tags":["Document AI — E-Signatures"],"description":"Create an e-signature request with signers and a document POFID.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-esignatures-create-signature-request.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pofid":{"type":"string","description":"Alias for document_pofid."},"document_pofid":{"type":"string","description":"POFID of the document to sign (required)."},"signers":{"type":"array","description":"Signers array; each entry requires name, email, and phone (E.164).","items":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","description":"E.164 phone (required for SMS verification)."}}}},"channel":{"type":"string","description":"Invitation delivery: email (default) sends the invitation email; manual or none only returns the signing URL for the user to pass on. The signer receives the SMS one-time code on the signing page.","enum":["email","manual","none"],"default":"email"},"signature_type":{"type":"string","description":"Signature level: ses (simple electronic signature under eIDAS, the only level PaperOffice issues).","enum":["ses"]},"signing_order":{"type":"string","description":"Signing order (default: parallel).","enum":["parallel","sequential"]},"expires_days":{"type":"integer","description":"Validity period in days (default: 7, max: 90)."},"message":{"type":"string","description":"Optional message to signers."},"placement_template_uuid":{"type":"string","description":"UUID of a saved layout template (signature field positions per page, including last/all anchors). Used when signature_fields is omitted. Explicit signature_fields win if both are sent."},"placement_template_id":{"type":"string","description":"Alias for placement_template_uuid."},"template_uuid":{"type":"string","description":"Alias for placement_template_uuid."},"document_page_count":{"type":"integer","description":"Document page count for resolving last/all placement anchors. If omitted, the API uses the stored document page count.","minimum":1},"signature_fields":{"type":"array","description":"Positioning of signature fields in the PDF. Takes precedence over placement_template_uuid. page may be a number or last/all.","items":{"type":"object","properties":{"page":{"description":"Page number, or last/all for reusable layouts"},"page_anchor":{"type":"string","description":"Layout anchor; last/all are resolved against the document page count","enum":["absolute","last","all"]},"x":{"type":"number","description":"X-Position"},"y":{"type":"number","description":"Y-Position"},"width":{"type":"number","description":"Width"},"height":{"type":"number","description":"Height"},"relative":{"type":"boolean","description":"Relative 0–1 coordinates (default true)"},"signer_index":{"type":"integer","description":"Signer index (0-based)"}},"additionalProperties":true}}},"required":["signers","document_pofid"],"anyOf":[{"required":["pofid"],"properties":{"pofid":{}}},{"required":["document_pofid"],"properties":{"document_pofid":{}}}]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Unterschriftsanfrage erstellen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"signature_id":{"type":"string"},"signing_url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["pending","sent","signed","declined","expired"]},"signers":{"type":"array","items":{"type":"object"}},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signatures/download":{"get":{"operationId":"po-esignatures-download-signed-document","summary":"Download eSignature Document","tags":["Document AI — E-Signatures"],"description":"WHEN TO USE: download the signed file of a signature request (po_esignatures_create_signature_request). po_signing_document_download reaches the same endpoint and is kept for compatibility; prefer this tool. [R260918-DISAMBIG]","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-esignatures-download-signed-document.md"},"parameters":[{"name":"signature_id","in":"query","required":true,"schema":{"type":"string"},"description":"Signature request ID: the `uuid` (also `request.signature_id`) returned by POST /signatures/create. Aliases: request_uuid, uuid, request_id."},{"name":"request_uuid","in":"query","required":false,"schema":{"type":"string"},"description":"Alias for signature_id (send instead of signature_id, not in addition with a different value)."},{"name":"uuid","in":"query","required":false,"schema":{"type":"string"},"description":"Alias for signature_id (send instead of signature_id, not in addition with a different value)."},{"name":"request_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Numeric `request.id` from /signatures/create (used only when no UUID field is sent)."},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["signed","original","audit","certificate","full"],"default":"signed"},"description":"File to download."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Unterschriebenes Dokument herunterladen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output_files":{"type":"object","additionalProperties":{"type":"string","format":"uri"}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signatures/get":{"get":{"operationId":"po-esignatures-get-signature-details","summary":"Get signature details","tags":["Document AI — E-Signatures"],"description":"Get status and signer details for an e-signature request — pending, completed, or declined.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-esignatures-get-signature-details.md"},"parameters":[{"name":"signature_id","in":"query","required":true,"schema":{"type":"string"},"description":"Signature request ID: the `uuid` (also `request.signature_id`) returned by POST /signatures/create. Aliases: request_uuid, uuid, request_id."},{"name":"request_uuid","in":"query","required":false,"schema":{"type":"string"},"description":"Alias for signature_id (send instead of signature_id, not in addition with a different value)."},{"name":"uuid","in":"query","required":false,"schema":{"type":"string"},"description":"Alias for signature_id (send instead of signature_id, not in addition with a different value)."},{"name":"request_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Numeric `request.id` from /signatures/create (used only when no UUID field is sent)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Unterschrifts-Details","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"signature_id":{"type":"string"},"status":{"type":"string"},"document_pofid":{"type":"string"},"signers":{"type":"array","items":{"type":"object"}},"audit_trail":{"type":"array","items":{"type":"object"}}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signatures/list":{"get":{"operationId":"po-esignatures-list-signature-requests","summary":"List signature requests (eSignatures API)","tags":["Document AI — E-Signatures"],"description":"WHEN TO USE: canonical listing of e-signature requests filtered by status (pending, completed, declined, expired). To look up the signature status of specific documents, or the detail of one request, use po_signing_requests_list instead.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-esignatures-list-signature-requests.md"},"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","pending","sent","completed","declined","expired","cancelled"]},"description":"Filter by signature status (pending, completed, declined, expired)."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"minimum":1},"description":"Page number for pagination (1-based)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Unterschriftsanfragen auflisten","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"signatures":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signatures/remind":{"post":{"operationId":"po-esignatures-send-reminder","summary":"Send reminder","tags":["Document AI — E-Signatures"],"description":"Send a reminder email to pending signers on an e-signature request.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-esignatures-send-reminder.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signature_id":{"type":"string","description":"Signature request ID: the `uuid` (also `request.signature_id`) returned by POST /signatures/create. Aliases: request_uuid, uuid, request_id."},"request_uuid":{"type":"string","description":"Alias for signature_id (send instead of signature_id, not in addition with a different value)."},"uuid":{"type":"string","description":"Alias for signature_id (send instead of signature_id, not in addition with a different value)."},"request_id":{"type":"integer","description":"Numeric `request.id` from /signatures/create (used only when no UUID field is sent)."},"message":{"type":"string","description":"Optional reminder text."}},"required":["signature_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Erinnerung an Unterzeichner senden","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"sent":{"type":"boolean"},"signature_id":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signatures/save_template":{"post":{"operationId":"po-signing-template-save","summary":"Save signature template","tags":["Document AI — E-Signatures"],"description":"Save signer field placements and template metadata for reuse in future e-signature requests.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signing-template-save.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signature_image":{"type":"string","description":"Base64-encoded image of signature/initials"},"type":{"type":"string","description":"Template type (default: signature)","enum":["signature","initials"]},"name":{"type":"string","description":"Name of the template"},"is_default":{"type":"boolean","description":"Set as default template"}},"required":["signature_image"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/signatures/types":{"get":{"operationId":"po-signing-types-list","summary":"List signature types","tags":["Document AI — E-Signatures"],"description":"List available signature types and saved signature templates. Returns the signature type catalog and stored signature/initial templates for the account. PaperOffice issues simple electronic signatures (SES) under eIDAS only; the signer...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-signing-types-list.md"},"parameters":[{"name":"include_types","in":"query","required":false,"schema":{"type":"boolean"},"description":"Load eIDAS types (default: true)"},{"name":"include_templates","in":"query","required":false,"schema":{"type":"boolean"},"description":"Load saved templates (default: true)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"eidas_level":{"type":"string"},"legal_weight":{"type":"string"},"description":{"type":"string"},"requirements":{"type":"array","items":{}},"use_cases":{"type":"array","items":{}}}}},"qtsp_providers":{"type":"array","items":{}}}},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/add":{"post":{"operationId":"po-storage-mounts-add","summary":"Add Storage Mount","tags":["Document AI — Storage Mounts"],"description":"Add an external storage mount. Required: name and mount_purpose. SFTP, WebDAV, S3 and IMAP also need host, username and credentials (password or ssh_key). reverse_ssh (NAS or server without port forwarding) needs only local_ssh_user...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-add.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name for the mount."},"host":{"type":"string","description":"Remote host (SFTP, WebDAV server URL, S3 endpoint, IMAP server). Required for those types; ignored for `reverse_ssh` and `po_sftp_endpoint` (set by PaperOffice)."},"connector_type":{"type":"string","description":"Storage connector type. `reverse_ssh` = NAS/server connects outbound to the PaperOffice gateway (no port forwarding, no fixed IP); allowed for byos and connector. `po_sftp_endpoint` = managed PaperOffice SFTP/FTP inbox (connector only). BYOS supports `sftp` and `reverse_ssh` only. azure_blob, google_drive, onedrive, dropbox and box currently return 400 PROVIDER_NOT_AVAILABLE.","enum":["sftp","reverse_ssh","po_sftp_endpoint","s3","webdav","imap","azure_blob","google_drive","onedrive","dropbox","box"],"default":"sftp"},"mount_purpose":{"type":"string","description":"Mount purpose: 'byos' (Bring Your Own Storage) or 'connector' (data source). Immutable after creation.","enum":["byos","connector"]},"description":{"type":"string","description":"Optional description of the mount."},"port":{"type":"integer","description":"Port (default 22 for SFTP, 443 for S3/WebDAV, 993 for IMAP). Ignored for `reverse_ssh` and `po_sftp_endpoint`.","minimum":1,"maximum":65535},"username":{"type":"string","description":"Login username. Required for SFTP/WebDAV/IMAP; ignored for `reverse_ssh` (the tunnel alias becomes the gateway user) and `po_sftp_endpoint`."},"password":{"type":"string","description":"Password for SFTP/FTP login (or use `ssh_key` for key-based auth)."},"ssh_key":{"type":"string","description":"SSH private key (stored encrypted)."},"api_token":{"type":"string","description":"API token (stored encrypted)."},"base_path":{"type":"string","description":"Base path on the remote server. Parent-directory segments (..) are not allowed. For `reverse_ssh` use `local_path`.","default":"/"},"encryption_key":{"type":"string","description":"Required for mount_purpose `byos`: password of the encrypted .pod archives on your storage (at least 16 characters, 64 recommended). It cannot be changed later; if it is lost, the files cannot be decrypted.","minLength":16},"connection_options":{"type":"object","description":"Additional connection options as JSON (e.g. S3 region, IMAP folder)."},"icon_url":{"type":"string","description":"Optional URL for a custom icon."},"local_ssh_user":{"type":"string","description":"Only for `reverse_ssh` (required): local user on the NAS/server whose SSH service PaperOffice logs into through the tunnel (e.g. `paperoffice`). Letters, digits, dot, underscore, hyphen; max 64.","pattern":"^[A-Za-z0-9._-]{1,64}$"},"local_path":{"type":"string","description":"Only for `reverse_ssh` (required; `base_path` is used when omitted): folder on the NAS/server, e.g. `/volume1/paperoffice`. Path traversal to a parent directory is rejected. For BYOS an absolute sub-folder (not `/`) without quotes, backslash or * ? [ ]; it cannot be changed later."}},"required":["name","mount_purpose"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Add storage mount","properties":{"processing_time":{"type":"string","description":"Processing time (format: 123.45ms)"},"mount_id":{"type":"string","description":"Mount id"},"type":{"type":"string","description":"Type"},"status":{"type":"string","description":"Request status (ok/error)"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/browse":{"get":{"operationId":"po-storage-mounts-browse","summary":"Browse storage mount files","tags":["Document AI — Storage Mounts"],"description":"Browse files and directories on a storage mount. Returns file listing with metadata (size, modified date, type).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-browse.md"},"parameters":[{"name":"mount_id","in":"query","required":true,"schema":{"type":"integer"},"description":"ID of the storage mount to browse"},{"name":"path","in":"query","required":false,"schema":{"type":"string"},"description":"Path to browse. Relative paths are resolved against mount base_path. Use / for root."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/delete":{"post":{"operationId":"po-storage-mounts-delete","summary":"Delete Storage Mount","tags":["Document AI — Storage Mounts"],"description":"Delete a storage mount configuration. Fails when active connectors still reference the mount.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-delete.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mount_id":{"type":"integer","description":"Parameter: mount_id"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Delete storage mount","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"data":{"type":"object","description":"Deleted mount","properties":{"mount_id":{"type":"integer","description":"ID of the deleted storage mount"}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/get":{"get":{"operationId":"po-storage-mounts-get","summary":"Get storage mount details","tags":["Document AI — Storage Mounts"],"description":"Get full details for one storage mount — connector type, host, base path, health status, and linked connectors.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-get.md"},"parameters":[{"name":"mount_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Parameter: mount_id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Storage mount details","properties":{"processing_time":{"type":"string","description":"Processing time (format: 123.45ms)"},"mount_id":{"type":"string","description":"Mount id"},"type":{"type":"string","description":"Type"},"path":{"type":"string","description":"Path"},"status":{"type":"string","description":"Request status (ok/error)"},"storage_used":{"type":"string","description":"Storage used"}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/health":{"get":{"operationId":"po-storage-mounts-health","summary":"Get storage mount health status","tags":["Document AI — Storage Mounts"],"description":"Check health status of all configured storage mounts. Returns availability, latency, and disk usage per mount.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-health.md"},"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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"data":{"type":"array","items":{}},"message":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/list":{"get":{"operationId":"po-storage-mounts-list","summary":"List storage mounts","tags":["Document AI — Storage Mounts"],"description":"List configured storage mounts for the account with connection status and mount purpose.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-list.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"List storage mounts","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"},"token":{"type":"string"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"data":{"type":"object","properties":{"mounts":{"type":"array","items":{}},"total":{"type":"integer"},"quota":{"type":"object","properties":{"tier":{"type":"string"},"tier_name":{"type":"string"},"limit":{"type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"},"can_add":{"type":"boolean"},"upgrade_options":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"},"price_monthly":{"type":"integer"},"storage_mounts":{"type":"integer"}}}}}}}},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/mirrors-add":{"post":{"operationId":"po-storage-mounts-mirrors-create","summary":"Create storage mount mirror","tags":["Document AI — Storage Mounts"],"description":"Add a real-time mirror for a storage mount: every file operation on the source mount is replicated to the target mount. Only sync_mode=realtime is supported; other values return HTTP 400 INVALID_SYNC_MODE with valid_modes. Source and...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-mirrors-create.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source_mount_id":{"type":"integer","description":"Source mount ID (data origin)"},"target_mount_id":{"type":"integer","description":"Target mount ID (mirror destination)"},"sync_mode":{"type":"string","description":"Synchronization mode. Only realtime is supported (replication on every file operation).","enum":["realtime"],"default":"realtime"},"priority":{"type":"integer","description":"Legacy queue priority (compat). Prefer processing_lane Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","default":0,"minimum":0,"maximum":900,"deprecated":true}},"required":["source_mount_id","target_mount_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/mirrors-list":{"get":{"operationId":"po-storage-mounts-mirrors-list","summary":"List storage mount mirrors","tags":["Document AI — Storage Mounts"],"description":"List all configured mirror targets for storage mounts. Shows mirror destinations, sync status, and last sync time.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-mirrors-list.md"},"parameters":[{"name":"mount_id","in":"query","required":true,"schema":{"type":"integer"},"description":"Source mount ID to list mirrors for"}],"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"},"token":{"type":"string"},"mount_id":{"type":"string"},"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","items":{}},"message":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/mirrors-remove":{"post":{"operationId":"po-storage-mounts-mirrors-delete","summary":"Delete storage mount mirror","tags":["Document AI — Storage Mounts"],"description":"Remove a mirror configuration from a storage mount. Stops future syncs but does not delete mirrored data.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-mirrors-delete.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mirror_id":{"type":"integer","description":"Mirror ID to remove"}},"required":["mirror_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/mirrors-toggle":{"post":{"operationId":"po-storage-mounts-mirrors-toggle","summary":"Toggle storage mount mirror","tags":["Document AI — Storage Mounts"],"description":"Enable or disable a storage mount mirror without deleting the configuration. Useful for temporary maintenance.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-mirrors-toggle.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mirror_id":{"type":"integer","description":"Mirror ID to toggle"},"is_active":{"type":"boolean","description":"true/1 = active, false/0 = paused. Accepts true/false, 1/0, yes/no, on/off (JSON boolean or form string); other values return 400 INVALID_BOOLEAN. Unknown mirror_id returns 404 MIRROR_NOT_FOUND."}},"required":["mirror_id","is_active"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/mkdir":{"post":{"operationId":"po-storage-mounts-mkdir","summary":"Create storage mount directory","tags":["Document AI — Storage Mounts"],"description":"Create a folder on a configured storage mount (SFTP/FTP).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-mkdir.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mount_id":{"type":"integer","description":"ID of the storage mount"},"folder_name":{"type":"string","description":"Name of the new folder (no special characters)"},"path":{"type":"string","description":"Parent path where the folder will be created (relative to base_path)"}},"required":["mount_id","folder_name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/test":{"post":{"operationId":"po-storage-mounts-test","summary":"Test storage mount connection","tags":["Document AI — Storage Mounts"],"description":"Test whether a saved storage mount is reachable, or validate connector credentials before saving.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-test.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mount_id":{"type":"string","description":"ID of an existing storage mount to test (omit when sending dry-run connector credentials in the body)."},"connector_type":{"type":"string","description":"Connector type for a dry-run test: `sftp`, `ftp`, `ftps`, `smb`, `webdav` or `s3`. `reverse_ssh` mounts are tested with `mount_id` only."},"host":{"type":"string","description":"Hostname for dry-run connection test (example: `files.example.com`)."},"port":{"type":"string","description":"Port for dry-run connection test (example: `22` for SFTP)."},"username":{"type":"string","description":"Username for dry-run connection test."},"password":{"type":"string","description":"Password for dry-run connection test — use a placeholder in shared collections."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Test storage-mount connection","properties":{"processing_time":{"type":"string","description":"Processing time (format: 123.45ms)"},"connected":{"type":"boolean","description":"Connected"},"message":{"type":"string","description":"Status message or error description"},"latency_ms":{"type":"number","description":"Latency ms"},"status":{"type":"string","description":"Request status: \"success\" or \"error\"","enum":["success","error"]}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/storage_mounts/update":{"post":{"operationId":"po-storage-mounts-update","summary":"Update Storage Mount","tags":["Document AI — Storage Mounts"],"description":"Update Storage Mount Modify an existing storage mount. Required: mount_id Optional: Any field to update","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-storage-mounts-update.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mount_id":{"type":"integer","description":"Parameter: mount_id"},"name":{"type":"string","description":"Parameter: name"},"is_active":{"type":"boolean","description":"Parameter: is_active"},"description":{"type":"string","description":"New description."},"base_path":{"type":"string","description":"New base path. Ignored for BYOS `reverse_ssh` mounts and managed `po_sftp_endpoint` mounts."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Update storage-mount settings","properties":{"status":{"type":"string","description":"Operation result status","enum":["success","error"]},"message":{"type":"string","description":"Human-readable status message"},"data":{"type":"object","description":"Aktualisierter Mount","properties":{"mount_id":{"type":"integer","description":"ID of the updated storage mount"}}},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"}},"required":["status"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/translate/languages":{"get":{"operationId":"po-translate-get-languages","summary":"Get supported languages","tags":["Media AI — Translation"],"description":"Translation language catalog: GET /translate/languages. Returns 35 language codes with names, target_locale variants (de-DE/AT/CH, en-US/GB/AU/CA, es-ES/419/MX, fr-*, pt-*, nl-*, it-*, zh-*, ar-*), tiers (basic/premium/ultra)...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-translate-get-languages.md"},"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"data":{"type":"object","properties":{"languages":{"type":"object","properties":{"de":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"en":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"es":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"fr":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"it":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"pt":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"nl":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"pl":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"cs":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"ru":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"zh":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"ja":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"ko":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"ar":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"tr":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"sv":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"da":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"no":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"fi":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"hu":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"ro":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"uk":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"th":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"vi":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"id":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"hi":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"he":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"sk":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"sl":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"bg":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"hr":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"sr":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"et":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"lv":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}},"lt":{"type":"object","properties":{"name":{"type":"string"},"flag":{"type":"string"},"native":{"type":"string"}}}}},"default_base":{"type":"string"},"total":{"type":"integer"},"tiers":{"type":"array","items":{}},"default_tier":{"type":"string"},"max_input_chars":{"type":"integer"},"preserve_terms":{"type":"object","properties":{"type":{"type":"string"},"max_items":{"type":"integer"},"max_chars":{"type":"integer"},"description":{"type":"string"},"example":{"type":"array","items":{}}}},"preserve_terms_preset":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"available_presets":{"type":"array","items":{}},"example":{"type":"string"},"notes":{"type":"string"}}},"target_locale":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"bases":{"type":"array","items":{}},"variants":{"type":"object","properties":{"ar":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}},"de":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}},"en":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}},"es":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}},"fr":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}},"it":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}},"nl":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}},"pt":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}},"zh":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"label":{"type":"string"},"instruction":{"type":"string"}}}}}},"example":{"type":"string"}}},"style":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"supported":{"type":"array","items":{}},"default":{"type":"string"}}},"tone":{"type":"object","properties":{"type":{"type":"string"},"supported":{"type":"array","items":{}},"default":{"type":"string"}}},"mode":{"type":"object","properties":{"type":{"type":"string"},"supported":{"type":"array","items":{}},"aliases":{"type":"object","properties":{"rewrite":{"type":"string"}}},"default":{"type":"string"},"description":{"type":"string"}}},"error_codes":{"type":"object","properties":{"AUTH_REQUIRED":{"type":"string"},"INVALID_REQUEST":{"type":"string"},"INVALID_TARGET_LANGUAGE":{"type":"string"},"INVALID_SOURCE_LANGUAGE":{"type":"string"},"INVALID_TARGET_LOCALE":{"type":"string"},"CORRECT_REQUIRES_SOURCE":{"type":"string"},"INVALID_PRESET":{"type":"string"},"EMPTY_TEXT":{"type":"string"},"INPUT_TOO_LARGE":{"type":"string"},"ARRAY_TOO_LARGE":{"type":"string"},"JSON_STRUCTURE_TOO_LARGE":{"type":"string"},"TRANSLATE_RATE_LIMITED":{"type":"string"},"TRANSLATION_FAILED":{"type":"string"},"TRANSLATION_EMPTY":{"type":"string"},"TRANSLATION_TIMEOUT":{"type":"string"},"UNKNOWN_COMMAND":{"type":"string"}}},"version":{"type":"string"}}},"processing_time":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/translate/text":{"post":{"operationId":"po-translate-text","summary":"Translate text","tags":["Media AI — Translation"],"externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-translate-text.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to translate: send as JSON string, string[], or object in the raw body (see Input types in docs).","default":"Guten Morgen — PaperOffice Translation API showroom."},"source_language":{"type":"string","description":"Source language code or auto for detection.","default":"de"},"target_language":{"type":"string","description":"Target language code (required). Must be one of the 35 supported codes.","default":"en"},"target_locale":{"type":"string","description":"Optional regional variant (e.g. de-AT, en-GB). From GET /translate/languages → data.target_locale.variants. Prompt hint only.","default":""},"tier":{"type":"string","description":"Quality tier: basic (fast), premium (balanced), ultra (best).","enum":["basic","premium","ultra"],"default":"premium"},"preserve_terms":{"type":"array","description":"String, string[], or object keys kept verbatim on all tiers (basic/premium/ultra). Up to 150 unique terms (1–100 chars each). HTTP 400 PRESERVE_TERMS_LIMIT beyond that.","maxItems":150,"items":{"type":"string","minLength":1,"maxLength":100}},"preserve_terms_preset":{"type":"string","description":"Optional server preset merged with preserve_terms, e.g. paperoffice_brand."},"client_wait":{"type":"boolean","description":"true = inline translation. false or async_only=true = immediate job_id; poll GET /job/get/{job_id} until job_status is completed.","default":true},"async_only":{"type":"boolean","description":"Force immediate job_id (same as client_wait=false). optional JSON body field."}},"required":["text","target_language"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"202":{"$ref":"#/components/responses/JobAccepted"},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/validate/all":{"post":{"operationId":"po-validate-all","summary":"Validate All (Email + Phone + Website)","tags":["Data AI — Validation & VAT"],"description":"Validate email, phone, and/or website in one request. Only provided fields are checked. Pricing: 20 credits flat bundle (cheaper than three separate 10-credit calls when all fields are used).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-validate-all.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to validate"},"phone":{"type":"string","description":"Phone number to validate"},"url":{"type":"string","description":"Website URL to validate (canonical field name)."},"website":{"type":"string","description":"Alias of `url` — website URL to validate. Prefer `url` in new integrations."},"priority":{"type":"integer","description":"Legacy queue priority (compat). Prefer processing_lane Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","minimum":0,"maximum":900,"deprecated":true}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to validate"},"phone":{"type":"string","description":"Phone number to validate"},"url":{"type":"string","description":"Website URL to validate (canonical field name)."},"website":{"type":"string","description":"Alias of `url` — website URL to validate. Prefer `url` in new integrations."},"priority":{"type":"integer","description":"Legacy queue priority (compat). Prefer processing_lane Start-SLA (no_sla|sla_24h|sla_12h|sla_6h|sla_1h|instant).","minimum":0,"maximum":900,"deprecated":true}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Gesamt-Validierung","properties":{"results":{"type":"array","description":"Ergebnis-Array","items":{}},"all_valid":{"type":"boolean","description":"All valid"},"status":{"type":"object","description":"Request status (ok/error)","properties":{"code":{"type":"integer","description":"Error code or status code"},"message":{"type":"string","description":"Status message or error description"},"success":{"type":"boolean","description":"Success"}}},"processing_time":{"type":"string","description":"Processing duration in milliseconds"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/validate/email":{"post":{"operationId":"po-validate-email","summary":"Validate Email Address","tags":["Data AI — Validation & VAT"],"description":"Validate an email address (syntax and MX lookup).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-validate-email.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to validate"}},"required":["email"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to validate"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"E-Mail-Validierung","properties":{"result":{"type":"object","description":"Result","properties":{"email":{"type":"string","description":"Email"},"domain":{"type":"string","description":"Domain"},"is_fake":{"type":"boolean","description":"Is fake"},"is_legitimate":{"type":"boolean","description":"Is legitimate"},"risk_score":{"type":"integer","description":"Risk score"},"risk_level":{"type":"string","description":"Risk level"},"detection_method":{"type":"string","description":"Detection method"},"recommendation":{"type":"string","description":"Recommendation"},"checks":{"type":"object","description":"Checks","properties":{"disposable_domain":{"type":"object","properties":{"is_disposable":{"type":"boolean"},"domain":{"type":"string"}}},"mx_records":{"type":"object","properties":{"has_mx":{"type":"boolean"},"mx_count":{"type":"integer"},"mx_records":{"type":"array","items":{}}}},"patterns":{"type":"object","properties":{"suspicious":{"type":"boolean"},"pattern_matches":{"type":"array","items":{}},"heuristics":{"type":"array","items":{}}}},"domain_reputation":{"type":"object","properties":{"risk_addition":{"type":"integer"},"flags":{"type":"array","items":{}},"domain":{"type":"string"}}}}},"processing_time":{"type":"string","description":"Processing duration in milliseconds"},"from_cache":{"type":"boolean","description":"From cache"}}},"status":{"type":"object","description":"Request status (ok/error)","properties":{"code":{"type":"integer","description":"Error code or status code"},"message":{"type":"string","description":"Status message or error description"},"success":{"type":"boolean","description":"Success"}}},"processing_time":{"type":"string","description":"Processing duration in milliseconds"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/validate/phone":{"post":{"operationId":"po-validate-phone","summary":"Validate Phone Number","tags":["Data AI — Validation & VAT"],"description":"Validate a phone number (E.164 format and carrier lookup).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-validate-phone.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"Phone number to validate (with or without country code, e.g. +49171123456)"}},"required":["phone"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"phone":{"type":"string","description":"Phone number to validate (with or without country code, e.g. +49171123456)"}},"required":["phone"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Telefon-Validierung","properties":{"result":{"type":"object","description":"Result","properties":{"valid":{"type":"boolean","description":"Valid"},"original":{"type":"string","description":"Original"},"cleaned":{"type":"string","description":"Cleaned"},"digits_only":{"type":"string","description":"Digits only"},"country_code":{"type":"string","description":"Country code"},"format":{"type":"string","description":"Format"},"error":{"type":"string","description":"Fehlerdetails falls vorhanden"}}},"status":{"type":"object","description":"Request status (ok/error)","properties":{"code":{"type":"integer","description":"Error code or status code"},"message":{"type":"string","description":"Status message or error description"},"success":{"type":"boolean","description":"Success"}}},"processing_time":{"type":"string","description":"Processing duration in milliseconds"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/validate/website":{"post":{"operationId":"po-validate-website","summary":"Validate Website URL","tags":["Data AI — Validation & VAT"],"description":"Validate a website URL (DNS, SSL certificate, reachability).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-validate-website.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Website URL to validate (e.g. https://example.com)"}},"required":["url"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Website URL to validate (e.g. https://example.com)"}},"required":["url"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Website-Validierung","properties":{"result":{"type":"object","description":"Result","properties":{"url":{"type":"string","description":"Url"},"valid":{"type":"boolean","description":"Valid"},"risk_level":{"type":"string","description":"Risk level"},"recommendation":{"type":"string","description":"Recommendation"},"checks":{"type":"object","description":"Checks","properties":{"format":{"type":"object","properties":{"passed":{"type":"boolean"},"error":{"type":"string"}}}}}}},"status":{"type":"object","description":"Request status (ok/error)","properties":{"code":{"type":"integer","description":"Error code or status code"},"message":{"type":"string","description":"Status message or error description"},"success":{"type":"boolean","description":"Success"}}},"processing_time":{"type":"string","description":"Processing duration in milliseconds"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/vat/quote":{"post":{"operationId":"po-tax-quote-calculate","summary":"Calculate Global Tax Quote","tags":["Data AI — Validation & VAT"],"description":"Calculate global B2B tax quote for appointments or software without Stripe Tax. Supports EU VAT, Reverse Charge, USA states, Canadian provinces and common global VAT/GST jurisdictions.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tax-quote-calculate.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"buyer_country":{"type":"string","description":"Buyer country ISO 3166-1 alpha-2 (required, e.g. DE, US)."},"buyer_subdivision":{"type":"string","description":"State/province code for US/CA sales tax (e.g. CA, TX)."},"postal_code":{"type":"string","description":"Postal/ZIP code for localized tax rates (US/CA)."},"vat_id":{"type":"string","description":"EU VAT ID for B2B reverse-charge validation (VIES)."},"net_cents":{"type":"integer","description":"Net amount in minor currency units (cents)."},"currency":{"type":"string","description":"ISO 4217 currency code (e.g. EUR, USD)."},"product_type":{"type":"string","description":"Product category for tax rules (e.g. software, appointment, service)."}},"required":["buyer_country","net_cents"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"buyer_country":{"type":"string","description":"Buyer country ISO 3166-1 alpha-2 (required, e.g. DE, US)."},"buyer_subdivision":{"type":"string","description":"State/province code for US/CA sales tax (e.g. CA, TX)."},"postal_code":{"type":"string","description":"Postal/ZIP code for localized tax rates (US/CA)."},"vat_id":{"type":"string","description":"EU VAT ID for B2B reverse-charge validation (VIES)."},"net_cents":{"type":"integer","description":"Net amount in minor currency units (cents)."},"currency":{"type":"string","description":"ISO 4217 currency code (e.g. EUR, USD)."},"product_type":{"type":"string","description":"Product category for tax rules (e.g. software, appointment, service)."}},"required":["buyer_country","net_cents"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"tax_rule":{"type":"string"},"tax_rate":{"type":"number"},"net_cents":{"type":"integer"},"tax_cents":{"type":"integer"},"gross_cents":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/vat/rates":{"get":{"operationId":"po-vat-rates-get","summary":"Get EU VAT Rates","tags":["Data AI — Validation & VAT"],"description":"Get EU VAT Rates","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-vat-rates-get.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"EU-MwSt-Saetze","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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"count":{"type":"integer"},"processing_time":{"type":"string"},"rates":{"type":"object","properties":{"AT":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"BE":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"BG":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"CY":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"CZ":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"DE":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"DK":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"EE":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"EL":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"ES":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"FI":{"type":"object","properties":{"standard":{"type":"number"},"reduced":{"type":"integer"}}},"FR":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"number"}}},"HR":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"HU":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"IE":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"IT":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"LT":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"LU":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"LV":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"MT":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"NL":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"PL":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"PT":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"RO":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"SE":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}},"SI":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"number"}}},"SK":{"type":"object","properties":{"standard":{"type":"integer"},"reduced":{"type":"integer"}}}}},"status":{"type":"string"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/vat/validate":{"post":{"operationId":"po-vat-validate","summary":"Validate EU VAT ID","tags":["Data AI — Validation & VAT"],"description":"Validate a European VAT identification number against the EU VIES database. Returns company name, address, validity status, tax context (VAT rates), and optional fraud risk assessment.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-vat-validate.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"vat_id":{"type":"string","description":"EU VAT ID with valid format checksum (e.g. DE111111125, FR12345678901)."},"ip":{"type":"string","description":"IP address for fraud cross-check (optional)"},"email":{"type":"string","description":"Email for fraud cross-check (optional)"},"force_recheck":{"type":"boolean","description":"Bypass validation cache and re-query VIES (uses full request credits)."},"geocoding":{"type":"string","description":"Include geocoded address coordinates in the response when available (default: true)."}},"required":["vat_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"vat_id":{"type":"string","description":"EU VAT ID with valid format checksum (e.g. DE111111125, FR12345678901)."},"ip":{"type":"string","description":"IP address for fraud cross-check (optional)"},"email":{"type":"string","description":"Email for fraud cross-check (optional)"},"force_recheck":{"type":"boolean","description":"Bypass validation cache and re-query VIES (uses full request credits)."},"geocoding":{"type":"string","description":"Include geocoded address coordinates in the response when available (default: true)."}},"required":["vat_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"USt-ID-Validierung","properties":{"status":{"type":"string","description":"Request status (ok/error)"},"vat_id":{"type":"string","description":"Vat id"},"format_valid":{"type":"boolean","description":"Format valid"},"error":{"type":"string","description":"Fehlerdetails falls vorhanden"},"message":{"type":"string","description":"Status message or error description"},"layer":{"type":"string","description":"Layer"},"processing_time_ms":{"type":"integer","description":"Processing time ms"},"processing_time":{"type":"string","description":"Request processing time (e.g. \"123.45ms\")"},"count":{"type":"string","description":"Count"},"results":{"type":"string","description":"Results"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/voice/voices":{"post":{"operationId":"po-tts-get-available-voices","summary":"List available TTS voices","tags":["Media AI — Voice"],"description":"TTS voice catalog: POST /voice/voices. In TTS jobs language wins on mismatch, voice substituted (Abigail+language=de → Anneliese, warnings[]). Returns voices grouped by language with name, gender, tier, sample_url. Optional language...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tts-get-available-voices.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"language":{"type":"string","description":"Optional filter: return only this language bucket (e.g. en, de). Omit for the full catalog."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"language":{"type":"string","description":"Optional filter: return only this language bucket (e.g. en, de). Omit for the full catalog."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"List available TTS voices","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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"message":{"type":"string"},"processing_time":{"type":"string"},"status":{"type":"string"},"total_languages":{"type":"integer"},"total_voices":{"type":"integer"},"voices":{"type":"object","properties":{"ar":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"cs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"de":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"en":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"es-ES":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"es-MX":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"fr":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"hi":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"hu":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"it":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"ja":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"ko":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"nl":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"pl":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"pt-BR":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"pt-PT":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"ru":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"tr":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"zh-cn":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"bg":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"da":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"el":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"et":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"fi":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"he":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"hr":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"id":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"lt":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"lv":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"ms":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"no":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"ro":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"sk":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"sl":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"sr":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"sv":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"th":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"uk":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}},"vi":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"gender":{"type":"string"},"tier":{"type":"string"},"sample_url":{"type":"string"}}}}}}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/weather":{"get":{"operationId":"po-weather-by-city","summary":"Get weather by city","tags":["Data AI — Weather"],"x-paperoffice-variants":[{"slug":"po-weather-by-city","name":"Get weather by city","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-weather-by-city.md"},{"slug":"po-weather-by-coordinates","name":"Get weather by coordinates","docs":"https://api.paperoffice.ai/latest/docs/endpoints/po-weather-by-coordinates.md"}],"description":"Returns current weather and forecast for a city name (geocoded server-side).\n\nThis operation has 2 documented variants (same method and path, different fields):\n- [Get weather by city](https://api.paperoffice.ai/latest/docs/endpoints/po-weather-by-city.md) — Returns current weather and forecast for a city name (geocoded server-side).\n- [Get weather by coordinates](https://api.paperoffice.ai/latest/docs/endpoints/po-weather-by-coordinates.md) — Returns current weather and a multi-day forecast for GPS coordinates.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-weather-by-city.md"},"parameters":[{"name":"city","in":"query","required":false,"schema":{"type":"string"},"description":"City name to geocode (e.g. Berlin, Munich)."},{"name":"country","in":"query","required":false,"schema":{"type":"string"},"description":"Optional ISO country hint to disambiguate the city (e.g. DE, US)."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","default":"en"},"description":"Response language for condition text."},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Alias for lang."},{"name":"lat","in":"query","required":false,"schema":{"type":"number"},"description":"Latitude (-90 to 90)."},{"name":"lon","in":"query","required":false,"schema":{"type":"number"},"description":"Longitude (-180 to 180)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/webhooks/delete":{"post":{"operationId":"po-webhooks-delete","summary":"Delete Webhook Subscription","tags":["Document AI — Webhooks"],"description":"po_webhooks_delete: Delete a webhook subscription. Delivery logs are preserved for audit purposes. Keywords: delete webhook, remove subscription, unsubscribe. Accepts subscription_id or id. Response echoes both id and subscription_id.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-webhooks-delete.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription_id":{"type":"integer","description":"ID of the subscription to delete"}},"required":["subscription_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/webhooks/list":{"get":{"operationId":"po-webhooks-list","summary":"List Webhook Subscriptions","tags":["Document AI — Webhooks"],"description":"po_webhooks_list: List all webhook subscriptions for the current account — active and inactive (is_active per row). Optional is_active=true|false filter; include_deleted=true returns only soft-deleted rows. Shows URL, events, retry...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-webhooks-list.md"},"parameters":[{"name":"is_active","in":"query","required":false,"schema":{"type":"boolean"},"description":"Optional filter: true = only active, false = only inactive. Omit for all. Accepts true/false, 1/0, yes/no, on/off (JSON boolean or form string); other values return 400 INVALID_BOOLEAN."},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"true = return only soft-deleted subscriptions (audit). Accepts true/false, 1/0, yes/no, on/off (JSON boolean or form string); other values return 400 INVALID_BOOLEAN."}],"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"},"account_id":{"type":"integer"},"plan":{"type":"object","properties":{"tier":{"type":"string"},"name":{"type":"string"}}},"credits_billed":{"type":"integer"}}},"processing_time":{"type":"string"},"status":{"type":"string"},"subscriptions":{"type":"array","items":{}},"total":{"type":"integer"}},"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/webhooks/subscribe":{"post":{"operationId":"po-webhooks-subscribe","summary":"Create Webhook Subscription","tags":["Document AI — Webhooks"],"description":"po_webhooks_subscribe: Create a new webhook subscription. Payloads are signed with HMAC-SHA256. Response includes id and subscription_id (same value) — save either for po_webhooks_test, po_webhooks_update, po_webhooks_delete. Auto...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-webhooks-subscribe.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name for the subscription (required)."},"url":{"type":"string","description":"Webhook target URL (HTTPS recommended)."},"events":{"type":"array","description":"Event types, e.g. [\"document.uploaded\",\"document.edited\"], or [\"*\"] for all. Full list: see the tool description.","items":{"type":"string"}},"secret":{"type":"string","description":"HMAC secret (auto-generated if empty)."},"filters":{"type":"object","description":"Optional Filter (e.g. workspace_id, pofid)"},"headers":{"type":"object","description":"Additional HTTP headers as key-value pairs"},"retry_policy":{"type":"string","description":"Retry policy: none, linear, or exponential (default: exponential).","enum":["none","linear","exponential"]},"max_retries":{"type":"integer","description":"Maximum delivery retries after failure (0–10, default 5).","default":5,"minimum":0,"maximum":10},"timeout_ms":{"type":"integer","description":"Timeout in ms (1000-30000, default: 10000)"},"is_active":{"type":"boolean","description":"Create the subscription active (true, default) or inactive (false). Accepts true/false, 1/0, yes/no, on/off (JSON boolean or form string); other values return 400 INVALID_BOOLEAN.","default":true}},"required":["name","url","events"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"id":{"type":"integer","description":"Subscription ID (canonical, same as subscription_id)"},"subscription_id":{"type":"integer","description":"Alias for id — use for update/test/delete"},"secret":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"events_requested":{"type":"array","items":{"type":"string"}},"events_resolved":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}},"required":["status","id","subscription_id","secret","events"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/webhooks/test":{"post":{"operationId":"po-webhooks-test","summary":"Test webhook","tags":["Document AI — Webhooks"],"description":"po_webhooks_test: Send a test.ping event to a webhook subscription to verify connectivity. Shows status code, response time, and response body. Delivery is logged. Keywords: test webhook, ping, verify webhook, test connectivity...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-webhooks-test.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription_id":{"type":"integer","description":"ID of the Subscription (Required)"}},"required":["subscription_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/webhooks/update":{"post":{"operationId":"po-webhooks-update","summary":"Update Webhook Subscription","tags":["Document AI — Webhooks"],"description":"po_webhooks_update: Update an existing webhook subscription. Can change name, URL, events, secret, filters, headers, retry policy, active status, and timeouts. Keywords: update webhook, modify subscription, change webhook. Accepts...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-webhooks-update.md"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subscription_id":{"type":"integer","description":"ID of the Subscription (Required)"},"name":{"type":"string","description":"New subscription name."},"url":{"type":"string","description":"New webhook URL."},"events":{"type":"array","description":"New event list.","items":{"type":"string"}},"secret":{"type":"string","description":"New signing secret."},"filters":{"type":"object","description":"new Filter"},"headers":{"type":"object","description":"New custom headers."},"is_active":{"type":"boolean","description":"Set subscription active (true) or inactive (false). Reactivation resets the auto-disable failure counter. Accepts true/false, 1/0, yes/no, on/off (JSON boolean or form string); other values return 400 INVALID_BOOLEAN."},"retry_policy":{"type":"string","description":"Retry policy: none, linear, or exponential (default: exponential).","enum":["none","linear","exponential"]},"max_retries":{"type":"integer","description":"New maximum retry count."},"timeout_ms":{"type":"integer","description":"New timeout in milliseconds."}},"required":["subscription_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow/system_list":{"get":{"operationId":"po-orchestration-list-system-templates","summary":"System templates","tags":["Document AI — Workflow Orchestration"],"description":"List built-in system workflow templates (read-only catalog).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-orchestration-list-system-templates.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"System-Workflow-Templates auflisten","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object"}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/claim":{"post":{"operationId":"po-tasks-claim-task","summary":"Claim task","tags":["Document AI — Tasks & Substitutes"],"description":"Claim a task for yourself. Requires task_id. Use when processing tasks from the task queue.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-claim-task.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"task_id":{"type":"string","description":"ID of the task","default":""}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"task_id":{"type":"string","description":"ID of the task","default":""}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Aufgabe uebernehmen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"claimed":{"type":"boolean"},"task_id":{"type":"string"},"claimed_by":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/complete":{"post":{"operationId":"po-tasks-complete-task","summary":"Complete task","tags":["Document AI — Tasks & Substitutes"],"description":"Complete a workflow or human task. Identify the task with one of task_uuid, task_id or uuid. Optional: result (object, stored as the task result), comment (audit trail) and claim_session_id (when the task is claimed).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-complete-task.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Task UUID. Provide one of task_uuid, task_id, or uuid."},"task_id":{"type":["string","integer"],"description":"Task UUID string or numeric database id. Provide one of task_uuid, task_id, or uuid."},"uuid":{"type":"string","description":"Task UUID alias. Provide one of task_uuid, task_id, or uuid."},"result":{"type":"object","description":"Task result, stored with the task. Approvals of tasks that resume an agent workflow require {\"decision\": \"approve\"}.","properties":{"decision":{"type":"string","description":"\"approve\" for an approval. Rejections: po_tasks_reject_task or po_tasks_resolve_task."}},"additionalProperties":true},"comment":{"type":"string","description":"Optional completion comment for the audit trail."},"claim_session_id":{"type":"string","description":"Claim session ID when the task is claimed (parallel review locking)."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Task UUID. Provide one of task_uuid, task_id, or uuid."},"task_id":{"type":["string","integer"],"description":"Task UUID string or numeric database id. Provide one of task_uuid, task_id, or uuid."},"uuid":{"type":"string","description":"Task UUID alias. Provide one of task_uuid, task_id, or uuid."},"result":{"type":"object","description":"Task result, stored with the task. Approvals of tasks that resume an agent workflow require {\"decision\": \"approve\"}.","properties":{"decision":{"type":"string","description":"\"approve\" for an approval. Rejections: po_tasks_reject_task or po_tasks_resolve_task."}},"additionalProperties":true},"comment":{"type":"string","description":"Optional completion comment for the audit trail."},"claim_session_id":{"type":"string","description":"Claim session ID when the task is claimed (parallel review locking)."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Aufgabe abschliessen","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"completed":{"type":"boolean"},"task_id":{"type":"string"},"decision":{"type":"string","description":"Entscheidung (approve/reject/custom)"},"workflow_continued":{"type":"boolean"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/escalate":{"post":{"operationId":"po-tasks-escalate-task","summary":"Escalate workflow task","tags":["Document AI — Tasks & Substitutes"],"description":"Escalate workflow task. POST /workflow_tasks/escalate with task_uuid and reason.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-escalate-task.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Workflow task UUID to escalate."},"reason":{"type":"string","description":"Human-readable escalation reason for the audit trail."}},"required":["task_uuid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Workflow task UUID to escalate."},"reason":{"type":"string","description":"Human-readable escalation reason for the audit trail."}},"required":["task_uuid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/get":{"post":{"operationId":"po-tasks-get-task-details","summary":"Get task details","tags":["Document AI — Tasks & Substitutes"],"description":"Get detailed information about a specific task: title, description, status, priority, due_date, assigned_to, created_by. Requires task_id.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-get-task-details.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"task_id":{"type":"string","description":"ID of the task"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"task_id":{"type":"string","description":"ID of the task"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Aufgaben-Details","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"task_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"workflow_id":{"type":"string"},"document_pofid":{"type":"string"},"form_data":{"type":"object"},"created_at":{"type":"string","format":"date-time"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/mark_read":{"post":{"operationId":"po-tasks-mark-as-read","summary":"Mark Task Read","tags":["Document AI — Tasks & Substitutes"],"description":"Mark all unread workflow notifications for a task as read. Parameter task_id: numeric DB id, task_uuid, or notification_id.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-mark-as-read.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"task_id":{"type":"string","description":"ID of the task","default":""}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"task_id":{"type":"string","description":"ID of the task","default":""}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"marked":{"type":"boolean"},"already_read":{"type":"boolean"},"updated":{"type":"integer"},"task_id":{"type":"integer"},"task_uuid":{"type":"string","format":"uuid"},"resolution":{"type":"string","enum":["task","notification"]}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/my":{"get":{"operationId":"po-tasks-list-my-tasks","summary":"List my tasks","tags":["Document AI — Tasks & Substitutes"],"description":"List all tasks assigned to the current user. Returns task_id, title, status, priority, due_date, assigned_by. Filter by status, priority (low|normal|high|urgent; medium maps to normal), and step_type. Use processing_lane for Start-SLA...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-list-my-tasks.md"},"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","in_progress","awaiting_reviews","completed","rejected","expired","escalated","all"]},"description":"Filter by status. Omit for open tasks (pending, in_progress, awaiting_reviews). Use all for every status."},{"name":"priority","in":"query","required":false,"schema":{"type":"string","enum":["low","normal","high","urgent"]},"description":"LEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product."},{"name":"step_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by step type (e.g. approval, review, manual_input, hitl_review)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"minimum":1,"maximum":100},"description":"Maximum number of tasks"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"minimum":0},"description":"Pagination offset"},{"name":"processing_lane","in":"query","required":false,"schema":{"type":"string","enum":["no_sla","sla_24h","sla_12h","sla_6h","sla_1h","instant"]},"description":"Start-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Meine Aufgaben auflisten","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"tasks":{"type":"array","items":{"type":"object","properties":{"task_id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["pending","claimed","completed","expired"]},"workflow_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"due_date":{"type":"string","format":"date-time"}}}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/reject":{"post":{"operationId":"po-tasks-reject-task","summary":"Reject workflow task","tags":["Document AI — Tasks & Substitutes"],"description":"Reject a workflow or approval task with task_uuid (or task_id / uuid) and reason (required, audit trail; 400 REASON_REQUIRED without it). A waiting agent workflow continues with the rejection and the requested tool call is not executed...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-reject-task.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Workflow task UUID to reject."},"reason":{"type":"string","description":"Rejection reason (required, audit trail)"}},"required":["task_uuid","reason"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Workflow task UUID to reject."},"reason":{"type":"string","description":"Rejection reason (required, audit trail)"}},"required":["task_uuid","reason"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/release":{"post":{"operationId":"po-tasks-release-task","summary":"Release workflow task claim","tags":["Document AI — Tasks & Substitutes"],"description":"Release claimed workflow task. POST /workflow_tasks/release with task_uuid.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-release-task.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Workflow task UUID to release back to the queue."}},"required":["task_uuid"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Workflow task UUID to release back to the queue."}},"required":["task_uuid"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_tasks/resolve":{"post":{"operationId":"po-tasks-resolve-task","summary":"Resolve task","tags":["Document AI — Tasks & Substitutes"],"description":"IDEMPOTENCY: with decision=postpone an idempotency_key (body or Idempotency-Key header, 8 to 128 characters) behaves exactly like on po_documents_create_from_content — repeating the SAME payload replays the stored result...","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-tasks-resolve-task.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Task UUID. Provide one of task_uuid, task_id, or uuid."},"task_id":{"type":["string","integer"],"description":"Task UUID string or numeric database id. Provide one of task_uuid, task_id, or uuid."},"uuid":{"type":"string","description":"Task UUID alias. Provide one of task_uuid, task_id, or uuid."},"decision":{"type":"string","description":"Reviewer decision (required): approve, reject, escalate, or postpone.","enum":["approve","reject","escalate","postpone"]},"comment":{"type":"string","description":"Optional comment."},"reject_comment":{"type":"string","description":"Rejection comment (when decision is `reject`)."},"reject_reason_id":{"type":"string","description":"Rejection reason ID."},"field_results":{"type":"object","description":"HITL field review map keyed by field id. Each value: { action: accept|correct, value, corrected_value }.","additionalProperties":{"type":"object","properties":{"action":{"type":"string","enum":["accept","correct"]},"value":{"type":"string"},"corrected_value":{"type":"string"},"corrected":{"type":"boolean"}}}},"check_results":{"type":"object","description":"HITL binary check map keyed by check id. Each value: { answer } or a scalar answer.","additionalProperties":true},"claim_session_id":{"type":"string","description":"Claim session ID for parallel review locking."},"idempotency_key":{"type":"string","description":"Optional request idempotency key for decision=postpone (same key = same result, no second postponement). Also accepted as Idempotency-Key header."},"result":{"type":"object","description":"Optional task result for decision=approve, stored with the task (approved=true is always recorded).","additionalProperties":true}},"required":["decision"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"task_uuid":{"type":"string","description":"Task UUID. Provide one of task_uuid, task_id, or uuid."},"task_id":{"type":["string","integer"],"description":"Task UUID string or numeric database id. Provide one of task_uuid, task_id, or uuid."},"uuid":{"type":"string","description":"Task UUID alias. Provide one of task_uuid, task_id, or uuid."},"decision":{"type":"string","description":"Reviewer decision (required): approve, reject, escalate, or postpone.","enum":["approve","reject","escalate","postpone"]},"comment":{"type":"string","description":"Optional comment."},"reject_comment":{"type":"string","description":"Rejection comment (when decision is `reject`)."},"reject_reason_id":{"type":"string","description":"Rejection reason ID."},"field_results":{"type":"object","description":"HITL field review map keyed by field id. Each value: { action: accept|correct, value, corrected_value }.","additionalProperties":{"type":"object","properties":{"action":{"type":"string","enum":["accept","correct"]},"value":{"type":"string"},"corrected_value":{"type":"string"},"corrected":{"type":"boolean"}}}},"check_results":{"type":"object","description":"HITL binary check map keyed by check id. Each value: { answer } or a scalar answer.","additionalProperties":true},"claim_session_id":{"type":"string","description":"Claim session ID for parallel review locking."},"idempotency_key":{"type":"string","description":"Optional request idempotency key for decision=postpone (same key = same result, no second postponement). Also accepted as Idempotency-Key header."},"result":{"type":"object","description":"Optional task result for decision=approve, stored with the task (approved=true is always recorded).","additionalProperties":true}},"required":["decision"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"task_uuid":{"type":"string"},"task_status":{"type":"string"},"decision":{"type":"string","description":"approve|reject|escalate|postpone"},"reviews_completed":{"type":"integer"},"reviews_required":{"type":"integer"},"consensus_reached":{"type":"boolean"},"credits_charged":{"type":"integer"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_templates/delete":{"post":{"operationId":"po-workflow-templates-delete-template","summary":"Delete template","tags":["Document AI — Workflow Orchestration"],"description":"Deactivate a user workflow template (soft delete).","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workflow-templates-delete-template.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"uuid":{"type":"string","description":"Workflow template UUID from po_workflow_templates_list_templates (preferred)."},"template_id":{"type":"string","description":"Alias for uuid."},"workflow_id":{"type":"string","description":"Legacy alias for template uuid (not system workflow id). Mapped to uuid server-side."},"id":{"type":"string","description":"Alias for uuid."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"uuid":{"type":"string","description":"Workflow template UUID from po_workflow_templates_list_templates (preferred)."},"template_id":{"type":"string","description":"Alias for uuid."},"workflow_id":{"type":"string","description":"Legacy alias for template uuid (not system workflow id). Mapped to uuid server-side."},"id":{"type":"string","description":"Alias for uuid."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"deleted":{"type":"boolean"},"uuid":{"type":"string"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_templates/get":{"post":{"operationId":"po-workflow-templates-get-template","summary":"Get template","tags":["Document AI — Workflow Orchestration"],"description":"Load one workflow template by ID.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workflow-templates-get-template.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"uuid":{"type":"string","description":"Deprecated alias for workflow_id."},"template_id":{"type":"string","description":"Deprecated alias for workflow_id."},"workflow_id":{"type":"string","description":"System workflow ID from GET /workflow/system_list (canonical)."},"id":{"type":"string","description":"Deprecated alias for workflow_id."}},"required":["workflow_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"uuid":{"type":"string","description":"Deprecated alias for workflow_id."},"template_id":{"type":"string","description":"Deprecated alias for workflow_id."},"workflow_id":{"type":"string","description":"System workflow ID from GET /workflow/system_list (canonical)."},"id":{"type":"string","description":"Deprecated alias for workflow_id."}},"required":["workflow_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Einzelnes Workflow-Template laden","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"nodes":{"type":"array","items":{}},"edges":{"type":"array","items":{}},"trigger_type":{"type":"string"},"is_active":{"type":"boolean"},"version":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workflow_templates/list":{"get":{"operationId":"po-workflow-templates-list-templates","summary":"List Workflow Templates","tags":["Document AI — Workflow Orchestration"],"description":"List user workflow templates (graph + agent templates) for the authenticated account.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workflow-templates-list-templates.md"},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Workflow-Templates auflisten","properties":{"status":{"type":"string","description":"HTTP-Level Status","enum":["success","error"]},"job_id":{"type":"string","pattern":"^poai-job_.*"},"message":{"type":"string","description":"Menschenlesbare Statusmeldung"},"pipeline":{"type":"string"},"operation":{"type":"string","description":"Ausgefuehrte Operation"},"processing_time":{"type":"string","description":"Gesamte Verarbeitungszeit inkl. Queue (Format: 123.45ms)"},"result":{"type":"object","description":"Das eigentliche Verarbeitungsergebnis","properties":{"status":{"type":"string","description":"Job-Level Status","enum":["completed","failed","timeout"]},"message":{"type":"string","description":"Pipeline-spezifische Statusmeldung"},"duration_ms":{"type":"string","description":"Reine Pipeline-Verarbeitungszeit in ms"},"output":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"trigger_type":{"type":"string"},"is_active":{"type":"boolean"},"version":{"type":"number"},"deployed_version":{"type":"number"},"created_at":{"type":"string","format":"date-time"}}}},"total":{"type":"number"}}}}}},"required":["status","job_id","result"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}},"/workspaces/access-check":{"post":{"operationId":"po-workspaces-security-check-access","summary":"Check workspace security access","tags":["Document AI — DMS"],"description":"Check workspace password/SMS lock status, ACL membership, and whether a valid unlock session exists for this Bearer. Returns protection_type, masked phones, and next_steps when locked.","externalDocs":{"url":"https://api.paperoffice.ai/latest/docs/endpoints/po-workspaces-security-check-access.md"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Required: Workspace ID to check access for"}},"required":["workspace_id"]}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Required: Workspace ID to check access for"}},"required":["workspace_id"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"Workspace access check","properties":{"processing_time":{"type":"string","description":"Processing time (format: 123.45ms)"},"has_access":{"type":"boolean","description":"Has access"},"requires_password":{"type":"boolean","description":"Requires password"},"requires_code":{"type":"boolean","description":"Requires code"},"status":{"type":"string","description":"Request status: \"success\" or \"error\"","enum":["success","error"]}},"required":["processing_time"],"additionalProperties":true}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"`po_sk_` (secret key) or `po_ut_` (user token) server-side; `po_pk_` (publishable key) for browsers, origin-locked and budget-capped. Documentation routes under `/docs/` also answer without a Bearer (visitor tier)."}},"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},"JobAccepted":{"type":"object","description":"The hold window ended while the job is still running. Poll `poll_url` or `GET /job/get/{job_id}` until `job_status` is `completed`, then read `result ?? job_result`.","properties":{"status":{"type":"string"},"job_id":{"type":"string"},"poll_url":{"type":"string"},"max_wait_seconds":{"type":"number"},"client_wait":{"type":"boolean"}},"required":["job_id"],"additionalProperties":true}},"responses":{"JobAccepted":{"description":"Accepted — job continues in the background","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}