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

Stream Document Content

GET
/v1/workspaces/{workspaceId}/documents/{documentId}/content
Stream document content from workspace (PDF, images, etc.).
Returns the original uploaded file content as a binary stream. The Content-Type
header indicates the file format, and Content-Disposition provides the filename
for download.
Supported formats:
PDF (application/pdf)
JPEG images (image/jpeg)
PNG images (image/png)
TIFF images (image/tiff)
Response headers:
Content-Type: MIME type of the document
Content-Disposition: Attachment header with filename
Content-Length: File size in bytes
Accept-Ranges: Support for partial content (bytes)
Usage:
The response is a binary stream that should be saved to a file or processed directly.
Most HTTP clients will automatically handle the download based on the Content-Disposition
header.

Request

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

Responses

🟢200
application/pdf
Document content streamed successfully
Headers

🟠400
🟠401
🟠403
🟠404
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://test.your-api-server.com/v1/workspaces//documents//content' \
--header 'Authorization: Bearer <token>'
Response Response Example
400 - Example 1
{
    "code": "string",
    "message": "string"
}
Modified at 2026-01-06 20:52:46
Previous
Retrieve structured data
Next
Provide feedback
Built with