{"swagger": "2.0", "basePath": "/v1/parble", "paths": {"/accounting/balance": {"get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/BalanceSchema"}}}, "summary": "Return the current account balance", "description": "The returned object includes the total all-time credit, the total all-time usage\nand the current balance which is simply the remaining credit. All are expressed in units (documents).\n\nNote that the balance may be slightly delayed and won't be updated in real-time.", "operationId": "get_balance_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["accounting"]}}, "/accounting/checkout": {"post": {"responses": {"401": {"description": "Unauthorized"}, "501": {"description": "Accounting feature not enabled"}, "400": {"description": "Invalid organization plan"}, "201": {"description": "Success", "schema": {"$ref": "#/definitions/CheckoutSchema"}}}, "summary": "Create a checkout session for the organization", "description": "**Deprecated**: Moving to invoiced consumption via the customer portal instead.\nUse POST /accounting/customer_portal to manage billing.", "operationId": "post_checkout_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "deprecated": true, "tags": ["accounting"]}}, "/accounting/customer_portal": {"post": {"responses": {"401": {"description": "Unauthorized"}, "501": {"description": "Accounting feature not enabled"}, "400": {"description": "Invalid organization plan"}, "201": {"description": "Success", "schema": {"$ref": "#/definitions/CustomerPortalSchema"}}}, "summary": "Create a temporary link to the customer portal", "operationId": "post_customer_portal_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["accounting"]}}, "/api_keys": {"post": {"responses": {"401": {"description": "Unauthorized"}, "201": {"description": "Success", "schema": {"$ref": "#/definitions/ApiKeySchema"}}, "403": {"description": "Permission insufficient"}}, "summary": "Create a new API key", "description": "The key is bound to the current user, expires in 3 months, and is active immediately.\nNo request body is needed. The full key value is only returned in this response.\n\n**Permission required:** write_settings", "operationId": "post_api_keys_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["api_keys"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"type": "array", "items": {"$ref": "#/definitions/ApiKeySchema"}}}, "403": {"description": "Permission insufficient"}}, "summary": "Get a list of all API keys", "description": "**Permission required:** read_api_keys", "operationId": "get_api_keys_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["api_keys"]}}, "/api_keys/{api_key_id}": {"parameters": [{"name": "api_key_id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "Api key not found"}, "204": {"description": "Successfully deleted"}, "403": {"description": "Permission insufficient"}}, "summary": "Delete a specific API key", "description": "**Permission required:** write_settings", "operationId": "delete_api_key_resource", "tags": ["api_keys"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "Api key not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/ApiKeySchema"}}, "403": {"description": "Permission insufficient"}}, "summary": "Get a specific API key", "description": "**Permission required:** read_api_keys", "operationId": "get_api_key_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["api_keys"]}}, "/auth/": {"post": {"responses": {"401": {"description": "Unauthorized"}, "423": {"description": "Account locked"}, "400": {"description": "Missing or malformed JSON body"}, "201": {"description": "Success", "schema": {"$ref": "#/definitions/AuthReplyModel"}}}, "summary": "Create a JWT for the current user", "description": "Pass the returned token as a Bearer token in subsequent requests.", "operationId": "post_auth_session_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/AuthModel"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["auth"]}}, "/auth/logout": {"post": {"responses": {"400": {"description": "Logout impossible"}, "204": {"description": "Success"}}, "summary": "Revoke the current token, effectively logging out the user", "operationId": "post_auth_logout_resource", "tags": ["auth"]}}, "/chunking/process": {"post": {"responses": {"504": {"description": "Chunking did not complete in time"}, "413": {"description": "File too large"}, "401": {"description": "Unauthorized"}, "400": {"description": "Invalid request"}, "200": {"description": "Chunking result", "schema": {"$ref": "#/definitions/ChunkingResult"}}}, "summary": "Upload a document and receive its text split into chunks", "operationId": "post_chunk_process_resource", "parameters": [{"name": "file", "in": "formData", "type": "file", "required": true, "description": "Document file to process"}, {"name": "chunk_size", "in": "formData", "type": "integer", "description": "Target chunk size in characters (100-50 000)", "default": 2048}, {"name": "tolerance", "in": "formData", "type": "integer", "description": "Allowed overshoot in characters (0-chunk_size)", "default": 512}, {"name": "redact_structured_data", "in": "formData", "type": "boolean", "description": "Redact structured PII (emails, NI numbers, phone numbers)", "default": false}, {"name": "redact_entities", "in": "formData", "type": "boolean", "description": "Redact named entities (people, locations, organizations)", "default": false}, {"name": "output_format", "in": "formData", "type": "string", "description": "Output format", "default": "text", "enum": ["text", "markdown"]}], "consumes": ["multipart/form-data"], "tags": ["chunking"]}}, "/files": {"post": {"responses": {"401": {"description": "Unauthorized"}, "303": {"description": "Upload timed out, you can find the file at the url specified once it finishes processing"}, "404": {"description": "Inbox not found"}, "200": {"description": "Upload was successful", "schema": {"$ref": "#/definitions/FileSchema"}}}, "summary": "Upload a file for extraction", "description": "When `sync=true` (default), waits for processing to complete and returns the full extraction\nresult. When `sync=false`, returns immediately with just the file id; poll `GET /files/<id>`\nor configure a webhook to receive results.", "operationId": "post_files_resource", "parameters": [{"name": "file", "in": "formData", "type": "file", "required": true, "description": "File to process"}, {"name": "inbox_id", "in": "formData", "type": "string", "description": "Inbox to use. If not set, we use the default one"}, {"name": "sync", "in": "formData", "type": "boolean", "default": true}, {"name": "callback_url", "in": "formData", "type": "string", "description": "Requires a webhook, if a webhook is configured, this callback_url can be used to overrule the target of the webhook"}, {"name": "known_fields", "in": "formData", "type": "string", "description": "JSON string of key-value pairs representing known information about the document. These need to be present in every format of the project as non-generative-AI labels and are returned in the output. They are also passed into all predictors."}, {"name": "extra_instructions", "in": "formData", "type": "string", "description": "Extra prompt that is passed to the AI"}], "consumes": ["multipart/form-data"], "tags": ["files"]}}, "/files/excel": {"post": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "No files found using the given filter"}, "400": {"description": "You must choose either 'inbox_id' or 'document_ids'"}, "200": {"description": "Success"}}, "summary": "Get an Excel spreadsheet of all files with an optional filter", "operationId": "post_files_excel_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/FilterSchema"}}], "tags": ["files"]}}, "/files/{file_id}": {"parameters": [{"name": "file_id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "File not found"}, "409": {"description": "Document is referenced as a format's reference file"}, "204": {"description": "Successfully deleted"}}, "summary": "Delete a specific file", "operationId": "delete_file_resource", "tags": ["files"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "File not found"}, "400": {"description": "The Accept header value is not supported"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/FileSchema"}}}, "summary": "Get the json (predictions or feedback), generated pdf, or text of a file", "operationId": "get_file_resource", "parameters": [{"name": "version_type", "in": "query", "type": "string", "description": "When choosing 'application/json', the default is to return the predictions, but it is possible to request 'feedback' if it is present", "default": "predictions", "enum": ["predictions", "feedback"]}], "produces": ["application/json", "application/pdf", "text/plain"], "tags": ["files"]}}, "/files/{file_id}/feedback": {"parameters": [{"name": "file_id", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"200": {"description": "Success"}, "403": {"description": "Permission insufficient"}}, "summary": "Submit corrected values (feedback) for a document", "description": "The submitted values are compared synchronously against the existing predictions to compute\nevaluation metrics.\n\n**Permission required:** write_files", "operationId": "post_document_submit_eval_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/FeedbackFileSchema"}}], "tags": ["files"]}}, "/files/{file_id}/find": {"parameters": [{"name": "file_id", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"500": {"description": "Server error"}, "404": {"description": "File not found"}, "400": {"description": "Invalid input"}, "200": {"description": "Detected redaction coordinates"}}, "summary": "Detect areas to redact in a document using GenAI", "description": "Given a document/file ID and a list of fields to detect (each with field_name and prompt),\nthis endpoint uses GenAI to identify the locations of those fields in the document.\n\nReturns a list of coordinates where each coordinate is:\n[page, x0, y0, x1, y1] with x and y normalized between 0 and 1.", "operationId": "post_detect_redaction_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/DetectRedactionRequest"}}], "tags": ["files"]}}, "/files/{file_id}/image/{page}": {"parameters": [{"name": "file_id", "in": "path", "required": true, "type": "string"}, {"name": "page", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "File not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/FileSchema"}}}, "summary": "Return the page image for a given file and page number", "operationId": "get_file_image_resource", "parameters": [{"name": "width", "in": "query", "type": "integer", "description": "Thumbnail width in pixels (optional)"}, {"name": "height", "in": "query", "type": "integer", "description": "Thumbnail height in pixels (optional)"}], "produces": ["image/jpeg"], "tags": ["files"]}}, "/files/{file_id}/redacted_pdf": {"parameters": [{"name": "file_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"500": {"description": "Server error"}, "404": {"description": "File or redacted PDF not found"}, "200": {"description": "Redacted PDF file"}}, "summary": "Download a stored redacted PDF for a document", "description": "Returns the redacted PDF file if one has been generated and saved for this document.", "operationId": "get_download_redacted_pdf_resource", "tags": ["files"]}}, "/files/{file_id}/reprocess": {"parameters": [{"name": "file_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "File not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/FileSchema"}}}, "summary": "Perform/schedule file reprocessing", "description": "Depending on the sync flag, it works synchronously or asynchronously.\nIn async mode, results need to be consulted by a separate call (or webhook).\nIn sync mode, results will be returned directly.", "operationId": "get_file_reprocess_resource", "tags": ["files"]}}, "/files/{file_id}/reverse/{page_number}": {"parameters": [{"description": "The number of the page, starting from 0.", "name": "page_number", "in": "path", "required": true, "type": "string"}, {"name": "file_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "File or page not found"}, "200": {"description": "Success"}}, "summary": "Get the reverse JSON for a specific page of a file", "description": "The reverse JSON contains word-level OCR data with bounding box coordinates.\nCoordinates are returned as relative values (0-1 range) normalized by page dimensions.", "operationId": "get_file_reverse_resource", "tags": ["files"]}}, "/inboxes/": {"post": {"responses": {"404": {"description": "One of the referenced dedicated inboxes was not found"}, "422": {"description": "Validation error"}, "401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/InboxIdSchema"}}}, "summary": "Create a new inbox", "description": "**Without `doctype_inboxes`**: creates a single-type inbox (dedicated inbox) for one document\ntype. Use `/fields` and `/reference_file` to configure extraction fields and upload a sample\ndocument.\n\n**With `doctype_inboxes`**: creates a bundle inbox that routes documents across several\nexisting single-type inboxes. Each referenced inbox must handle exactly one document type.\nA `name` is required.\n\nReturns the id of the newly created inbox.", "operationId": "post_parble_inboxes_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/WizardCreateInboxSchema"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["inboxes"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"type": "array", "items": {"$ref": "#/definitions/InboxOverviewSchema"}}}}, "summary": "List all inboxes", "description": "Returns id, name, document count, and whether each inbox is a bundle.\nFor bundle inboxes, also returns the IDs of the constituent single-type inboxes\nunder `doctype_inboxes`.", "operationId": "get_parble_inboxes_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["inboxes"]}}, "/inboxes/{inbox_id}": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"422": {"description": "Dedicated inbox still referenced by a bundle inbox"}, "401": {"description": "Unauthorized"}, "204": {"description": "Success"}}, "summary": "Delete an inbox and all documents within it", "description": "Single-type inboxes cannot be deleted while they are still referenced by a bundle inbox.", "operationId": "delete_parble_inbox_resource", "tags": ["inboxes"]}, "patch": {"responses": {"401": {"description": "Unauthorized"}, "204": {"description": "Inbox updated successfully"}, "422": {"description": "Invalid inboxes"}, "404": {"description": "Inbox not found"}}, "summary": "Update the document types covered by a bundle inbox, or rename it", "description": "Only bundle inboxes can be updated with this endpoint.\n`doctype_inboxes` must be a non-empty list of IDs of single-type inboxes, each linked to\nexactly one document type. An empty list is rejected with 422.", "operationId": "patch_parble_inbox_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/WizardCreateInboxSchema"}}], "tags": ["inboxes"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/InboxOverviewSchema"}}}, "summary": "Get a specific inbox", "operationId": "get_parble_inbox_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["inboxes"]}}, "/inboxes/{inbox_id}/fields": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"401": {"description": "Unauthorized"}, "204": {"description": "Fields stored successfully"}, "409": {"description": "Duplicate field name, duplicate document type, or default document type mismatch"}, "422": {"description": "Expected a dedicated inbox (not a bundle)"}, "404": {"description": "Inbox not found"}}, "summary": "Update the extraction fields (document type, header fields, tables) for a single-type inbox", "description": "Only single-type (dedicated) inboxes support this operation.\nReturns 409 for a duplicate field name, a conflicting document type name, or a document type\nname that does not match the inbox's configured document type.", "operationId": "patch_parble_inbox_fields_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/WizardFormatRequestSchema"}}], "tags": ["inboxes"]}, "get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/WizardFormatAndPredictionSchema"}}, "404": {"description": "Inbox not Found"}, "401": {"description": "Unauthorized"}}, "summary": "Get the extraction field configuration for an inbox", "description": "The `format` key contains the field definitions (document type, header fields, tables).\nThe `prediction` key contains the latest extraction result for the reference document, if any.", "operationId": "get_parble_inbox_fields_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["inboxes"]}}, "/inboxes/{inbox_id}/fields/versions": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success", "schema": {"type": "array", "items": {"$ref": "#/definitions/WizardFormatResponseSchemaBasic"}}}, "404": {"description": "Inbox not Found"}, "401": {"description": "Unauthorized"}}, "summary": "Get the version history of field configurations for an inbox", "operationId": "get_parble_inbox_fields_versions_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["inboxes"]}}, "/inboxes/{inbox_id}/files": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/InboxSummarySchema"}}, "404": {"description": "Inbox not Found"}, "401": {"description": "Unauthorized"}}, "summary": "List all files in an inbox, with their processing status and filename", "operationId": "get_parble_inbox_list_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["inboxes"]}}, "/inboxes/{inbox_id}/formats": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"404": {"description": "Inbox not Found"}, "401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"type": "array", "items": {"$ref": "#/definitions/InboxFormatsSchema"}}}}, "summary": "List the document types (formats) attached to an inbox", "description": "Returns one entry for single-type inboxes and one entry per document type for bundle inboxes.", "operationId": "get_parble_inbox_formats_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["inboxes"]}}, "/inboxes/{inbox_id}/formats/{format_id}": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}, {"name": "format_id", "in": "path", "required": true, "type": "string"}], "patch": {"responses": {"401": {"description": "Unauthorized"}, "409": {"description": "Duplicate field name, duplicate document type, or default document type mismatch"}, "404": {"description": "Inbox or format not found"}, "204": {"description": "Format updated successfully"}}, "summary": "Update the extraction fields of a specific document type attached to an inbox", "description": "Works for both single-type and bundle inboxes. The document type is identified by its format\nid, which must belong to the inbox.\n\nFor single-type inboxes, also attempts to rename the inbox to match the new document type\nname (best-effort, conflicts are silently ignored).", "operationId": "patch_parble_inbox_format_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/WizardFormatRequestSchema"}}], "tags": ["inboxes"]}}, "/inboxes/{inbox_id}/reference_file": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}], "put": {"responses": {"422": {"description": "Expected a dedicated inbox (not a bundle)"}, "401": {"description": "Unauthorized"}, "404": {"description": "Inbox not Found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/WizardFormatResponseSchema"}}}, "summary": "Upload a reference document for an inbox", "description": "The reference document is a sample used to preview extraction results. It does not influence\npredictions \u2014 field names and prompts are what guide them.\n\nOnly single-type (dedicated) inboxes support a reference document.\nAfter upload, returns initial field suggestions based on the document content.", "operationId": "put_parble_inbox_reference_resource", "parameters": [{"name": "file", "in": "formData", "type": "file", "required": true, "description": "File to process"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "consumes": ["multipart/form-data"], "tags": ["inboxes"]}, "get": {"responses": {"404": {"description": "Inbox not Found"}, "401": {"description": "Unauthorized"}, "200": {"description": "Reference document attached as pdf"}}, "summary": "Get the reference document as a PDF", "operationId": "get_parble_inbox_reference_resource", "tags": ["inboxes"]}}, "/inboxes/{inbox_id}/reference_file/image/{page_nr}": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}, {"name": "page_nr", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"404": {"description": "Inbox not Found"}, "401": {"description": "Unauthorized"}, "200": {"description": "Reference document thumbnail attached"}}, "summary": "Get a page image of the reference document for this inbox", "operationId": "get_parble_inbox_reference_image_resource", "parameters": [{"name": "width", "in": "query", "type": "integer", "description": "Thumbnail width in pixels (optional)"}, {"name": "height", "in": "query", "type": "integer", "description": "Thumbnail height in pixels (optional)"}], "tags": ["inboxes"]}}, "/inboxes/{inbox_id}/reference_file/predict": {"parameters": [{"name": "inbox_id", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "Inbox or reference document not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/FileSchema"}}}, "summary": "Run extraction on the reference document using the current field configuration", "description": "Call this after editing fields to preview how the updated configuration performs on the\nreference document.", "operationId": "post_parble_inbox_reprocess_reference_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["inboxes"]}}, "/info/release_notes": {"get": {"responses": {"200": {"description": "Success"}}, "operationId": "get_release_notes", "tags": ["info"]}}, "/info/version": {"get": {"responses": {"200": {"description": "Success"}}, "operationId": "get_version", "tags": ["info"]}}, "/stats/automation": {"get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/AutomationStatsSchema"}}, "401": {"description": "Unauthorized"}, "400": {"description": "The date range sent is invalid or mistyped"}}, "summary": "See the automation rates of uploaded files in a given time period", "description": "By default, it will return the automation statistics of the past month", "operationId": "get_automation_stats_resource", "parameters": [{"name": "start_date", "in": "query", "type": "string", "format": "date-time", "description": "The start date from which to include files", "default": "2026-08-30T11:27:55.234768"}, {"name": "end_date", "in": "query", "type": "string", "format": "date-time", "description": "The end date until which to include files", "default": "2026-09-30T11:27:55.234817"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["stats"]}}, "/stats/usage": {"get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/UsageStatsSchema"}}, "401": {"description": "Unauthorized"}, "400": {"description": "The date range sent is invalid or mistyped"}}, "summary": "See the usage of file uploads in a given time period", "description": "It will return the usage statistics on 4 levels:\n- files\n- documents\n- pages\n- accounting units (1 unit per document or every 5 pages, whichever is higher)\n\nBy default, it will return the usage statistics of the past month", "operationId": "get_usage_stats_resource", "parameters": [{"name": "start_date", "in": "query", "type": "string", "description": "Start of the date range (inclusive), in UTC. Accepts YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (time component is ignored; datetime format accepted for backward compatibility only). Defaults to 30 days ago.", "default": "2026-08-31"}, {"name": "end_date", "in": "query", "type": "string", "description": "End of the date range (inclusive), in UTC. Accepts YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS (time component is ignored; datetime format accepted for backward compatibility only). Defaults to today.", "default": "2026-09-30"}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["stats"]}}, "/tenant": {"delete": {"responses": {"400": {"description": "Payment required"}, "404": {"description": "Not Found"}, "401": {"description": "Unauthorized"}, "204": {"description": "Success"}, "403": {"description": "Permission insufficient"}}, "summary": "Permanently delete this organization and all its data", "description": "Cannot proceed if the account has an outstanding negative balance.\n\n**Permission required:** write_tenant", "operationId": "delete_tenant_resource", "tags": ["tenant"]}}, "/tenant/activate": {"patch": {"responses": {"404": {"description": "Not Found"}, "405": {"description": "Invalid input"}, "401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/TenantModelGet"}}}, "summary": "Activate an organization account using the code from the registration email", "operationId": "patch_activate_tenant_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/TenantModelPatch"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["tenant"]}}, "/tenant/badges": {"get": {"responses": {"404": {"description": "Not Found"}, "401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/TenantBadgesGet"}}}, "summary": "Return the onboarding badges unlocked by this organization", "operationId": "get_tenant_badges_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["tenant"]}}, "/tenant/resend_activation_code": {"post": {"responses": {"405": {"description": "Invalid request"}, "401": {"description": "Unauthorized"}, "200": {"description": "Success"}}, "summary": "Resend the activation code to the organization's registered email address", "operationId": "post_tenant_resource_resend_activation_code", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/TenantModelResendActivationCode"}}], "tags": ["tenant"]}}, "/users": {"post": {"responses": {"401": {"description": "Unauthorized"}, "400": {"description": "Missing field"}, "201": {"description": "Success", "schema": {"$ref": "#/definitions/UserSchema"}}, "403": {"description": "Permission insufficient"}}, "summary": "Create a new user", "description": "Users are organized in three role tiers: Tier 1 (Admin) creates Tier 2 (Team lead) users,\nand Tier 2 creates Tier 3 (UI user) users. Roles are fixed by tier.\n\n**Permission required:** write_users", "operationId": "post_users_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/UserSchema"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["users"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"type": "array", "items": {"$ref": "#/definitions/UserSchema"}}}, "403": {"description": "Permission insufficient"}}, "summary": "List users that the current user can manage (one role tier below the caller)", "description": "**Permission required:** write_users", "operationId": "get_users_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["users"]}}, "/users/{username}": {"parameters": [{"name": "username", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "User not found"}, "204": {"description": "Successfully deleted"}, "403": {"description": "Permission insufficient"}}, "summary": "Delete a specific user", "description": "Only users one role tier below the caller can be deleted.\n\n**Permission required:** write_users", "operationId": "delete_user_resource", "tags": ["users"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "User not found"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/UserSchema"}}, "403": {"description": "Permission insufficient"}}, "summary": "Get a specific user by username", "description": "**Permission required:** write_users", "operationId": "get_user_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["users"]}}, "/webhooks": {"post": {"responses": {"401": {"description": "Unauthorized"}, "201": {"description": "Success", "schema": {"$ref": "#/definitions/WebhookSchema"}}, "409": {"description": "Webhook already exists"}, "400": {"description": "Validation error: invalid payload passed, check the schema"}, "403": {"description": "Permission insufficient"}}, "summary": "Create a new webhook", "description": "**Permission required:** write_integrations", "operationId": "post_webhooks_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/WebhookPostSchema"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["webhooks"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"type": "array", "items": {"$ref": "#/definitions/WebhookSchema"}}}, "403": {"description": "Permission insufficient"}}, "summary": "Get a list of all webhooks", "description": "**Permission required:** read_integrations", "operationId": "get_webhooks_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["webhooks"]}}, "/webhooks/request/document/{document_id}": {"parameters": [{"name": "document_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/TracedWebhookRequestSchemaMini"}}, "404": {"description": "request not found"}, "403": {"description": "Permission insufficient"}}, "summary": "Search requests related to a document", "description": "**Permission required:** read_integrations", "operationId": "get_request_document_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["webhooks"]}}, "/webhooks/request/{request_id}": {"parameters": [{"name": "request_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/TracedWebhookRequestSchemaMini"}}, "404": {"description": "request not found"}, "403": {"description": "Permission insufficient"}}, "summary": "Get a specific webhook delivery request by ID", "description": "**Permission required:** read_integrations", "operationId": "get_request_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["webhooks"]}}, "/webhooks/resend/{request_id}": {"parameters": [{"name": "request_id", "in": "path", "required": true, "type": "string"}], "post": {"responses": {"401": {"description": "Unauthorized"}, "204": {"description": "Request re-queued successfully"}, "404": {"description": "Request or webhook not found"}, "403": {"description": "Permission insufficient"}}, "summary": "Re-queue a previously sent webhook request to its target URL", "description": "**Permission required:** write_integrations", "operationId": "post_resend_resource", "tags": ["webhooks"]}}, "/webhooks/{webhook_id}": {"parameters": [{"name": "webhook_id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"401": {"description": "Unauthorized"}, "404": {"description": "Webhook not found"}, "204": {"description": "Successfully deleted"}, "403": {"description": "Permission insufficient"}}, "summary": "Delete a specific webhook", "description": "**Permission required:** write_integrations", "operationId": "delete_webhook_resource", "tags": ["webhooks"]}, "patch": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/WebhookSchema"}}, "400": {"description": "Validation error: invalid payload passed, check the schema"}, "403": {"description": "Permission insufficient"}}, "summary": "Update an existing webhook's configuration", "description": "**Permission required:** write_integrations", "operationId": "patch_webhook_resource", "parameters": [{"name": "payload", "required": true, "in": "body", "schema": {"$ref": "#/definitions/WebhookPostSchema"}}, {"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["webhooks"]}, "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"$ref": "#/definitions/WebhookSchema"}}, "404": {"description": "Webhook not found"}, "403": {"description": "Permission insufficient"}}, "summary": "Get a specific webhook", "description": "**Permission required:** read_integrations", "operationId": "get_webhook_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["webhooks"]}}, "/webhooks/{webhook_id}/requests": {"parameters": [{"name": "webhook_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"type": "array", "items": {"$ref": "#/definitions/TracedWebhookRequestSchemaMini"}}}, "404": {"description": "Webhook not found"}, "403": {"description": "Permission insufficient"}}, "summary": "Get all traced requests for a specific webhook", "description": "**Permission required:** read_integrations", "operationId": "get_requests_resource", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["webhooks"]}}, "/webhooks/{webhook_id}/requests/{page}": {"parameters": [{"name": "webhook_id", "in": "path", "required": true, "type": "string"}, {"name": "page", "in": "path", "required": true, "type": "integer"}], "get": {"responses": {"401": {"description": "Unauthorized"}, "200": {"description": "Success", "schema": {"type": "array", "items": {"$ref": "#/definitions/TracedWebhookRequestPaginated"}}}, "404": {"description": "Webhook not found"}, "403": {"description": "Permission insufficient"}}, "summary": "Get a paginated list of traced requests for a specific webhook", "description": "**Permission required:** read_integrations", "operationId": "get_requests_resource_paginated", "parameters": [{"name": "X-Fields", "in": "header", "type": "string", "format": "mask", "description": "An optional fields mask"}], "tags": ["webhooks"]}}}, "info": {"title": "Liberty IDP Main API", "version": "1.0", "description": "This OpenAPI describes the Liberty IDP API\n\n## Access and security\nNearly all endpoints are protected: you need to make authenticated calls. In order to authenticate, you need an API key.\n\nTo locate your API key, ensure you are signed into your account in the Liberty platform.\nOn the IDP page you can find a link with you API key under the \"standalone API\" section.\nIf you cannot find your API key, please [contact us](mailto:support@netcall.com).\n\n## Example API usage\n\n#### File upload\nThis is achieved by performing a POST request to the /files endpoint.\nBy default this will run a synchronous upload, which means you'll get the result immediately as the response to the request.\n\nAlternatively, you can run the request asynchronously.\nYou may want to combine this integration pattern with webhooks to receive the result as soon as it becomes available (see below).\n\n#### Inspecting automation rates and usage in a time period\nAutomation rates are retrieved from the stats/stp endpoint, while details on usage are returned by /stats/usage\n\n#### Configuring a webhook\nYou can register a webhook to receive the results. This is done by a POST to the /webhooks endpoint.\nYou'll need to specify the uri 'target' where we'll post the results to.\nYou also need to select one or more trigger 'event' (e.g., document_predict will trigger each time we finish prediction of a file).\n\nOptionally, you can pass header fields that we'll include in each request to your target uri. This can be used to authenticate the request.\n\n#### Managing API keys\nAPI keys can be inspected, edited or deleted in the /api_keys endpoints\n\n"}, "produces": ["application/json"], "consumes": ["application/json"], "securityDefinitions": {"token": {"type": "apiKey", "in": "header", "name": "X-API-Key"}}, "security": [{"token": []}], "tags": [{"name": "files", "description": "File endpoints"}, {"name": "api_keys", "description": "API key endpoints"}, {"name": "auth", "description": "Authentication endpoints"}, {"name": "users", "description": "User endpoints"}, {"name": "webhooks", "description": "Webhook endpoints"}, {"name": "inboxes", "description": "Inbox endpoints"}, {"name": "stats", "description": "Statistics endpoints"}, {"name": "accounting", "description": "Accounting endpoints"}, {"name": "tenant", "description": "Tenant endpoints"}, {"name": "info", "description": "Info endpoints"}, {"name": "chunking", "description": "Chunking endpoints"}], "definitions": {"FileSchema": {"properties": {"id": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}, "timings": {"$ref": "#/definitions/TimingsSchema"}, "filename": {"type": "string", "description": "The name of the uploaded file, including its extension"}, "automated": {"type": "boolean", "description": "A value that indicates whether the uploaded file was treated fully automatically"}, "number_of_pages": {"type": "integer", "description": "The number of logical pages in the original uploaded file"}, "documents": {"type": "array", "items": {"$ref": "#/definitions/DocumentSchema"}}}, "type": "object"}, "TimingsSchema": {"properties": {"upload": {"type": "string", "description": "The time at which this file was received"}, "done": {"type": "string", "description": "The time at which the file finished processing"}}, "type": "object"}, "DocumentSchema": {"properties": {"id": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}, "status": {"type": "string"}, "filename": {"type": "string"}}, "type": "object"}, "FilterSchema": {"properties": {"start_date": {"type": "string", "format": "date-time", "description": "Optional start timestamp for the filter", "example": "2026-08-30T00:00:00"}, "end_date": {"type": "string", "format": "date-time", "description": "Optional end timestamp for the filter"}, "inbox_id": {"type": "string", "description": "inbox id", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}, "document_ids": {"type": "array", "description": "List of document ids", "items": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}}}, "type": "object"}, "FeedbackFileSchema": {"required": ["documents"], "properties": {"documents": {"type": "array", "items": {"$ref": "#/definitions/FeedbackDocumentSchema"}}}, "type": "object"}, "FeedbackDocumentSchema": {"required": ["classification", "tables"], "properties": {"classification": {"description": "The classification results for this document", "allOf": [{"$ref": "#/definitions/FeedbackDocumentClassificationSchema"}]}, "header_fields": {"type": "object", "additionalProperties": {"description": "The header field extraction results - map of field names to extraction metadata", "allOf": [{"$ref": "#/definitions/FeedbackFieldValueSchema"}]}}, "tables": {"type": "object", "description": "The line item extraction results - map of table names to arrays of row objects", "additionalProperties": {"type": "array", "items": {"type": "object", "additionalProperties": {"$ref": "#/definitions/FeedbackFieldValueSchema"}}}}}, "type": "object"}, "FeedbackDocumentClassificationSchema": {"required": ["document_type", "end_page", "start_page"], "properties": {"document_type": {"type": "string", "description": "A string indicating which type of document this is"}, "start_page": {"type": "integer", "description": "The page in the file at which this document start"}, "end_page": {"type": "integer", "description": "The page in the file at which this document ends"}}, "type": "object"}, "FeedbackFieldValueSchema": {"required": ["page", "text", "value"], "properties": {"page": {"type": "integer"}, "coordinates": {"type": "array", "items": {"type": "number"}}, "text": {"type": "string"}, "value": {"type": "string"}}, "type": "object"}, "DetectRedactionRequest": {"required": ["fields"], "properties": {"fields": {"type": "array", "description": "List of fields to detect for redaction", "items": {"$ref": "#/definitions/RedactionField"}}}, "type": "object"}, "RedactionField": {"required": ["field_name", "prompt"], "properties": {"field_name": {"type": "string", "description": "Name of the field to detect"}, "prompt": {"type": "string", "description": "Prompt to guide the AI in detecting this field"}}, "type": "object"}, "ApiKeySchema": {"required": ["token"], "properties": {"id": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}, "active": {"type": "boolean", "description": "Is the API Key active or not"}, "expire_at": {"type": "string", "format": "date-time", "description": "The date at which the API Key will expire"}, "token": {"type": "string", "description": "The API key's token"}}, "type": "object"}, "AuthModel": {"required": ["password", "username"], "properties": {"username": {"type": "string", "description": "the user username"}, "password": {"type": "string", "description": "the user password"}}, "type": "object"}, "AuthReplyModel": {"required": ["authentication_token"], "properties": {"authentication_token": {"type": "string"}}, "type": "object"}, "UserSchema": {"required": ["username"], "properties": {"username": {"type": "string", "description": "the user username", "pattern": "^[a-zA-Z0-9_#@. +-]+$"}}, "type": "object"}, "WebhookPostSchema": {"required": ["events", "target"], "properties": {"events": {"type": "array", "description": "The event for which to trigger the webhook", "items": {"type": "string"}}, "target": {"type": "string", "description": "The uri to which the webhook should be sent"}, "headers": {"type": "object", "description": "Optional headers to send with the webhook"}, "active": {"type": "boolean", "description": "Is the webhook active or not", "default": true}, "inbox": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}}, "type": "object"}, "WebhookSchema": {"allOf": [{"$ref": "#/definitions/WebhookPostSchema"}, {"required": ["id"], "properties": {"id": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}}, "type": "object"}]}, "TracedWebhookRequestSchemaMini": {"allOf": [{"$ref": "#/definitions/TracedWebhookRequestSchemaMini"}, {"required": ["duration", "request", "response", "response_type"], "properties": {"request": {"type": "object"}, "response": {"type": "object"}, "response_type": {"type": "string"}, "duration": {"type": "number"}}, "type": "object"}]}, "TracedWebhookRequestPaginated": {"properties": {"results": {"type": "array", "items": {"default": [], "$ref": "#/definitions/TracedWebhookRequestSchemaMini"}}, "page": {"type": "integer", "description": "Current page number"}, "total": {"type": "integer", "description": "Total number of results"}, "per_page": {"type": "integer", "description": "Number of results per page"}}, "type": "object"}, "WizardCreateInboxSchema": {"properties": {"name": {"type": "string", "description": "The name of the inbox", "pattern": "^[^<>\\x00\\r\\n]+$"}, "doctype_inboxes": {"type": "array", "description": "The single-document inboxes from which the bundle is created", "items": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}}}, "type": "object"}, "InboxIdSchema": {"properties": {"id": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}, "name": {"type": "string"}}, "type": "object"}, "InboxOverviewSchema": {"properties": {"id": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}, "name": {"type": "string"}, "count": {"type": "integer"}, "editable": {"type": "boolean"}, "bundle": {"type": "boolean"}, "doctype_inboxes": {"type": "array", "items": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}}}, "type": "object"}, "InboxSummarySchema": {"properties": {"inbox": {"$ref": "#/definitions/InboxKeyInfo"}, "documents": {"type": "array", "items": {"$ref": "#/definitions/DocumentSchema"}}}, "type": "object"}, "InboxKeyInfo": {"properties": {"id": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}, "name": {"type": "string"}}, "type": "object"}, "WizardFormatResponseSchema": {"allOf": [{"$ref": "#/definitions/WizardFormatResponseSchemaBasic"}, {"properties": {"number_of_pages": {"type": "integer", "description": "The number of pages in the document"}}, "type": "object"}]}, "WizardFormatResponseSchemaBasic": {"required": ["header_fields", "tables"], "properties": {"document_type": {"$ref": "#/definitions/DocumentTypeSchema"}, "tables": {"type": "array", "default": [], "items": {"$ref": "#/definitions/WizardTableFormatSchema"}}, "header_fields": {"type": "array", "default": [], "items": {"$ref": "#/definitions/ColumnPromptDataTypeSchema"}}}, "type": "object"}, "DocumentTypeSchema": {"properties": {"name": {"type": "string", "description": "The name of the document type", "pattern": "^[^<>\\x00\\r\\n]+$"}, "field_name": {"type": "string", "description": "The field name (identifier) of the document type"}, "display_name": {"type": "string", "description": "The display name of the document type", "pattern": "^[^<>\\x00\\r\\n]+$"}, "prompt": {"type": "string", "description": "The prompt for this document type"}}, "type": "object"}, "WizardTableFormatSchema": {"required": ["columns", "name", "prompt"], "properties": {"name": {"type": "string", "description": "The name of the table", "default": "items"}, "prompt": {"type": "string", "description": "The prompt for this table"}, "columns": {"type": "array", "default": [], "items": {"$ref": "#/definitions/ColumnPromptDataTypeSchema"}}}, "type": "object"}, "ColumnPromptDataTypeSchema": {"required": ["data_type", "label", "prompt"], "properties": {"label": {"type": "string", "description": "The label of the field"}, "prompt": {"type": "string", "description": "The description of the field"}, "data_type": {"type": "string", "description": "The data_type of the field", "example": "string", "enum": ["string", "date", "integer", "float", "currency", "alphanumeric", "boolean", "datetime", "address", "person_name", "iban", "national_identification_number_be"]}, "use_visual_ai": {"type": "boolean", "description": "The use_visual_ai of the field", "default": false}}, "type": "object"}, "WizardFormatRequestSchema": {"type": "object", "properties": {"document_type": {"type": "object", "properties": {"name": {"type": "string", "pattern": "^[^<>\\x00\\r\\n]+$"}, "field_name": {"type": "string", "pattern": "^(?!\\$)[^\\.]+$"}, "display_name": {"type": "string", "pattern": "^[^<>\\x00\\r\\n]+$"}, "prompt": {"type": "string"}}, "additionalProperties": false}, "tables": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "pattern": "^(?!\\$)[^\\.]+$"}, "prompt": {"type": "string"}, "columns": {"type": "array", "items": {"type": "object", "properties": {"label": {"type": "string", "pattern": "^(?!\\$)[^\\.]+$"}, "prompt": {"type": "string"}, "data_type": {"type": "string", "enum": ["string", "date", "integer", "float", "currency", "alphanumeric", "boolean", "datetime", "address", "person_name", "iban", "national_identification_number_be"]}, "use_visual_ai": {"type": "boolean"}}, "additionalProperties": false}}}, "additionalProperties": false}}, "header_fields": {"type": "array", "items": {"type": "object", "properties": {"label": {"type": "string", "pattern": "^(?!\\$)[^\\.]+$"}, "prompt": {"type": "string"}, "data_type": {"type": "string", "enum": ["string", "date", "integer", "float", "currency", "alphanumeric", "boolean", "datetime", "address", "person_name", "iban", "national_identification_number_be"]}, "use_visual_ai": {"type": "boolean"}}, "additionalProperties": false}}}}, "WizardFormatAndPredictionSchema": {"properties": {"filename": {"type": "string"}, "format": {"$ref": "#/definitions/WizardFormatResponseSchemaBasic"}, "prediction": {"$ref": "#/definitions/FileSchema"}, "number_of_pages": {"type": "integer"}}, "type": "object"}, "InboxFormatsSchema": {"properties": {"format_id": {"type": "string", "example": "abcdef123456789abcdef123", "minLength": 24, "maxLength": 24, "pattern": "[A-z0-9]"}, "format": {"$ref": "#/definitions/WizardFormatResponseSchemaBasic"}}, "type": "object"}, "UsageStatsSchema": {"properties": {"files": {"type": "integer", "description": "The number of files uploaded"}, "documents": {"type": "integer", "description": "The number of documents uploaded"}, "pages": {"type": "integer", "description": "The number of pages uploaded"}, "accounting_units": {"type": "integer", "description": "The number of units consumed"}}, "type": "object"}, "AutomationStatsSchema": {"properties": {"files": {"description": "The rate of files that was automated", "allOf": [{"$ref": "#/definitions/AutomationStatsNestedSchema"}]}, "documents": {"description": "The rate of documents that was automated", "allOf": [{"$ref": "#/definitions/AutomationStatsNestedSchema"}]}, "fields": {"description": "The rate of fields that was automated", "allOf": [{"$ref": "#/definitions/AutomationStatsNestedSchema"}]}}, "type": "object"}, "AutomationStatsNestedSchema": {"properties": {"rate": {"type": "number", "description": "The rate of automation"}, "stp": {"type": "integer", "description": "The number that were automated"}, "total": {"type": "integer", "description": "The total number"}}, "type": "object"}, "BalanceSchema": {"properties": {"balance": {"type": "number", "description": "Remaining credits which can be consumed"}, "credit": {"type": "number", "description": "All-time credits recharged on this account"}, "usage": {"type": "number", "description": "All-time used credit on this account"}, "documents_processed": {"type": "integer", "description": "All-time processed documents on this account"}, "fields_predicted": {"type": "integer", "description": "All-time predicted fields on this account"}, "payment_method_on_file": {"type": "boolean", "description": "Is there a payment method on file?"}}, "type": "object"}, "CheckoutSchema": {"properties": {"url": {"type": "string", "description": "Payment link", "readOnly": true}, "status": {"type": "string", "description": "Checkout status - open by default", "readOnly": true}}, "type": "object"}, "CustomerPortalSchema": {"properties": {"url": {"type": "string", "description": "Customer portal link", "readOnly": true}}, "type": "object"}, "TenantModelPatch": {"properties": {"email": {"type": "string"}, "code": {"type": "integer"}}, "type": "object"}, "TenantModelGet": {"required": ["id"], "properties": {"id": {"type": "string"}}, "type": "object"}, "TenantModelResendActivationCode": {"required": ["email", "recaptcha_response", "remote_ip"], "properties": {"recaptcha_response": {"type": "string"}, "remote_ip": {"type": "string"}, "email": {"type": "string"}}, "type": "object"}, "TenantBadgesGet": {"required": ["5_documents_processed", "bundle_inbox_created", "dedicated_inbox_created", "excel_report_created", "file_uploaded_via_api", "payment_method_added", "tenant_activated"], "properties": {"tenant_activated": {"type": "boolean", "default": false}, "dedicated_inbox_created": {"type": "boolean", "default": false}, "5_documents_processed": {"type": "boolean", "default": false}, "excel_report_created": {"type": "boolean", "default": false}, "file_uploaded_via_api": {"type": "boolean", "default": false}, "bundle_inbox_created": {"type": "boolean", "default": false}, "payment_method_added": {"type": "boolean", "default": false}}, "type": "object"}, "ChunkingResult": {"properties": {"status": {"type": "string", "description": "Processing status"}, "document_name": {"type": "string", "description": "Original document filename"}, "chunks": {"type": "array", "description": "List of text chunks", "items": {"$ref": "#/definitions/Chunk"}}, "metadata": {"description": "Processing metadata", "allOf": [{"$ref": "#/definitions/ChunkingMetadata"}]}}, "type": "object"}, "Chunk": {"properties": {"chunk_id": {"type": "string", "description": "Stable SHA-256 content hash of the chunk text (hex)"}, "text": {"type": "string", "description": "Chunk text content"}}, "type": "object"}, "ChunkingMetadata": {"properties": {"total_chunks": {"type": "integer", "description": "Total number of chunks produced"}, "file_type": {"type": "string", "description": "Detected file extension"}, "pages": {"type": "integer", "description": "Number of pages in the document"}, "native_pages": {"type": "integer", "description": "Pages extracted natively (no OCR)"}, "ocr_pages": {"type": "integer", "description": "Pages that required OCR"}, "chunk_size": {"type": "integer", "description": "Configured chunk size"}, "tolerance": {"type": "integer", "description": "Configured tolerance"}, "output_format": {"type": "string", "description": "Output format (text or markdown)"}}, "type": "object"}}, "responses": {"ParseError": {"description": "When a mask can't be parsed"}, "MaskError": {"description": "When any error occurs on mask"}, "ConflictError": {"description": "Handle Conflict exceptions, as they define their own message"}, "AlfredException": {"description": "Handle Alfred specific exceptions"}, "Exception": {"description": "Return JSON instead of HTML for HTTP errors"}}, "host": "api.parble.com"}
