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

# Upload Document

> Upload a document for a patient.



## OpenAPI

````yaml post /user/patient/document/upload
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /user/patient/document/upload:
    post:
      tags:
        - provider
        - user
      summary: Upload Document
      description: Upload a document for a patient.
      operationId: upload_document_user_patient_document_upload_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_upload_document_user_patient_document_upload_post
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_upload_document_user_patient_document_upload_post:
      properties:
        patient_id:
          type: string
          title: Patient Id
        title:
          type: string
          title: Title
        doc_type:
          $ref: '#/components/schemas/DocumentType'
        file:
          type: string
          format: binary
          title: File
        parse_with_ai:
          type: boolean
          title: Parse With Ai
          default: false
      type: object
      required:
        - patient_id
        - title
        - doc_type
        - file
      title: Body_upload_document_user_patient_document_upload_post
    DocumentSummary:
      properties:
        id:
          type: string
          title: Id
        patientId:
          type: string
          title: Patientid
        filePath:
          type: string
          title: Filepath
        fileType:
          type: string
          title: Filetype
        title:
          type: string
          title: Title
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        docType:
          $ref: '#/components/schemas/DocumentType'
        signatureUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Signatureurl
      type: object
      required:
        - id
        - patientId
        - filePath
        - fileType
        - title
        - summary
        - docType
        - signatureUrl
      title: DocumentSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentType:
      type: string
      enum:
        - LAB
        - PHARMACY
        - IMAGE
        - REPORT
        - OTHER
        - CONSENT
        - NOTE_UPLOAD
      title: DocumentType
    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

````