Offprint Get Document API
The Get Document API from Offprint — 1 operation(s) for get document.
The Get Document API from Offprint — 1 operation(s) for get document.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/offprint-io:offprint-io-get-document-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Offprint Get Document API
version: 1.0.0
description: The Offprint MCP tools over plain HTTP. Every operation is POST /api/v1/ with the tool's arguments as a JSON body, authenticated with an API key (Settings > API keys). Behaviour, limits and errors are identical to the MCP endpoint.
servers:
- url: https://offprint.io
tags:
- name: Get Document
paths:
/api/v1/get_document:
post:
operationId: get_document
summary: Get document
description: 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.
x-read-only: true
x-destructive: false
security:
- apiKey: []
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
document_id:
description: The document's id, from publish_document or list_documents. Pass this or slug.
type: string
format: uuid
pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
slug:
description: The document's slug, e.g. 'roadmap-k3n8qz'. Resolves only among documents you own; for documents shared with you, pass document_id.
type: string
section:
description: Return only the section under this heading (its text, case-insensitive). Use for documents over 20 KB.
type: string
lines:
description: Return only this line range of the Markdown, e.g. '120-180'.
type: string
pattern: ^\d+-\d+$
revision:
description: Read this past revision instead of the current one.
type: integer
minimum: 1
maximum: 9007199254740991
responses:
'200':
description: Success.
content:
application/json:
schema:
type: object
properties:
title:
type: string
url:
type: string
description: Absolute URL of the document's page.
revision:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
your_role:
anyOf:
- type: string
enum:
- owner
- editor
- commenter
- viewer
description: Your role on the document or project.
- type: 'null'
description: Your role, or null when reading a public document by link.
project:
description: Name of the project the document is filed in.
type:
- string
- 'null'
directory_path:
description: Directory path inside the project; null at the project root.
type:
- string
- 'null'
provenance:
type: object
properties:
author_kind:
type: string
enum:
- agent
- human
description: Whether an agent or a person wrote it.
agent_id:
description: The writing agent's self-reported id. Unverified.
type:
- string
- 'null'
agent_handle:
description: The writing agent's self-reported name. Unverified.
type:
- string
- 'null'
client:
description: The connected client that wrote it, if an agent did.
type:
- string
- 'null'
session_id:
type:
- string
- 'null'
model:
type:
- string
- 'null'
harness:
type:
- string
- 'null'
change_note:
type:
- string
- 'null'
step_summary:
type:
- string
- 'null'
required:
- author_kind
- client
- session_id
- model
- harness
- change_note
- step_summary
additionalProperties: {}
description: Who wrote this revision, and what they said about it.
content:
type: string
description: Markdown of the revision (or the part asked for).
truncated:
type: boolean
toc:
description: Headings, when the content was truncated.
type: array
items:
type: string
note:
type: string
required:
- title
- url
- revision
- your_role
- project
- directory_path
- provenance
- content
- truncated
additionalProperties: {}
'400':
description: Invalid arguments.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing, expired or revoked API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The key's scope, restriction or role does not allow this.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found, or outside the key's restriction.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: The document changed since expected_revision.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: A plan limit or daily quota was reached.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Get Document
components:
schemas:
Error:
type: object
required:
- error
- message
properties:
error:
type: string
enum:
- invalid_input
- unauthorized
- forbidden
- not_found
- revision_conflict
- quota_exceeded
message:
type: string
description: What went wrong and what to do next.
additionalProperties: true
securitySchemes:
apiKey:
type: http
scheme: bearer
description: 'An API key: ''Authorization: Bearer ofp_pat_…''.'