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

# Reply to a conversation

> Send a reply message as an agent to a specific conversation. This endpoint allows agents to respond to customer messages and automatically updates conversation status.



## OpenAPI

````yaml post /api/v2/conversations/{conversationId}/reply
openapi: 3.0.1
info:
  title: LiveChatAI API v2
  description: >-
    LiveChatAI API v2 - Build powerful AI-powered customer support experiences.
    This API follows REST principles with predictable, resource-oriented URLs,
    JSON responses, and standard HTTP methods.
  version: 2.0.0
servers:
  - url: https://app.livechatai.com
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/v2/conversations/{conversationId}/reply:
    post:
      tags:
        - Conversations
      summary: Reply to a conversation
      description: >-
        Send a reply message as an agent to a specific conversation. This
        endpoint allows agents to respond to customer messages and automatically
        updates conversation status.
      parameters:
        - in: path
          name: conversationId
          schema:
            type: string
            example: chat_1234567890
          required: true
          description: Unique identifier of the conversation to reply to
      requestBody:
        required: true
        description: Agent reply details
        content:
          application/json:
            schema:
              type: object
              required:
                - message
                - userId
              properties:
                message:
                  type: string
                  example: >-
                    Thank you for your question. I'll help you with that right
                    away.
                  description: Reply message content to send
                userId:
                  type: string
                  example: user_1234567890
                  description: ID of the user sending the reply
                messageType:
                  type: string
                  enum:
                    - TEXT
                    - IMAGE
                    - FILE
                  default: TEXT
                  example: TEXT
                  description: >-
                    Type of message being sent. Resolved automatically when
                    attachments are provided.
                attachments:
                  type: array
                  description: >-
                    Optional file attachments. Upload each file to S3 first via
                    the attachments presign endpoint, then reference the
                    returned metadata here.
                  items:
                    type: object
                    required:
                      - url
                      - name
                      - mimeType
                      - size
                    properties:
                      url:
                        type: string
                        example: https://cdn.example.com/bot/chat/abc/messages/file.pdf
                      name:
                        type: string
                        example: report.pdf
                      mimeType:
                        type: string
                        example: application/pdf
                      size:
                        type: integer
                        description: File size in bytes
      responses:
        '200':
          description: User reply sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: User reply sent successfully
                  data:
                    type: object
                    properties:
                      messageId:
                        type: string
                        example: msg_1234567890
                        description: ID of the created reply message
                      conversationId:
                        type: string
                        example: chat_1234567890
                        description: ID of the conversation
                      message:
                        type: object
                        properties:
                          id:
                            type: string
                            example: msg_1234567890
                          text:
                            type: string
                            example: >-
                              Thank you for your question. I'll help you with
                              that right away.
                          sender:
                            type: string
                            enum:
                              - AGENT
                            example: AGENT
                          type:
                            type: string
                            enum:
                              - TEXT
                              - IMAGE
                              - FILE
                            example: TEXT
                          attachments:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                url:
                                  type: string
                                name:
                                  type: string
                                mimeType:
                                  type: string
                                size:
                                  type: integer
                                category:
                                  type: string
                                  enum:
                                    - image
                                    - video
                                    - audio
                                    - doc
                                    - text
                          createdAt:
                            type: string
                            format: date-time
                            example: '2024-01-20T14:45:00Z'
                          agent:
                            type: object
                            properties:
                              id:
                                type: string
                                example: agent_1234567890
                              name:
                                type: string
                                example: Jane Smith
                              email:
                                type: string
                                example: jane@company.com
                              avatar:
                                type: string
                                example: https://example.com/avatar.jpg
        '400':
          description: Bad request - Missing or invalid parameters
        '401':
          description: Unauthorized access
        '403':
          description: Access denied - Invalid conversation access
        '404':
          description: Conversation not found
        '500':
          description: Internal server error occurred
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````