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

# Get Document

> Retrieve a single document by ID



## OpenAPI

````yaml api/openapi.json get /api/documents/{id}
openapi: 3.1.0
info:
  version: '0.1'
  title: Orchata API
servers:
  - url: https://api.orchata.ai
    description: Orchata API Server
security:
  - ApiKey: []
paths:
  /api/documents/{id}:
    get:
      tags:
        - Documents
      summary: Get Document
      description: Retrieve a single document by ID
      parameters:
        - schema:
            type: string
            example: document_123
          required: true
          name: id
          in: path
        - schema:
            type: string
            example: space_123
            description: The ID of the space containing the documents
          required: true
          description: The ID of the space containing the documents
          name: spaceId
          in: query
      responses:
        '200':
          description: Successfully retrieved document
          content:
            application/json:
              schema:
                type: object
                properties:
                  document:
                    type: object
                    properties:
                      id:
                        type: string
                      orgId:
                        type: string
                      spaceId:
                        type: string
                      filename:
                        type: string
                      mimeType:
                        type: string
                      fileSize:
                        type: string
                      storageUrl:
                        type: string
                      status:
                        type: string
                      errorMessage:
                        type:
                          - string
                          - 'null'
                      embeddingModel:
                        type: string
                      indexingType:
                        type: string
                      metadata: {}
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - orgId
                      - spaceId
                      - filename
                      - mimeType
                      - fileSize
                      - storageUrl
                      - status
                      - errorMessage
                      - embeddingModel
                      - indexingType
                      - createdAt
                      - updatedAt
                required:
                  - document
        '404':
          description: Document not found
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: >-
            import { Orchata } from '@orchata-ai/sdk';


            const client = new Orchata({ apiKey: 'oai_your_api_key' });


            const { document } = await client.documents.get('doc_123',
            'space_123');
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Oai-Api-Key

````