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

# Create documents



## OpenAPI

````yaml /openapi/document.json post /v2/documents/{document_id}/documents/
openapi: 3.0.3
info:
  title: Yume API — Документы
  version: 1.0.0
  description: Шаблоны и генерация документов.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v2/documents/{document_id}/documents/:
    post:
      tags:
        - documents
      summary: Create documents
      operationId: documents_create
      parameters:
        - in: path
          name: document_id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentFileBase64'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/DocumentFileBase64'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/DocumentFileBase64'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentFileBase64'
          description: ''
      security:
        - jwtAuth: []
        - {}
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    DocumentFileBase64:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        file:
          type: string
          format: uri
          readOnly: true
        type:
          allOf:
            - $ref: '#/components/schemas/Type36bEnum'
          minimum: 0
          maximum: 32767
        base64:
          type: string
          readOnly: true
        extra:
          readOnly: true
      required:
        - base64
        - extra
        - file
        - id
    Type36bEnum:
      enum:
        - 0
        - 1
        - 2
        - 3
      type: integer
      description: |-
        * `0` - Оригинал
        * `1` - Наложение
        * `2` - Электронная подпись
        * `3` - Подпись
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````