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

# Create Letter



## OpenAPI

````yaml post /api/2.0/letters/
openapi: 3.1.0
info:
  contact:
    name: Elation Health
    url: https://www.elationhealth.com/
  description: Elation Health API v2.0
  title: Patient Document API
  version: 2.0.0
servers:
  - description: Sandbox Server
    url: https://sandbox.elationemr.com
  - description: Production Server
    url: https://api.app.elationemr.com
security: []
paths:
  /api/2.0/letters/:
    post:
      tags:
        - Referrals
      summary: Create Letter
      operationId: letters_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Letter'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Letter'
          description: ''
      security:
        - oauth2: []
components:
  schemas:
    Letter:
      properties:
        attachments:
          items:
            $ref: '#/components/schemas/LetterAttachment'
          type: array
        body:
          description: The body of the letter.
          type: string
        created_date:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        deleted_date:
          format: date-time
          readOnly: true
          type:
            - string
            - 'null'
        delivery_date:
          format: date-time
          type:
            - string
            - 'null'
        delivery_method:
          $ref: '#/components/schemas/DeliveryMethodEnum'
        direct_message_status:
          readOnly: true
          type:
            - string
            - 'null'
        direct_message_to:
          maxLength: 200
          type:
            - string
            - 'null'
        display_to:
          readOnly: true
          type:
            - string
            - 'null'
        document_date:
          format: date-time
          type: string
        email_to:
          maxLength: 200
          type:
            - string
            - 'null'
        failure_unacknowledged:
          type: string
        fax_attachments:
          type: boolean
        fax_status:
          readOnly: true
          type: string
        fax_to:
          maxLength: 20
          type:
            - string
            - 'null'
        id:
          readOnly: true
          type: integer
        is_processed:
          readOnly: true
          type: boolean
        letter_type:
          readOnly: true
          type: string
        patient:
          format: int64
          type: integer
        practice:
          format: int64
          type: integer
        referral_order:
          format: int64
          type:
            - integer
            - 'null'
        send_out:
          type: boolean
        send_to_contact:
          $ref: '#/components/schemas/SendToContact'
        send_to_elation_user:
          description: >-
            If a letter is sent to another elation user, this will be that
            user's id.
          readOnly: true
          type: integer
        send_to_name:
          maxLength: 200
          type:
            - string
            - 'null'
        sign_date:
          format: date-time
          type:
            - string
            - 'null'
        signed_by:
          description: The user who signed the letter.
          format: int64
          type:
            - integer
            - 'null'
        subject:
          description: The subject of the letter (Not needed with referral_order).
          maxLength: 200
          type: string
        tags:
          description: A list of Document Tags associated with the letter.
          items:
            format: int64
            type: integer
          type: array
        to_number:
          readOnly: true
          type:
            - string
            - 'null'
        viewed_at:
          format: date-time
          type:
            - string
            - 'null'
        with_archive:
          type: boolean
      required:
        - patient
        - practice
        - send_to_contact
      type: object
    LetterAttachment:
      properties:
        attachment_type:
          $ref: '#/components/schemas/AttachmentTypeEnum'
        entity_date:
          format: date-time
          type:
            - string
            - 'null'
        entity_description:
          type:
            - string
            - 'null'
        entity_id:
          format: int64
          type: integer
        entity_type:
          readOnly: true
          type:
            - integer
            - 'null'
        handout:
          format: int64
          type:
            - integer
            - 'null'
        id:
          readOnly: true
          type: integer
        summary:
          type:
            - string
            - 'null'
      required:
        - attachment_type
      type: object
    DeliveryMethodEnum:
      enum:
        - direct
        - email
        - emr
        - fax
        - passport
        - printed
      type: string
    SendToContact:
      properties:
        first_name:
          maxLength: 50
          type: string
        id:
          format: int64
          type: integer
        last_name:
          maxLength: 60
          type: string
        middle_name:
          maxLength: 50
          title: MiddleName
          type: string
        npi:
          maxLength: 20
          type:
            - string
            - 'null'
        org_name:
          maxLength: 100
          type:
            - string
            - 'null'
        specialties:
          items: {}
          type: array
      required:
        - id
      type: object
    AttachmentTypeEnum:
      description: |-
        * `Entity` - Entity
        * `RefPanel` - RefPanel
        * `PatientDemog` - PatientDemog
        * `ImmHistory` - ImmHistory
        * `MedsList` - MedsList
        * `CompMedsList` - CompMedsList
        * `WhoHeightChart` - WhoHeightChart
        * `WhoWeightChart` - WhoWeightChart
        * `WhoHcChart` - WhoHcChart
        * `WhoWflChart` - WhoWflChart
        * `CdcHeightChart` - CdcHeightChart
        * `CdcWeightChart` - CdcWeightChart
        * `CdcBmiChart` - CdcBmiChart
        * `CdcHcChart` - CdcHcChart
        * `PremieHeightChart` - PremieHeightChart
        * `PremieWeightChart` - PremieWeightChart
        * `PremieHcChart` - PremieHcChart
        * `DsinfantHeightChart` - DsinfantHeightChart
        * `DsinfantWeightChart` - DsinfantWeightChart
        * `DsinfantHcChart` - DsinfantHcChart
        * `DsHeightChart` - DsHeightChart
        * `DsWeightChart` - DsWeightChart
        * `DsBmiChart` - DsBmiChart
        * `DsHcChart` - DsHcChart
      enum:
        - Entity
        - RefPanel
        - PatientDemog
        - ImmHistory
        - MedsList
        - CompMedsList
        - WhoHeightChart
        - WhoWeightChart
        - WhoHcChart
        - WhoWflChart
        - CdcHeightChart
        - CdcWeightChart
        - CdcBmiChart
        - CdcHcChart
        - PremieHeightChart
        - PremieWeightChart
        - PremieHcChart
        - DsinfantHeightChart
        - DsinfantWeightChart
        - DsinfantHcChart
        - DsHeightChart
        - DsWeightChart
        - DsBmiChart
        - DsHcChart
      type: string
  securitySchemes:
    oauth2:
      flows:
        clientCredentials:
          scopes:
            act_as_user: >-
              Impersonate a provider via X-On-Behalf-Of (combinable with apiv2
              or system scopes)
            apiv2: Full access to the API
            system/{resource_name}.read: Read access to a specific resource
            system/{resource_name}.write: Write access to a specific resource
          tokenUrl: /api/2.0/oauth2/token/
      type: oauth2

````