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

# Send Message

> Send a message to an agent and receive a streaming SSE response.



## OpenAPI

````yaml POST /api/chat/messages
openapi: 3.0.3
info:
  title: Sontairo API
  description: REST API for the Sontairo AI agent orchestration platform
  version: 1.0.0
servers:
  - url: https://www.sontairo.com
security:
  - bearerAuth: []
  - cookieAuth: []
paths:
  /api/chat/messages:
    post:
      tags:
        - Chat
      summary: Send chat message
      description: Send a message to an agent and receive a streaming SSE response.
      operationId: sendMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - workspaceId
                - content
              properties:
                workspaceId:
                  type: string
                projectId:
                  type: string
                content:
                  type: string
                  minLength: 1
                  maxLength: 20000
                  description: Message content
                conversationId:
                  type: string
                  description: Existing conversation ID. Omit to start new.
                agentId:
                  type: string
                  description: Agent to chat with
                providerKeyId:
                  type: string
      responses:
        '200':
          description: SSE stream with conversation events
          content:
            text/event-stream:
              schema:
                type: string
                description: >-
                  Server-Sent Events stream. Events: conversation, status,
                  tool_call, tool_result, done, error
        '429':
          description: Rate limited — 30 messages per minute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Session token issued by the desktop/native auth exchange, sent as
        Authorization: Bearer <token>.
    cookieAuth:
      type: apiKey
      in: cookie
      name: session
      description: Browser session cookie set by the web sign-in flow.

````