Document API
The Document API lets external applications convert documents between enabled formats, inspect or sanitize document content, extract structured information, and manage the short-lived jobs created for authenticated requests.
Base URL
https://api.document.service.m7.org
All versioned routes begin with /v1. Send JSON request bodies with
Content-Type: application/json.
Use the production application to convert and preview documents, explore supported formats, and inspect your authenticated conversion jobs.
Authorization
This service uses its project-specific
authorization process. Send an M7 access token in the
Authorization header for protected routes:
Authorization: Bearer ACCESS_TOKEN
| Caller | Supported use |
|---|---|
| No token | /hello, format discovery, and capability definitions. |
| Admitted M7 user or application | Reads accessible buckets and calls conversion, document and job routes with a required bucket_id and exact action capability. |
| Authorized organization workspace | Uses an organization principal's bucket membership, intersected with its live Management capability selection. |
Start with Buckets and membership. Every conversion, document
and job request requires a non-nil dashed bucket_id. Jobs are shared within
that authorized bucket; creator identity is provenance rather than a private
job boundary. Service admin/root status does not bypass public bucket checks.
The resource API uses Bearer validation and does not enforce DPoP proofs. Organization acquisition has its own SSO-bound proof transport, explained in Caller and workspace context.
Common response format
Successful responses use this envelope:
{
"status": 1,
"comment": "RESULT_CODE",
"data": {}
}
Failures return status: 0, a human-readable comment, and an empty data
object unless the error supplies more detail. Receiving-admission failures put their HTTP code, machine reason, and
boundary: "roster" under data. Handle the HTTP status separately from the
application status, and inspect diagnostic fields only where present.
Format references
Where a request accepts a format or profile reference, send its stable name
or dashed UUID. Use the format-discovery endpoints to obtain the enabled
formats, conversion pairs, and available profiles before submitting a
conversion request.
Pagination
/v1/job/list accepts one paging method at a time:
cursor: an opaque value returned asnext_cursor.offset: a zero-based row offset.page_number: a one-based page number.
The default limit is 3; values are limited to 1 through 100. A supplied
cursor takes precedence over offset, and offset takes precedence over
page_number.