APEX Developers

Document Operations

Status: Available · Spec: openapi/doc-ops.yaml · Base URL: issued by your platform operator (local/companion port 9190)

The document toolbox: 20+ operations over PDF and Office formats — convert, merge, split, compress, OCR, watermark, redact, sanitize, PDF/A, extraction, diffing, and more — all behind one asynchronous job model. Where Prism creates documents from data, Document Operations transforms documents you already have.

Auth & tenancy: Bearer token (machine-to-machine JWT or tenant API key); tenant via the X-Tenant-ID header on every call.

The job model — one pattern for every operation

Every operation is submit-then-poll (conventions):

  1. SubmitPOST /v1/{operation} with a multipart/form-data upload (file(s) + operation parameters). Returns immediately: json { "ok": true, "data": { "job_id": "…", "status": "pending" } }
  2. PollGET /v1/jobs/{job_id} until completed or failed. Failures carry a coded error in the envelope.
  3. DownloadGET /v1/jobs/{job_id}/download for the result binary. (Preview: result-download delivery is being finalised — verify availability with your platform contact.)

The operation families

Family Operations
Convert Office/HTML/markdown → PDF and related conversions (convert)
Assemble merge, split
Extract extract (text/pages), extract_data (structured), text_blocks, links, metadata
Enhance watermark, page_numbers, qr, annotate, tag, edit_text
Protect & comply encrypt, permissions, sanitize, redact, provenance, pdfa
Analyse diff, ocr, compress, agent (instruction-driven document processing)

GET /v1/capabilities returns the machine-readable list of operations and parameters enabled for your tenant — drive feature flags from it rather than hardcoding.

Errors worth handling

Integration notes