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

# Send fax

> Initiates an asynchronous fax sending process. Returns an async result ID that can be used to track the status of the fax transmission.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml post /api/v2/communication/send-fax
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/communication/send-fax:
    post:
      tags:
        - Communication
      summary: Send fax
      description: >-
        Initiates an asynchronous fax sending process. Returns an async result
        ID that can be used to track the status of the fax transmission.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                to:
                  type: string
                  description: The fax number to send the document to
                document:
                  type: object
                  properties:
                    id:
                      type: string
                    fileName:
                      type: string
                  required:
                    - id
                    - fileName
                  additionalProperties: false
                  description: The document to be sent via fax
                enableBatchCollisionAvoidance:
                  type: boolean
                  default: false
                  description: >-
                    Recommended for high-volume fax operations or when sending
                    to recipients who may receive multiple faxes simultaneously.
                    Prevents transmission failures by automatically queuing your
                    fax when another transmission to the same number is already
                    in progress. Your fax will wait and automatically send once
                    the line is clear, ensuring reliable delivery without manual
                    intervention.
                enableBatchDelay:
                  type: boolean
                  default: false
                  description: >-
                    If enabled, the fax will be sent in batches according to the
                    specified batch delay timing.
                batchDelaySeconds:
                  type: string
                  default: '60'
                  description: >-
                    The delay between each batch of faxes in seconds, only used
                    if enableBatchDelay is true, defaults to 60 seconds
              required:
                - to
                - document
              additionalProperties: false
        required: true
      responses:
        '202':
          description: Accepted. Fax sending process initiated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  asyncResultId:
                    type: string
                    description: The ID to track the asynchronous fax sending task.
                required:
                  - asyncResultId
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The error message.
                  message:
                    type: string
                    description: The message.
                  statusCode:
                    type: number
                    description: The status code.
                  details:
                    type: object
                    additionalProperties: {}
                    description: The details of the error
                additionalProperties: true
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Not Found, the specified document does not exist.
                required:
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Internal server error while initiating fax sending.
                required:
                  - error
                additionalProperties: false
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from samplehc import SampleHealthcare

            client = SampleHealthcare(
                api_key=os.environ.get("SAMPLEHC_API_KEY"),  # This is the default and can be omitted
            )
            response = client.v2.communication.send_fax(
                document={
                    "id": "id",
                    "file_name": "fileName",
                },
                to="to",
            )
            print(response.async_result_id)

````