> ## 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.

# Create Message

> Create a new message with optional file attachments



## OpenAPI

````yaml post /comms/chat/send-message
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /comms/chat/send-message:
    post:
      tags:
        - provider
        - comms
      summary: Create Message
      description: Create a new message with optional file attachments
      operationId: create_message_comms_chat_send_message_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_create_message_comms_chat_send_message_post
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_create_message_comms_chat_send_message_post:
      properties:
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        sender_id:
          type: string
          title: Sender Id
        chat_id:
          type: string
          title: Chat Id
        message_uid:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Uid
        quote_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Quote Id
        files:
          anyOf:
            - items:
                type: string
                format: binary
              type: array
            - type: 'null'
          title: Files
        event_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Id
        message_type:
          anyOf:
            - $ref: '#/components/schemas/MessageType'
            - type: 'null'
      type: object
      required:
        - sender_id
        - chat_id
      title: Body_create_message_comms_chat_send_message_post
    MessageSummary:
      properties:
        id:
          type: string
          title: Id
        messageUid:
          anyOf:
            - type: string
            - type: 'null'
          title: Messageuid
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        chatId:
          type: string
          title: Chatid
        status:
          $ref: '#/components/schemas/MessageStatus'
        errorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Errormessage
        sendoMessageId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sendomessageid
        sender:
          $ref: '#/components/schemas/UserTiny'
        functionCall:
          anyOf:
            - type: object
            - type: 'null'
          title: Functioncall
        createdDate:
          type: string
          format: date-time
          title: Createddate
        files:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Files
          default: []
        suggestedMessages:
          anyOf:
            - items:
                $ref: '#/components/schemas/SuggestedMessageSummary'
              type: array
            - type: 'null'
          title: Suggestedmessages
        toolCalls:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolCallSummary'
              type: array
            - type: 'null'
          title: Toolcalls
        eventId:
          anyOf:
            - type: string
            - type: 'null'
          title: Eventid
        type:
          anyOf:
            - $ref: '#/components/schemas/MessageType'
            - type: 'null'
      type: object
      required:
        - id
        - chatId
        - status
        - sender
        - createdDate
      title: MessageSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MessageType:
      type: string
      enum:
        - REMINDER
        - OVERRIDE
        - FOLLOW_UP
        - EXPIRED
        - CONFIRMATION
        - INTRODUCTORY
        - CANCELLED
        - UPDATE
      title: MessageType
    MessageStatus:
      type: string
      enum:
        - CREATED
        - QUEUED
        - SCHEDULED
        - SENDING
        - SENT
        - UNDELIVERED
        - DELIVERED
        - READ
        - FAILED
        - EXPIRED
        - OPTED_OUT
      title: MessageStatus
    UserTiny:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier for the user.
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
          description: The user's first name.
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
          description: The user's last name.
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
          description: The user's phone number.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: The user's email address.
        type:
          $ref: '#/components/schemas/UserType'
          description: The type of user.
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
          description: The location of the user.
      type: object
      required:
        - id
        - type
      title: UserTiny
    SuggestedMessageSummary:
      properties:
        id:
          type: string
          title: Id
        chatId:
          type: string
          title: Chatid
        fromMessageId:
          type: string
          title: Frommessageid
        content:
          type: string
          title: Content
        assistantId:
          type: string
          title: Assistantid
        isSelected:
          type: boolean
          title: Isselected
        createdDate:
          type: string
          format: date-time
          title: Createddate
      type: object
      required:
        - id
        - chatId
        - fromMessageId
        - content
        - assistantId
        - isSelected
        - createdDate
      title: SuggestedMessageSummary
    ToolCallSummary:
      properties:
        id:
          type: string
          title: Id
        callId:
          anyOf:
            - type: string
            - type: 'null'
          title: Callid
        messageId:
          anyOf:
            - type: string
            - type: 'null'
          title: Messageid
        alertId:
          anyOf:
            - type: string
            - type: 'null'
          title: Alertid
        toolName:
          type: string
          title: Toolname
        toolArguments:
          type: object
          title: Toolarguments
        toolCallId:
          anyOf:
            - type: string
            - type: 'null'
          title: Toolcallid
        result:
          anyOf:
            - type: object
            - type: 'null'
          title: Result
        toolCallDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Toolcalldescription
        hasBeenCalled:
          type: boolean
          title: Hasbeencalled
          default: false
        createdDate:
          type: string
          format: date-time
          title: Createddate
      type: object
      required:
        - id
        - toolName
        - toolArguments
        - createdDate
      title: ToolCallSummary
    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
    UserType:
      type: string
      enum:
        - PROVIDER
        - PATIENT
        - ASSISTANT
      title: UserType

````