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

# Reply to a conversation

> Send a text or email reply to the customer on an existing conversation, the same as clicking Send in the dashboard. The customer receives it. Reply only on a channel in the conversation's channels. Website chats and calls with neither text nor email in channels cannot get a reply. The key's creator must be allowed to message the customer in the dashboard. A customer who opted out by replying STOP gets no texts, but email still sends. The reply goes only to the conversation's customer. The reply shows in the thread and Activity under the key's creator. A failed send still returns 201 with delivery_status failed. Requests from this playground go to production and message a real customer. Customer API.




## OpenAPI

````yaml /openapi.yaml post /conversations/{conversation_id}/messages
openapi: 3.0.0
info:
  title: Answering Agent API
  description: >
    The Customer API reads a team's conversations, transcripts, recordings,
    tasks, contacts, and reports. It also updates tasks, adds notes to them, and
    replies to customers on existing conversations. The Partner API lets
    reseller accounts manage organizations, users, locations, partner links, and
    embed tokens. Both use an X-API-KEY header. Requests from this playground go
    to production.
  version: 1.0.0
servers:
  - url: https://answeringagent.com/api/v1
    description: Production
security: []
tags:
  - name: Account
    description: Customer API. Your team, phone lines, and members.
  - name: Conversations
    description: >-
      Customer API. Calls, texts, website chats, and emails, with transcripts
      and recordings. Reply to customers by text or email.
  - name: Tasks
    description: >-
      Customer API. Follow-up tasks. Read them, update their status or assignee,
      and add notes.
  - name: Contacts
    description: Customer API. Your customers.
  - name: Reports
    description: Customer API. Report metrics, totals, and breakdowns.
  - name: Organizations
    description: Partner API, reseller accounts only.
  - name: Users
    description: Partner API, reseller accounts only.
  - name: Locations
    description: Partner API, reseller accounts only.
  - name: Account Linking
    description: Partner API, reseller accounts only.
  - name: Embed Tokens
    description: Partner API, reseller accounts only.
paths:
  /conversations/{conversation_id}/messages:
    post:
      tags:
        - Conversations
      summary: Reply to a conversation
      description: >
        Send a text or email reply to the customer on an existing conversation,
        the same as clicking Send in the dashboard. The customer receives it.
        Reply only on a channel in the conversation's channels. Website chats
        and calls with neither text nor email in channels cannot get a reply.
        The key's creator must be allowed to message the customer in the
        dashboard. A customer who opted out by replying STOP gets no texts, but
        email still sends. The reply goes only to the conversation's customer.
        The reply shows in the thread and Activity under the key's creator. A
        failed send still returns 201 with delivery_status failed. Requests from
        this playground go to production and message a real customer. Customer
        API.
      operationId: replyToConversation
      parameters:
        - $ref: '#/components/parameters/ConversationId'
        - in: header
          name: Idempotency-Key
          required: false
          schema:
            type: string
            pattern: ^[A-Za-z0-9._:-]{1,120}$
            example: cancel-confirm-184532
          description: >
            The same as idempotency_key in the body. Send one or the other.
            Sending both returns 400.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - body
              properties:
                channel:
                  type: string
                  enum:
                    - text
                    - email
                  description: >
                    One of the conversation's channels. Leave it out only when
                    channels has exactly one of text and email.
                body:
                  type: string
                  minLength: 1
                  maxLength: 5000
                  description: >
                    The message, 1 to 5,000 characters after leading and
                    trailing spaces are removed. An email reply uses the
                    thread's subject. A text longer than 10 SMS segments returns
                    422.
                idempotency_key:
                  type: string
                  pattern: ^[A-Za-z0-9._:-]{1,120}$
                  description: >
                    Scoped to the API key's creator and one conversation. A
                    retry with the same idempotency key on the same
                    conversation, from any API key that person created, returns
                    the first message and sends nothing. Reusing the key with a
                    different body or channel returns 409.
            example:
              channel: text
              body: >-
                Hi Dana, your membership is cancelled and there is no charge on
                the 12th.
              idempotency_key: cancel-confirm-184532
      responses:
        '201':
          description: >
            The reply was accepted. Check delivery_status to see whether it went
            out. A retry with the same idempotency key returns the first
            message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationMessage'
        '400':
          $ref: '#/components/responses/CustomerBadRequest'
        '401':
          $ref: '#/components/responses/CustomerUnauthorized'
        '403':
          description: The key's creator cannot message this customer in the dashboard.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerError'
        '404':
          $ref: '#/components/responses/CustomerNotFound'
        '405':
          $ref: '#/components/responses/CustomerMethodNotAllowed'
        '409':
          description: >
            The idempotency key was already used on this conversation for a
            different body or channel, and nothing was sent. Rarely, a 409 means
            the send started but its result could not be saved, so the text or
            email may have gone out. Check the conversation thread in the
            dashboard before you send it again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerError'
        '422':
          description: >
            The dashboard would refuse the same reply. Nothing was sent. The
            error gives the reason, such as no text or email thread on this
            conversation, a customer who opted out of texts, a text that is too
            long, or texting that is not set up.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerError'
        '429':
          description: >
            More than 120 API requests in a minute for this user returns "Too
            many requests. Try again in N seconds." More than 20 replies in a
            minute from this user, or more than 5 replies in a minute on this
            conversation, returns "Too many replies. Try again in N seconds."
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    ConversationId:
      in: path
      name: conversation_id
      required: true
      schema:
        type: integer
        minimum: 1
      description: The conversation ID.
  schemas:
    ConversationMessage:
      type: object
      required:
        - id
        - conversation_id
        - from
        - channel
        - text
        - sent_at
        - delivery_status
        - error
      properties:
        id:
          type: integer
          example: 7730514
        conversation_id:
          type: integer
          example: 184532
        from:
          type: string
          enum:
            - business
        channel:
          type: string
          enum:
            - text
            - email
          example: text
        text:
          type: string
          example: >-
            Hi Dana, your membership is cancelled and there is no charge on the
            12th.
        sent_at:
          type: string
          format: date-time
          example: '2026-10-06T15:04:52.000Z'
        delivery_status:
          type: string
          enum:
            - queued
            - sent
            - delivered
            - failed
            - unknown
          example: queued
          description: >
            queued means the carrier accepted the reply and has not sent it yet.
            failed means the send failed and error says why. unknown means the
            provider did not answer, so check the conversation later.
        error:
          type: string
          nullable: true
          example: null
          description: A plain reason when the send failed. Otherwise null.
    CustomerError:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: A message for people. The text can change.
          example: That conversation is not available.
        code:
          type: string
          description: A stable code to branch on.
          enum:
            - invalid_request
            - unauthorized
            - forbidden
            - not_found
            - method_not_allowed
            - conflict
            - unprocessable
            - rate_limited
            - internal
          example: not_found
        issues:
          type: array
          description: >-
            Present when code is invalid_request. One entry for each input that
            failed validation.
          items:
            type: object
            properties:
              path:
                type: array
                items: {}
              message:
                type: string
  responses:
    CustomerBadRequest:
      description: An input is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
    CustomerUnauthorized:
      description: >-
        The X-API-KEY header is missing, the key is wrong or revoked, or its
        owner was deactivated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
    CustomerNotFound:
      description: The record does not exist, or the key's owner cannot see it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
    CustomerMethodNotAllowed:
      description: The endpoint does not support that HTTP method. Nothing changed.
      headers:
        Allow:
          description: The methods the endpoint supports, such as GET, HEAD, OPTIONS.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomerError'
          example:
            error: This endpoint accepts GET.
            code: method_not_allowed
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

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