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

# Add Message to Chat



## OpenAPI

````yaml /api-reference/openapi.json post /v1/chats/{chatId}/messages
openapi: 3.0.0
info:
  title: HomieAI API
  description: The HomieAI API description
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.yourhomie.ai
    description: Production server
  - url: https://staging.api.yourhomie.ai
    description: Staging server
security: []
tags:
  - name: Chat
    description: ''
  - name: Knowledge
    description: Public, CORS-enabled endpoints for PDP question sets
paths:
  /v1/chats/{chatId}/messages:
    post:
      tags:
        - Chat
      summary: Add Message to Chat
      operationId: ChatController_addMessageToChat
      parameters:
        - name: chatId
          required: true
          in: path
          schema:
            type: string
        - name: store
          required: false
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageRequestDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageDto'
      security:
        - bearer: []
components:
  schemas:
    MessageRequestDto:
      type: object
      properties:
        message:
          type: string
        currentUrl:
          type: string
      required:
        - message
        - currentUrl
    MessageDto:
      type: object
      properties:
        id:
          type: string
        chatId:
          type: string
        type:
          type: string
        content:
          type: string
        suggestions:
          type: array
          items:
            type: string
        products:
          type: array
          items:
            $ref: '#/components/schemas/MessageProductDto'
        createdAt:
          type: string
      required:
        - id
        - chatId
        - type
        - content
        - createdAt
    MessageProductDto:
      type: object
      properties:
        gtin:
          type: string
        brand:
          type: string
        designation:
          type: string
        url:
          type: string
          format: uri
        image:
          type: string
          format: uri
        price:
          type: number
        priceInfo:
          type: string
        currency:
          type: string
        location:
          type: array
          items:
            $ref: '#/components/schemas/MessageProductLocationDto'
        availability:
          $ref: '#/components/schemas/MessageAvailabilityDto'
        category:
          type: string
        query:
          type: string
        description:
          type: string
        recommendationText:
          type: string
        flags:
          type: array
          items:
            $ref: '#/components/schemas/ProductFlags'
      required:
        - gtin
        - brand
        - designation
        - url
        - image
        - price
        - currency
    MessageProductLocationDto:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
      required:
        - key
        - value
    MessageAvailabilityDto:
      type: object
      properties:
        status:
          type: string
        quantity:
          type: number
      required:
        - status
        - quantity
    ProductFlags:
      type: object
      properties:
        type:
          type: string
        title:
          type: string
        text:
          type: string
      required:
        - type
        - title
        - text
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````