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

# Create documents from a file tree

> Ingests a nested file-tree map of base64-encoded file contents (`uploaded`) and creates corresponding Scribe documents in the specified workspace or project.

Requires create-document permission on the target project, or create-project permission on the workspace when no `projectId` is supplied.



## OpenAPI

````yaml post /upload
openapi: 3.1.0
info:
  title: HERO API
  version: current
  description: |-
    The HERO REST API.

    See https://developers.myhero.so for the rendered docs.
servers:
  - url: https://app.myhero.so
security: []
paths:
  /upload:
    post:
      tags:
        - Upload
      summary: Create documents from a file tree
      description: >-
        Ingests a nested file-tree map of base64-encoded file contents
        (`uploaded`) and creates corresponding Scribe documents in the specified
        workspace or project.


        Requires create-document permission on the target project, or
        create-project permission on the workspace when no `projectId` is
        supplied.
      operationId: createUploadedDocuments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uploaded:
                  type: object
                  additionalProperties: {}
                workspaceId:
                  type: string
                  minLength: 1
                projectId:
                  type: string
                parentId:
                  type: string
                docxMode:
                  type: string
                  enum:
                    - convert
                    - keep
              required:
                - uploaded
                - workspaceId
      responses:
        '200':
          description: 200 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                required:
                  - data
        '400':
          description: 400 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: |-
                      Error class name (e.g.

                      ValidationError, NotFound)
                  message:
                    type: string
                    description: Human-readable error message
                  details:
                    type: array
                    items: {}
                required:
                  - error
                  - message
        '403':
          description: 403 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: |-
                      Error class name (e.g.

                      ValidationError, NotFound)
                  message:
                    type: string
                    description: Human-readable error message
                  details:
                    type: array
                    items: {}
                required:
                  - error
                  - message
        '500':
          description: 500 response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: boolean
                    enum:
                      - false
                required:
                  - data
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: HERO personal access token

````