Get document

Read a document. For documents over 20 KB, request a specific section (heading text) or lines (e.g. '120-180') — the default read truncates at 20 KB and returns a table of contents instead of the full body.

post/api/v1/get_document

Request

  • Base URL: https://offprint.io
  • URL: https://offprint.io/api/v1/get_document
  • Auth: HTTP bearer

Request body

document_idstring uuid

The document's id, from publish_document or list_documents. Pass this or slug.

slugstring

The document's slug, e.g. 'roadmap-k3n8qz'. Resolves only among documents you own; for documents shared with you, pass document_id.

sectionstring

Return only the section under this heading (its text, case-insensitive). Use for documents over 20 KB.

linesstring

Return only this line range of the Markdown, e.g. '120-180'.

revisioninteger

Read this past revision instead of the current one.

Response

Success.

titlestring required
urlstring required

Absolute URL of the document's page.

revisioninteger required
your_role'owner' | 'editor' | 'commenter' | 'viewer' nullable required

Your role on the document or project.

projectstring nullable required

Name of the project the document is filed in.

directory_pathstring nullable required

Directory path inside the project; null at the project root.

contentstring required

Markdown of the revision (or the part asked for).

truncatedboolean required
tocstring[]

Headings, when the content was truncated.

notestring

Changes

No recorded changes to this operation across all 1 revision of this API.