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

# Add Doc

> Add a single document to the Aryn platform.

This API calls DocParse to partition the document, and automatically
extracts any properties registered as part of the DocSet schema. This
method can take some time, so callers should consider invoking it via the
async endpoint.



## OpenAPI

````yaml api-reference/endpoint/platform/openapi.json post /v1/storage/docsets/{docset_id}/docs
openapi: 3.1.0
info:
  title: Aryn Platform API
  version: 0.1.0
servers:
  - url: https://api.aryn.cloud
    description: US Region
  - url: https://api.aryn.ai
    description: US Region
  - url: https://api.us.aryn.cloud
    description: US Region
  - url: https://api.us.aryn.ai
    description: US Region
security: []
paths:
  /v1/storage/docsets/{docset_id}/docs:
    post:
      tags:
        - Document
      summary: Add Doc
      description: >-
        Add a single document to the Aryn platform.


        This API calls DocParse to partition the document, and automatically

        extracts any properties registered as part of the DocSet schema. This

        method can take some time, so callers should consider invoking it via
        the

        async endpoint.
      operationId: add_doc_v1_storage_docsets__docset_id__docs_post
      parameters:
        - name: docset_id
          in: path
          required: true
          schema:
            type: string
            description: The unique identifier of the docset to which to add the doc.
            title: Docset Id
          description: The unique identifier of the docset to which to add the doc.
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_add_doc_v1_storage_docsets__docset_id__docs_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentMetadata'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_add_doc_v1_storage_docsets__docset_id__docs_post:
      properties:
        file:
          anyOf:
            - type: string
              format: binary
            - type: 'null'
          title: File
          description: The file to add to the Aryn platform.
        file_url:
          anyOf:
            - type: string
            - type: 'null'
          title: File Url
        options:
          anyOf:
            - type: string
              format: binary
            - type: 'null'
          title: Options
          description: DocParse options to use during partitioning
      type: object
      title: Body_add_doc_v1_storage_docsets__docset_id__docs_post
    DocumentMetadata:
      properties:
        account_id:
          type: string
          title: Account Id
          description: The account id containing the Document.
        doc_id:
          type: string
          title: Doc Id
          description: The unique id for the Document.
        docset_id:
          type: string
          title: Docset Id
          description: The unique id for the DocSet containing the Document.
        created_at:
          type: string
          title: Created At
          description: The time at which this document was added to the system.
        name:
          type: string
          title: Name
          description: The name of this Document.
        size:
          type: integer
          title: Size
          description: The size of the Document in bytes.
        content_type:
          type: string
          title: Content Type
          description: The content type of the source Document.
        properties:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Properties
          description: Additional properties for the Document.
      type: object
      required:
        - account_id
        - doc_id
        - docset_id
        - created_at
        - name
        - size
        - content_type
      title: DocumentMetadata
      description: ''
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````