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

# Send a reply

> Requires an `Idempotency-Key` header. Sending the same key again returns the original message and sends nothing. A `delivery_status` of `unknown` means the send could not be confirmed, and the same key keeps returning that message: confirm it did not arrive before sending it again with a new key.



## OpenAPI

````yaml /openapi.json post /v1/conversations/{conversation_id}/messages
openapi: 3.1.0
info:
  title: Cluster API
  version: '1'
servers:
  - url: https://api.getcluster.ai
security: []
paths:
  /v1/conversations/{conversation_id}/messages:
    post:
      tags:
        - Conversations
      summary: Send a reply
      description: >-
        Requires an `Idempotency-Key` header. Sending the same key again returns
        the original message and sends nothing. A `delivery_status` of `unknown`
        means the send could not be confirmed, and the same key keeps returning
        that message: confirm it did not arrive before sending it again with a
        new key.
      operationId: send_message
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Conversation Id
        - name: idempotency-key
          in: header
          required: true
          schema:
            type: string
            minLength: 8
            maxLength: 200
            title: Idempotency-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Payment Required
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '429':
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '503':
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - ApiKey: []
components:
  schemas:
    SendMessageRequest:
      properties:
        thread_id:
          type: string
          format: uuid
          title: Thread Id
        text:
          type: string
          maxLength: 100000
          minLength: 1
          title: Text
        html:
          anyOf:
            - type: string
              maxLength: 100000
            - type: 'null'
          title: Html
          description: Formatted body. Email threads only.
        cc:
          items:
            type: string
          type: array
          maxItems: 50
          title: Cc
          description: Email threads only.
        reply_to_message_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Reply To Message Id
      additionalProperties: false
      type: object
      required:
        - thread_id
        - text
      title: SendMessageRequest
    Message:
      properties:
        id:
          type: string
          title: Id
        conversation_id:
          type: string
          title: Conversation Id
        thread_id:
          type: string
          title: Thread Id
        channel:
          type: string
          title: Channel
        direction:
          type: string
          title: Direction
        kind:
          type: string
          title: Kind
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        html:
          anyOf:
            - type: string
            - type: 'null'
          title: Html
        subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Subject
        sent_at:
          type: string
          format: date-time
          title: Sent At
        delivery_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Delivery Status
        campaign_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Id
        campaign_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Name
        response_classification:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Classification
        classification_detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Classification Detail
      type: object
      required:
        - id
        - conversation_id
        - thread_id
        - channel
        - direction
        - kind
        - sent_at
      title: Message
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        request_id:
          type: string
          title: Request Id
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorDetail'
              type: array
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
        - request_id
      title: ErrorBody
    ErrorDetail:
      properties:
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: ErrorDetail
  securitySchemes:
    ApiKey:
      type: http
      description: A workspace API key, created under Settings, API keys.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.