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

# Get Document by ID

> Retrieve a document by its unique ID.



## OpenAPI

````yaml GET /document/{id}
openapi: 3.0.1
info:
  title: Machina Sports SDK
  description: >-
    Machina Sports API for seamless AI integration in sports, offering real-time
    insights, personalized content, and fan sentiment analysis.
  version: '1.0'
  termsOfService: http://machina.gg/tos/
  contact:
    email: support@machina.gg
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://{api-address}.org.machina.gg
    description: Production server
    variables:
      api-address:
        default: https://api.machina.gg
        description: Your api-address
  - url: http://local.machina:5001
    description: Local development server
security:
  - ApiToken: []
paths:
  /document/{id}:
    get:
      tags:
        - documents
      summary: Get Document by ID
      description: Retrieve a document by its unique ID.
      operationId: getDocumentById
      parameters:
        - name: id
          in: path
          required: true
          description: Unique ID of the document
          schema:
            type: string
      responses:
        '200':
          description: Document details
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      _id:
                        type: string
                        description: Unique identifier of the document
                        example: 67e1fc8c2a5ade8c69c03fe7
                      name:
                        type: string
                        description: Unique name of the document
                        example: New test document
                      value:
                        type: object
                        description: The main data of the document
                        example:
                          chat:
                            - What is Lorem Ipsum?
                            - >-
                              Lorem Ipsum is simply dummy text of the printing
                              and typesetting industry. Lorem Ipsum has been the
                              industry's standard dummy text ever since the
                              1500s, when an unknown printer took a galley of
                              type and scrambled it to make a type specimen
                              book.
                            - ' It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.'
                      metadata:
                        type: object
                        description: Additional metadata for the document
                        example:
                          agent_id: '123'
                      status:
                        type: string
                        description: Current status of the document
                        example: null
                      created:
                        type: string
                        description: Creation timestamp
                        example: Tue, 25 Mar 2025 00:45:00 GMT
                      updated:
                        type: string
                        description: Update timestamp
                        example: Tue, 25 Mar 2025 00:45:00 GMT
                      embed-vector:
                        type: boolean
                        description: Whether a vector embedding was created
                        example: false
                  status:
                    type: boolean
                    description: Operation status
                    example: true
                example:
                  data:
                    _id: 67e1fc8c2a5ade8c69c03fe7
                    created: Tue, 25 Mar 2025 00:45:00 GMT
                    embed-vector: false
                    metadata:
                      agent_id: '123'
                    name: New test document
                    status: null
                    updated: Tue, 25 Mar 2025 00:45:00 GMT
                    value:
                      chat:
                        - What is Lorem Ipsum?
                        - >-
                          Lorem Ipsum is simply dummy text of the printing and
                          typesetting industry. Lorem Ipsum has been the
                          industry's standard dummy text ever since the 1500s,
                          when an unknown printer took a galley of type and
                          scrambled it to make a type specimen book.
                        - ' It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.'
                  status: true
        '401':
          description: Unauthorized
        '404':
          description: Document not found
components:
  securitySchemes:
    ApiToken:
      type: apiKey
      name: x-api-token
      in: header
      description: API key authentication

````