> ## Documentation Index
> Fetch the complete documentation index at: https://rendermate.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get document

> Read a document at one version (the latest by default) as JSX, with the version number. The JSX starts with a comment that explains its notation. Read it before editing: edit_document needs that version as its base_version, and its edits replace text in this JSX.

MCP tool: [`get_document`](/mcp/tools/documents#get_document).



## OpenAPI

````yaml /api/openapi.json get /v1/documents/{document_id}
openapi: 3.1.0
info:
  title: Rendermate API
  version: v1
servers:
  - url: https://api.rendermate.com
security:
  - api_key: []
tags:
  - name: Account
  - name: Workspaces
  - name: Projects
  - name: Documents
  - name: Links
  - name: Exports
  - name: Assets
  - name: Generations
  - name: Persons
  - name: Help
paths:
  /v1/documents/{document_id}:
    get:
      tags:
        - Documents
      summary: Get document
      description: >-
        Read a document at one version (the latest by default) as JSX, with the
        version number. The JSX starts with a comment that explains its
        notation. Read it before editing: edit_document needs that version as
        its base_version, and its edits replace text in this JSX.


        MCP tool: [`get_document`](/mcp/tools/documents#get_document).
      operationId: get_document
      parameters:
        - description: >-
            An alias, such as `latest`; `latest` when neither this nor `version`
            is given.
          in: query
          name: alias
          required: false
          schema:
            description: >-
              An alias, such as `latest`; `latest` when neither this nor
              `version` is given.
            type: string
        - in: path
          name: document_id
          required: true
          schema:
            type: string
        - description: A version, by number.
          in: query
          name: version
          required: false
          schema:
            description: A version, by number.
            format: uint64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              example:
                author:
                  id: api_key_01JF3Q1C5E7G9J2M4N6Q8S0T2W
                  name: ci
                  via: api
                commit_id: 0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10
                committed_at: '2026-12-03T10:15:00Z'
                id: doc_01JF3QZ8X6N2V7K4M9P5R1T3WY
                message: Shorten the intro
                sha256: >-
                  9f2c4e1a7b3d5f8e0c6a2b4d8f1e3c5a7b9d0f2e4c6a8b1d3f5e7c9a0b2d4f6e
                version: 12
              schema:
                properties:
                  author:
                    anyOf:
                      - $ref: '#/components/schemas/AuthorView'
                      - type: 'null'
                    description: The API key, or the member, that made it.
                  commit_id:
                    description: The commit that made the version.
                    type: string
                  committed_at:
                    description: RFC 3339.
                    type:
                      - string
                      - 'null'
                  id:
                    description: The document, `doc_…`.
                    type: string
                  jsx:
                    description: >-
                      The [Rendermate
                      document](https://rendermate.com/docs/documents) at this
                      version, written

                      as JSX; only when it's read, not when it's created or
                      committed. Edit it with

                      edit_document, giving this version as `base_version`.
                    type:
                      - string
                      - 'null'
                  message:
                    description: What the commit changes and why.
                    type:
                      - string
                      - 'null'
                  sha256:
                    description: SHA-256 of the document as canonical JSON.
                    type: string
                  version:
                    description: >-
                      The version's number: 1 for the document as created, one
                      more for each commit.
                    format: uint64
                    minimum: 0
                    type: integer
                required:
                  - id
                  - version
                  - commit_id
                  - sha256
                type: object
          description: OK
        '400':
          content:
            application/json:
              examples:
                invalid_request:
                  summary: invalid_request
                  value:
                    error:
                      code: invalid_request
                      doc_url: https://rendermate.com/docs/errors#invalid_request
                      message: give version or alias, not both
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: '- `invalid_request`: give version or alias, not both'
        '401':
          content:
            application/json:
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    error:
                      code: unauthorized
                      doc_url: https://rendermate.com/docs/errors#unauthorized
                      message: 'provide a valid API key: Authorization: Bearer sk_…'
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            - `unauthorized`: provide a valid API key: Authorization: Bearer
            sk_…
        '403':
          content:
            application/json:
              examples:
                key_without_workspace:
                  summary: key_without_workspace
                  value:
                    error:
                      code: key_without_workspace
                      doc_url: https://rendermate.com/docs/errors#key_without_workspace
                      message: >-
                        this API key has no workspace: create a key in the
                        dashboard, under api keys in the workspace it should act
                        in
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            - `key_without_workspace`: this API key has no workspace: create a
            key in the dashboard, under api keys in the workspace it should act
            in
        '404':
          content:
            application/json:
              examples:
                alias.not_found:
                  summary: alias.not_found
                  value:
                    error:
                      code: alias.not_found
                      doc_url: https://rendermate.com/docs/errors#alias.not_found
                      message: the document has no alias approved
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
                document.not_found:
                  summary: document.not_found
                  value:
                    error:
                      code: document.not_found
                      doc_url: https://rendermate.com/docs/errors#document.not_found
                      message: no such document
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
                version.not_found:
                  summary: version.not_found
                  value:
                    error:
                      code: version.not_found
                      doc_url: https://rendermate.com/docs/errors#version.not_found
                      message: 'no version 14: the newest is 12'
                      newest_version: 12
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: |-
            - `document.not_found`: no such document
            - `version.not_found`: no version 14: the newest is 12
            - `alias.not_found`: the document has no alias approved
        '500':
          content:
            application/json:
              examples:
                internal:
                  summary: internal
                  value:
                    error:
                      code: internal
                      doc_url: https://rendermate.com/docs/errors#internal
                      message: internal error
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: '- `internal`: internal error'
        '503':
          content:
            application/json:
              examples:
                documents.unavailable:
                  summary: documents.unavailable
                  value:
                    error:
                      code: documents.unavailable
                      doc_url: https://rendermate.com/docs/errors#unavailable
                      message: this deployment does not store documents yet
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            - `documents.unavailable`: this deployment does not store documents
            yet
components:
  schemas:
    AuthorView:
      description: Who made a version.
      properties:
        client:
          description: >-
            The program that sent it, from its User-Agent, such as
            `claude-code`.
          type:
            - string
            - 'null'
        id:
          description: The API key (`api_key_…`) or the member (`user_…`).
          type: string
        name:
          description: The API key's name, or the member's, when it made the version.
          type:
            - string
            - 'null'
        via:
          description: 'How the change came in: `api`, `dashboard` or `mcp`.'
          type:
            - string
            - 'null'
      required:
        - id
      type: object
    Error:
      properties:
        error:
          properties:
            code:
              description: Stable, such as `asset.name_taken` or `not_available`.
              type: string
            doc_url:
              description: The code's entry on the Errors page.
              type: string
            message:
              description: What went wrong and what to do next.
              type: string
            request_id:
              description: >-
                The request's ID, also in its `x-request-id` header. Quote it
                when you contact support.
              type: string
          required:
            - code
            - message
            - doc_url
            - request_id
          type: object
      required:
        - error
      type: object
  securitySchemes:
    api_key:
      description: >-
        An API key from the dashboard, such as `sk_live_…`. It acts in its
        workspace.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.