openapi: 3.0.1 info: title: Docsumo Document Types Documents API description: REST API for the Docsumo intelligent document processing (IDP) platform. Upload documents, retrieve AI-extracted structured data and line-item tables, run human-in-the-loop review, manage document types, and delete documents. Authentication uses a personal API key passed in the `apikey` request header (also documented as `X-API-KEY`), obtainable from https://app.docsumo.com/settings/webhook-api/. Asynchronous completion is delivered via account-configured webhooks. termsOfService: https://www.docsumo.com/terms-conditions contact: name: Docsumo Support url: https://support.docsumo.com/reference/getting-started-with-your-api version: '1.0' servers: - url: https://app.docsumo.com/api/v1 description: Docsumo production API security: - apiKeyAuth: [] tags: - name: Documents description: Upload, list, summarize, and delete documents. paths: /eevee/apikey/upload/: post: operationId: uploadDocument tags: - Documents summary: Upload a document file description: Uploads a document file (.pdf, .png, .jpg, .jpeg, .tiff, .tif, and .xlsx for select financial types) for processing. The document is classified to the provided `type` and queued for extraction. requestBody: required: true content: multipart/form-data: schema: type: object required: - file - type properties: file: type: string format: binary description: The document file to upload. type: type: string description: Document type to classify the upload as (e.g. invoice, bank_statement). example: invoice user_doc_id: type: string description: Optional caller-supplied tracking identifier. doc_meta_data: type: string description: Optional additional metadata encoded as a JSON string. review_token: type: boolean description: When true, returns a shareable hosted review URL/token. responses: '200': description: Document accepted and queued for processing. content: application/json: schema: $ref: '#/components/schemas/UploadResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /eevee/apikey/upload/custom/: post: operationId: uploadDocumentCustom tags: - Documents summary: Upload a document by URL or Base64 description: Uploads a document by remote URL or inline Base64-encoded content instead of a multipart file part. Useful for server-to-server integrations that already hold the document bytes or a hosted URL. requestBody: required: true content: application/json: schema: type: object required: - type properties: type: type: string description: Document type to classify the upload as. example: invoice url: type: string format: uri description: Publicly reachable URL of the document to fetch and process. file_data: type: string description: Base64-encoded document content (alternative to url). file_name: type: string description: File name including extension when sending Base64 content. user_doc_id: type: string description: Optional caller-supplied tracking identifier. responses: '200': description: Document accepted and queued for processing. content: application/json: schema: $ref: '#/components/schemas/UploadResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /eevee/apikey/documents/: get: operationId: listDocuments tags: - Documents summary: List documents description: Returns a paginated list of documents on the account with their processing status, optionally filtered by document type and status. parameters: - name: limit in: query description: Maximum number of documents to return. schema: type: integer default: 20 - name: offset in: query description: Number of documents to skip for pagination. schema: type: integer default: 0 - name: status in: query description: Filter by processing status (e.g. new, processed, reviewed). schema: type: string - name: doc_type in: query description: Filter by document type. schema: type: string responses: '200': description: A list of documents. content: application/json: schema: $ref: '#/components/schemas/DocumentList' '401': $ref: '#/components/responses/Unauthorized' /eevee/apikey/documents/summary/: get: operationId: documentsSummary tags: - Documents summary: Documents summary description: Returns aggregate counts of documents by processing status. responses: '200': description: Document status summary. content: application/json: schema: $ref: '#/components/schemas/DocumentsSummary' '401': $ref: '#/components/responses/Unauthorized' /eevee/apikey/documents/{doc_id}/: delete: operationId: deleteDocument tags: - Documents summary: Delete a document description: Permanently deletes the document and its extracted data. parameters: - $ref: '#/components/parameters/DocId' responses: '200': description: Document deleted. content: application/json: schema: $ref: '#/components/schemas/StatusResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: schemas: UploadResponse: type: object properties: status: type: string example: success message: type: string data: type: object properties: doc_id: type: string description: Identifier assigned to the uploaded document. user_doc_id: type: string type: type: string status: type: string description: Processing status, e.g. new or processing. review_url: type: string format: uri description: Present when review_token was requested. StatusResponse: type: object properties: status: type: string example: success message: type: string DocumentSummaryItem: type: object properties: doc_id: type: string user_doc_id: type: string title: type: string type: type: string status: type: string created_date: type: string format: date-time Error: type: object properties: status: type: string example: error error: type: string message: type: string DocumentsSummary: type: object properties: status: type: string data: type: object additionalProperties: type: integer description: Counts keyed by processing status. DocumentList: type: object properties: status: type: string data: type: object properties: documents: type: array items: $ref: '#/components/schemas/DocumentSummaryItem' total: type: integer limit: type: integer offset: type: integer responses: Unauthorized: description: Missing or invalid API key. content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request parameters. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Document not found. content: application/json: schema: $ref: '#/components/schemas/Error' parameters: DocId: name: doc_id in: path required: true description: Unique identifier of the document. schema: type: string securitySchemes: apiKeyAuth: type: apiKey in: header name: apikey description: Personal API key from https://app.docsumo.com/settings/webhook-api/. Also accepted as the `X-API-KEY` header.