Skip to main content
POST
Extract structured data

Authorizations

Authorization
string
header
required

Short-lived, Developer-API-audience token obtained by the trusted MCP service through token exchange (mcp_at_...). Raw MCP resource tokens are rejected.

Body

application/json
fileId
string
required

File ID of the document to extract data from (PDF, DOCX, ODT, or Markdown)

Example:

"550e8400-e29b-41d4-a716-446655440000"

fields
object
required

Fields to extract from the document. Keys are field names, values define the expected type and optional description. Maximum 30 fields.

Example:
pages
string[]

Page specifications (e.g. "1", "2-5", "3-"). If omitted, all pages are processed (up to 50 pages). Only applicable to PDF files.

Example:
webhook
object

Optional webhook configuration

Response

201 - application/json

Extraction job created

id
string
required

Job ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

action
string
required

Action that was performed

Example:

"pdf.merge"

status
enum<string>
required

Current job status

Available options:
PENDING,
PROCESSING,
COMPLETED,
FAILED
Example:

"PENDING"

inputFileIds
string[]
required

Input file IDs used for this job

Example:
outputFileId
object | null
required

Output file ID (available when COMPLETED)

Example:

null

error
object | null
required

Error message (available when FAILED)

Example:

null

createdAt
string<date-time>
required

Job creation timestamp

startedAt
object | null
required

Job start timestamp

completedAt
object | null
required

Job completion timestamp

result
object

Structured job result data (e.g. OCR markdown/JSON, generated filename, PDF metadata, form fields). Available when the job produces a direct result instead of an output file.

metadata
object
deprecated

Deprecated — use result instead. Additional metadata, duplicated from result for backward compatibility.