> ## 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 Fax Attachment

> Upload a fax attachment via multipart and write it to tenant-scoped GCS.

Mirrors the patient-document upload pattern (``user/patient/document/upload``)
so the browser doesn't need direct GCS access. The merge/send endpoint then
references the returned ``gcs_path``; the tenant-prefix guard in
``FaxService.send_fax`` keeps a payload from referencing other tenants'
objects.



## OpenAPI

````yaml post /faxes/upload
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /faxes/upload:
    post:
      tags:
        - Faxes
      summary: Upload Fax Attachment
      description: >-
        Upload a fax attachment via multipart and write it to tenant-scoped GCS.


        Mirrors the patient-document upload pattern
        (``user/patient/document/upload``)

        so the browser doesn't need direct GCS access. The merge/send endpoint
        then

        references the returned ``gcs_path``; the tenant-prefix guard in

        ``FaxService.send_fax`` keeps a payload from referencing other tenants'

        objects.
      operationId: upload_fax_attachment_faxes_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_fax_attachment_faxes_upload_post
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FaxUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_upload_fax_attachment_faxes_upload_post:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
      type: object
      required:
        - file
      title: Body_upload_fax_attachment_faxes_upload_post
    FaxUploadResponse:
      properties:
        gcsPath:
          type: string
          title: Gcspath
        filename:
          type: string
          title: Filename
      type: object
      required:
        - gcsPath
        - filename
      title: FaxUploadResponse
      description: Returned after POST /faxes/upload writes a fax attachment to GCS.
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````