Docpier IDP API
  1. Endpoints
Docpier IDP API
  • IDP API
  • Webhook
  • Endpoints
    • Agent Login (client credential flow)
      POST
    • Upload a document
      POST
    • Retrieve structured data
      GET
    • Provide feedback
      PATCH
  • Schemas
    • Schemas
      • api
        • ApiError
        • DocumentInProgressResponse
        • FeedbackRequest
        • DocumentResponse
      • document
        • element
          • Amount
          • Identification
          • PaymentMethod
          • TaxId
          • CreditCardInfo
        • Unknown
        • Core Document
        • Invoice
        • Reminder
        • CreditCard Statement
        • Insurance Policy
        • Policy Adjustment
      • workspace
        • Workspace
        • Membership
        • Document
        • FlowLog
        • Error
  1. Endpoints

Upload a document

POST
/v1/workspaces/{workspaceId}/documents
Last modified:2025-08-31 08:57:25
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 /workspaces/{workspaceId}/documents/{documentId} endpoint.

Request

Authorization
OAuth 2.0
Authorization Code
Client Credentials
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Authorize URL: https://auth.docpier.com/oauth/authorize
Token URL: https://auth.docpier.com/oauth/token
or
Path Params

Body Params multipart/form-data

Responses

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

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/workspaces//documents' \
--form 'file=@""' \
--form 'extRef=""'
Response Response Example
202 - Example 1
{
    "documentId": "string",
    "workspaceId": "string",
    "fileName": "string",
    "fileHash": "string",
    "fileSize": "string",
    "mimeType": "string",
    "uploadedAt": "string",
    "extRef": "string"
}
Modified at 2025-08-31 08:57:25
Previous
Agent Login (client credential flow)
Next
Retrieve structured data
Built with