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.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
Token principal Supported use
No token Calls /hello and the read-only format-discovery routes.
user, admin, or root principal Calls conversion, document, and job routes. A user principal can access only its own jobs.
Privileged principal Can list jobs for a specified owner and retrieve that owner's job when permitted by its role.

The Document API validates Bearer tokens but does not enforce DPoP. See the authorization guide for token acquisition, principal resolution, expiry, revocation, and failure behavior.

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. Authentication and authorization failures also include an HTTP status code and a reason.

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 as next_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.

Guides