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

# Send message

> Sends a message in a thread masquerading as the specified agent



## OpenAPI

````yaml /api_v1.json post /api/v1/puppet/{namespace}/{sessionId}/{agentName}/thread/message
openapi: 3.1.0
info:
  title: Coral Server API
  version: '1.0'
servers: []
security: []
tags: []
externalDocs:
  url: /
paths:
  /api/v1/puppet/{namespace}/{sessionId}/{agentName}/thread/message:
    post:
      tags:
        - puppet
      summary: Send message
      description: Sends a message in a thread masquerading as the specified agent
      operationId: puppetSendMessage
      parameters:
        - name: namespace
          in: path
          description: The session's namespace
          required: true
          deprecated: false
          explode: false
          schema:
            type: string
            title: String
        - name: sessionId
          in: path
          description: The session's ID
          required: true
          deprecated: false
          explode: false
          schema:
            type: string
            title: String
        - name: agentName
          in: path
          description: The agent's name
          required: true
          deprecated: false
          explode: false
          schema:
            type: string
            title: String
      requestBody:
        description: Message input
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageInput'
        required: false
      responses:
        '200':
          description: Success
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendMessageOutput'
        '400':
          description: Bad message
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteException'
        '404':
          description: Agent or thread not found
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteException'
      deprecated: false
      security:
        - token: []
components:
  schemas:
    SendMessageInput:
      type: object
      properties:
        threadId:
          type: string
          description: The unique identifier for the thread to send a message in
          title: String
        content:
          type: string
          description: The content of the message to send
          title: String
        mentions:
          type: array
          description: ''
          items:
            type: string
            title: String
          title: ArrayList<String>
      required:
        - content
        - mentions
        - threadId
      title: SendMessageInput
    SendMessageOutput:
      type: object
      properties:
        status:
          type: string
          title: String
        message:
          $ref: '#/components/schemas/SessionThreadMessage'
      required:
        - message
        - status
      title: SendMessageOutput
    RouteException:
      type: object
      properties:
        message:
          type: string
          title: String
      required:
        - message
      title: RouteException
    SessionThreadMessage:
      type: object
      properties:
        id:
          type: string
          title: String
        threadId:
          type: string
          title: String
        text:
          type: string
          title: String
        senderName:
          type: string
          title: String
        mentionNames:
          type: array
          items:
            type: string
            title: String
          title: LinkedHashSet<String>
          uniqueItems: true
        timestamp:
          type: string
          title: UTC timestamp ISO-8601
      required:
        - id
        - mentionNames
        - senderName
        - text
        - threadId
        - timestamp
      title: SessionThreadMessage
  securitySchemes:
    token:
      type: http
      scheme: bearer
      bearerFormat: Configured token

````