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

# Send Message

> Sends a message in a conversation between users



## OpenAPI

````yaml POST /conversations/send-message
openapi: 3.1.0
info:
  title: Tatu API
  description: API documentation for Tatu's booking and artist management system
  version: 1.0.0
servers:
  - url: http://localhost:3000/api
    description: Development server
security: []
paths:
  /conversations/send-message:
    post:
      summary: Send Message
      description: Sends a message in a conversation between users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageRequest'
      responses:
        '200':
          description: Message sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendMessageResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SendMessageRequest:
      type: object
      required:
        - conversationId
        - messageData
      properties:
        conversationId:
          type: string
          description: ID of the conversation to send the message to
        messageData:
          type: object
          oneOf:
            - type: object
              required:
                - type
                - text
              properties:
                type:
                  type: string
                  enum:
                    - TEXT
                  description: Type of message
                text:
                  type: string
                  description: Content of the text message
            - type: object
              required:
                - type
                - name
                - fileType
                - fileUrl
              properties:
                type:
                  type: string
                  enum:
                    - FILE
                  description: Type of message
                name:
                  type: string
                  description: Name of the file
                fileType:
                  type: string
                  description: MIME type of the file
                fileUrl:
                  type: string
                  description: URL where the file is stored
          description: Data for the message to send
        fileUrls:
          type: array
          items:
            type: object
            required:
              - url
              - name
              - type
            properties:
              url:
                type: string
                description: URL where the file is stored
              name:
                type: string
                description: Name of the file
              type:
                type: string
                description: MIME type of the file
          description: Optional array of file URLs to send as separate file messages
        messageId:
          type: string
          description: Optional frontend-generated unique ID for message correlation
    SendMessageResponse:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the message was sent successfully
        message:
          type: object
          description: The text message that was sent, if any
          allOf:
            - $ref: '#/components/schemas/Message'
        fileMessages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
          description: Array of file messages that were sent, if any
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    Message:
      type: object
      properties:
        id:
          type: string
          description: Message ID
        senderId:
          type: string
          description: ID of the user who sent the message
        content:
          type: string
          description: Message content
        timestamp:
          type: number
          description: Timestamp when the message was sent
        readBy:
          type: array
          items:
            type: string
          description: Array of user IDs who have read this message
        type:
          type: string
          description: Message type (text, system, etc.)

````