Docpier IDP API
  1. agent
Docpier IDP API
  • IDP API
  • Webhook
  • Endpoints
    • agent
      • Upload a document
        POST
      • Retrieve structured data
        GET
      • Stream Document Content
        GET
      • Provide feedback
        PATCH
      • Get Document Feedback
        GET
  1. agent

Upload a document

POST
/v1/workspaces/{workspaceId}/documents
Uploads a single document file (e.g., PDF, image) to Docpier's IDP service for asynchronous processing.
The service will process the document, extract structured data, and make it available via the
GET /v1/workspaces/{workspaceId}/documents/{documentId} endpoint.
Supported file formats:
PDF (application/pdf)
JPEG images (image/jpeg)
PNG images (image/png)
TIFF images (image/tiff)
File size limit: 200MB (209,715,200 bytes)
Processing options: You can provide optional processing instructions via the options parameter
as a JSON string. See the ProcessingInstruction schema for available options.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Body Params multipart/form-dataRequired

Responses

🟢202
application/json
Document accepted for processing. A unique documentId is returned to track its status and retrieve results.
Body

🟠400
🟠401
🟠403
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test.your-api-server.com/v1/workspaces//documents' \
--header 'Authorization: Bearer <token>' \
--form 'extRef=""' \
--form 'options=""' \
--form 'file=@""'
Response Response Example
202 - Example 1
{
    "documentId": "string",
    "workspaceId": "string",
    "fileName": "string",
    "fileHash": "string",
    "fileSize": "string",
    "mimeType": "string",
    "uploadedAt": "string",
    "extRef": "string",
    "options": {
        "extract": {
            "split": {
                "enabled": false
            },
            "logo": {
                "enabled": false
            },
            "extensions": {
                "lineItems": {
                    "enabled": false
                },
                "energyDetails": {
                    "enabled": false
                },
                "creditCardDetails": {
                    "enabled": false
                },
                "insuranceDetails": {
                    "enabled": false
                }
            }
        },
        "reconcile": {
            "enabled": false,
            "config": {
                "businessRegistryEnrichment": false,
                "addressNormalization": false
            }
        },
        "deliver": {
            "webhook": {
                "url": "http://example.com"
            },
            "response": {
                "content": {
                    "enabled": false,
                    "config": {
                        "format": "ORIGINAL",
                        "location": "REMOTE"
                    }
                },
                "layout": {
                    "enabled": false
                },
                "thumbnails": {
                    "enabled": false,
                    "config": {
                        "maxWidth": 128
                    }
                },
                "text": {
                    "enabled": false
                }
            }
        },
        "security": {
            "redact": {
                "enabled": false,
                "config": {
                    "mode": "BLACKOUT",
                    "categories": [
                        "NAMES",
                        "ADDRESSES"
                    ]
                }
            }
        },
        "lifecycle": {
            "retention": {
                "enabled": false,
                "config": {
                    "days": 30,
                    "purgeOnComplete": false
                }
            }
        }
    }
}
Modified at 2026-01-06 20:52:46
Previous
Webhook
Next
Retrieve structured data
Built with