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

# Send a message to a conversation route

> Accept one authed message for ``route_name`` and run its turn AS the route's
execution key.

The auth gate authorizes who may SEND; the turn's own authority is the route's
execution key, not the caller. Default answer is ``202 {message_id, thread_id}`` with
the answer delivered later by signed callback. With a ``wait_seconds`` body field
(clamped here to ``sync_wait_max_seconds``) a turn finishing in time answers ``200``
with the answer inline and its callback suppressed, so it never double-fires; a turn
still running when the wait elapses falls back to ``202``.



## OpenAPI

````yaml /openapi.json post /api/conversations/{route_name}/messages
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.1.1
servers: []
security: []
paths:
  /api/conversations/{route_name}/messages:
    post:
      tags:
        - conversations
      summary: Send a message to a conversation route
      description: >-
        Accept one authed message for ``route_name`` and run its turn AS the
        route's

        execution key.


        The auth gate authorizes who may SEND; the turn's own authority is the
        route's

        execution key, not the caller. Default answer is ``202 {message_id,
        thread_id}`` with

        the answer delivered later by signed callback. With a ``wait_seconds``
        body field

        (clamped here to ``sync_wait_max_seconds``) a turn finishing in time
        answers ``200``

        with the answer inline and its callback suppressed, so it never
        double-fires; a turn

        still running when the wait elapses falls back to ``202``.
      operationId: post_api_conversations_route_name_messages
      parameters:
        - in: path
          name: route_name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConversationMessage'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '202':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
        '503':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ReloadingError'
                  - $ref: '#/components/schemas/Error'
          description: >-
            The server is applying a config reload, or a dependency this route
            needs is temporarily unavailable; retry shortly.
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying; carried by the reloading
                answer.
              schema:
                type: integer
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ConversationMessage:
      description: >-
        The client-facing inbound body of the authed API door

        ``POST /api/conversations/{route_name}/messages``.


        ``external_user_id`` is the caller's handle for the end user: it becomes
        the

        ``client_address`` the answer is delivered against and the
        conversation's thread

        key. Frozen.
      properties:
        external_user_id:
          minLength: 1
          title: External User Id
          type: string
        text:
          minLength: 1
          title: Text
          type: string
        wait_seconds:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          default: null
          description: >-
            Bounded sync-wait window (seconds); absent = async 202. The door
            clamps to its runtime cap.
          title: Wait Seconds
      required:
        - external_user_id
        - text
      title: ConversationMessage
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
    ReloadingError:
      properties:
        error:
          const: reloading — the server is applying a config reload; retry shortly
          type: string
        reloading:
          const: true
          type: boolean
      required:
        - error
        - reloading
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````