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

# Send a message to a chat session

> Streams the agent's response back as Vercel AI SDK data-stream (SSE)
events. File parts referencing uploaded files are resolved and passed to
the agent as media.



## OpenAPI

````yaml https://api.stuut.ai/openapi.json post /v2/aether/chats/{chat_id}
openapi: 3.1.0
info:
  title: Stuut API
  termsOfService: https://stuut.ai/terms-and-conditions
  contact:
    name: Stuut Support
    url: https://stuut.ai/
    email: devs@stuut.co
  version: 2.0.0
servers: []
security:
  - HTTPBearer: []
tags:
  - name: adjustments
    description: Operations for managing payment adjustments (fees, discounts, write-offs).
    x-displayName: Adjustments
  - name: aether
    description: Operations for aether.
    x-displayName: Aether
  - name: analytics
    description: Operations for retrieving analytics and dashboard data.
    x-displayName: Analytics
  - name: assistant
    description: Operations for the in-app chat assistant.
    x-displayName: Assistant
  - name: audit-log
    description: Operations for retrieving the organization's audit log.
    x-displayName: Audit Log
  - name: bank-accounts
    description: Operations for retrieving and managing bank accounts.
    x-displayName: Bank Accounts
  - name: bank-statements
    description: Operations for retrieving and managing bank statements.
    x-displayName: Bank Statements
  - name: bank-transactions
    description: Operations for retrieving and managing bank transactions.
    x-displayName: Bank Transactions
  - name: business-units
    description: Operations for listing and managing business units.
    x-displayName: Business Units
  - name: call-agent
    description: >-
      Operations for initiating and managing real-time voice calls with
      partners.
    x-displayName: Call Agent
  - name: calls
    description: Operations for retrieving and managing voice call records.
    x-displayName: Calls
  - name: cash-app
    description: Operations for cash application — matching incoming payments to invoices.
    x-displayName: Cash Application
  - name: chats
    description: Operations for managing chat conversations.
    x-displayName: Chats
  - name: cnam-registration
    description: Operations for managing CNAM (caller ID name) registration.
    x-displayName: CNAM Registration
  - name: credit-memos
    description: Operations for retrieving and searching credit memos.
    x-displayName: Credit Memos
  - name: custom-table-templates
    description: >-
      Operations for managing custom table templates used in email template
      variables.
    x-displayName: Custom Table Templates
  - name: customer-segments
    description: Operations for managing customer segments.
    x-displayName: Customer Segments
  - name: deductions-knowledge
    description: Operations for managing deduction processing knowledge entries.
    x-displayName: Deductions Knowledge
  - name: email-threads
    description: Operations for managing email threads.
    x-displayName: Email Threads
  - name: emails
    description: Operations for retrieving and managing emails.
    x-displayName: Emails
  - name: exports
    description: Operations for requesting and retrieving async data exports.
    x-displayName: Exports
  - name: integrations
    description: >-
      Operations for managing integrations with external systems (e.g. ERP, CRM,
      etc.).
    x-displayName: Integrations
  - name: internal-contacts
    description: >-
      Operations for managing internal contacts (CSMs, account managers, etc.)
      and their assignments to partners.
    x-displayName: Internal Contacts
  - name: invoices
    description: Operations for retrieving and managing invoices.
    x-displayName: Invoices
  - name: kyb
    description: Operations for Know Your Business (KYB) verification.
    x-displayName: KYB
  - name: ledger-accounts
    description: Operations for retrieving and managing ledger accounts.
    x-displayName: Ledger Accounts
  - name: mailbox-settings
    description: >-
      Operations for an organization's mailbox provider configuration: Microsoft
      admin consent, shared-mailbox discovery, and provider health.
    x-displayName: Mailbox Settings
  - name: mailboxes
    description: >-
      Operations for connecting, listing, updating, and archiving user and
      shared mailboxes, including delegated OAuth sign-in.
    x-displayName: Mailboxes
  - name: media
    description: >-
      Operations for signing direct-to-storage media uploads (e.g. signature
      images).
    x-displayName: Media
  - name: organizations
    description: Operations for retrieving and managing the current organization.
    x-displayName: Organizations
  - name: outreach-workflows
    description: Operations for managing automated collections outreach workflows.
    x-displayName: Outreach Workflows
  - name: partners
    description: Operations for retrieving and managing customers.
    x-displayName: Partners
  - name: payments
    description: Operations for approving and managing payments.
    x-displayName: Payments
  - name: report-configs
    description: >-
      Operations for managing report configurations (frequency, recipients,
      schedule).
    x-displayName: Report Configs
  - name: sms-campaign-registration
    description: Operations for managing A2P 10DLC SMS campaign registration.
    x-displayName: SMS Campaign Registration
  - name: sms-templates
    description: >-
      Operations for defining, storing, and managing parameterized SMS message
      templates.
    x-displayName: SMS Templates
  - name: sms-threads
    description: Operations for retrieving and managing SMS conversation threads.
    x-displayName: SMS Threads
  - name: users
    description: Operations for retrieving and managing users.
    x-displayName: Users
  - name: users-ooo
    description: Operations for managing user out-of-office (OOO) status and coverage.
    x-displayName: Users OOO
paths:
  /v2/aether/chats/{chat_id}:
    post:
      tags:
        - aether
        - chats
      summary: Send a message to a chat session
      description: |-
        Streams the agent's response back as Vercel AI SDK data-stream (SSE)
        events. File parts referencing uploaded files are resolved and passed to
        the agent as media.
      operationId: PostAetherChatsChatId
      parameters:
        - name: chat_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageInput'
      responses:
        '200':
          description: Successful Response
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ChatStream'
              x-speakeasy-sse-sentinel: '[DONE]'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SendMessageInput:
      properties:
        messages:
          items:
            $ref: '#/components/schemas/ChatMessageInput'
          type: array
          title: ''
      type: object
      required:
        - messages
      title: SendMessageInput
    ChatStream:
      properties:
        data:
          oneOf:
            - $ref: '#/components/schemas/StartEvent'
            - $ref: '#/components/schemas/StartStepEvent'
            - $ref: '#/components/schemas/FinishStepEvent'
            - $ref: '#/components/schemas/FinishEvent'
            - $ref: '#/components/schemas/TextStartEvent'
            - $ref: '#/components/schemas/TextDeltaEvent'
            - $ref: '#/components/schemas/TextEndEvent'
            - $ref: '#/components/schemas/ReasoningStartEvent'
            - $ref: '#/components/schemas/ReasoningDeltaEvent'
            - $ref: '#/components/schemas/ReasoningEndEvent'
            - $ref: '#/components/schemas/ToolInputStartEvent'
            - $ref: '#/components/schemas/ToolInputDeltaEvent'
            - $ref: '#/components/schemas/ToolInputAvailableEvent'
            - $ref: '#/components/schemas/ToolOutputAvailableEvent'
            - $ref: '#/components/schemas/DataCustomEvent'
            - $ref: '#/components/schemas/DataTableEvent'
            - $ref: '#/components/schemas/DataChartEvent'
            - $ref: '#/components/schemas/DataSuggestionsEvent'
            - $ref: '#/components/schemas/DataPlanResultEvent'
            - $ref: '#/components/schemas/ErrorEvent'
          title: ''
          discriminator:
            propertyName: type
            mapping:
              data-chart:
                $ref: '#/components/schemas/DataChartEvent'
              data-custom:
                $ref: '#/components/schemas/DataCustomEvent'
              data-plan-result:
                $ref: '#/components/schemas/DataPlanResultEvent'
              data-suggestions:
                $ref: '#/components/schemas/DataSuggestionsEvent'
              data-table:
                $ref: '#/components/schemas/DataTableEvent'
              error:
                $ref: '#/components/schemas/ErrorEvent'
              finish:
                $ref: '#/components/schemas/FinishEvent'
              finish-step:
                $ref: '#/components/schemas/FinishStepEvent'
              reasoning-delta:
                $ref: '#/components/schemas/ReasoningDeltaEvent'
              reasoning-end:
                $ref: '#/components/schemas/ReasoningEndEvent'
              reasoning-start:
                $ref: '#/components/schemas/ReasoningStartEvent'
              start:
                $ref: '#/components/schemas/StartEvent'
              start-step:
                $ref: '#/components/schemas/StartStepEvent'
              text-delta:
                $ref: '#/components/schemas/TextDeltaEvent'
              text-end:
                $ref: '#/components/schemas/TextEndEvent'
              text-start:
                $ref: '#/components/schemas/TextStartEvent'
              tool-input-available:
                $ref: '#/components/schemas/ToolInputAvailableEvent'
              tool-input-delta:
                $ref: '#/components/schemas/ToolInputDeltaEvent'
              tool-input-start:
                $ref: '#/components/schemas/ToolInputStartEvent'
              tool-output-available:
                $ref: '#/components/schemas/ToolOutputAvailableEvent'
      type: object
      required:
        - data
      title: ChatStream
      description: >-
        SSE frame describing the `data:` payload as a discriminated event union.


        Speakeasy's SSE schema model expects each frame's top-level properties
        to

        be SSE protocol fields (`id`, `event`, `data`, `retry`). The `data`
        field

        here describes the JSON object inside each `data:` line — a
        discriminated

        union of every event the aether wire emits. The wire format is unchanged

        from Vercel AI SDK v6 (`data: {"type": "...", ...}`).
    HTTPValidationError:
      $defs:
        ValidationError:
          properties:
            loc:
              items:
                anyOf:
                  - type: string
                  - type: integer
              title: Location
              type: array
            msg:
              title: Message
              type: string
            type:
              title: Type
              type: string
          required:
            - loc
            - msg
            - type
          title: ValidationError
          type: object
          x-speakeasy-include: true
      properties:
        type:
          const: request-validation
          title: Type
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Human-readable description of this specific problem.
          title: Detail
          x-speakeasy-error-message: true
        status:
          const: 422
          title: Status
          type: integer
        title:
          description: Short human-readable summary of the problem.
          title: Title
          type: string
          x-speakeasy-error-message: true
        errors:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Errors
          type: array
      required:
        - type
        - status
        - title
        - errors
      title: APIError
      type: object
    ChatMessageInput:
      properties:
        role:
          type: string
          enum:
            - user
            - assistant
            - system
          title: ''
          x-speakeasy-enum-format: union
        parts:
          items:
            anyOf:
              - $ref: '#/components/schemas/TextPartInput'
              - $ref: '#/components/schemas/FilePartInput'
              - $ref: '#/components/schemas/_UnknownPartInput'
          type: array
          title: ''
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
      type: object
      required:
        - role
      title: ChatMessageInput
    StartEvent:
      properties:
        type:
          type: string
          const: start
          title: ''
          default: start
        messageId:
          type: string
          title: ''
      type: object
      required:
        - type
        - messageId
      title: StartEvent
    StartStepEvent:
      properties:
        type:
          type: string
          const: start-step
          title: ''
          default: start-step
      type: object
      required:
        - type
      title: StartStepEvent
    FinishStepEvent:
      properties:
        type:
          type: string
          const: finish-step
          title: ''
          default: finish-step
      type: object
      required:
        - type
      title: FinishStepEvent
    FinishEvent:
      properties:
        type:
          type: string
          const: finish
          title: ''
          default: finish
      type: object
      required:
        - type
      title: FinishEvent
    TextStartEvent:
      properties:
        type:
          type: string
          const: text-start
          title: ''
          default: text-start
        id:
          type: string
          title: ''
      type: object
      required:
        - type
        - id
      title: TextStartEvent
    TextDeltaEvent:
      properties:
        type:
          type: string
          const: text-delta
          title: ''
          default: text-delta
        id:
          type: string
          title: ''
        delta:
          type: string
          title: ''
      type: object
      required:
        - type
        - id
        - delta
      title: TextDeltaEvent
    TextEndEvent:
      properties:
        type:
          type: string
          const: text-end
          title: ''
          default: text-end
        id:
          type: string
          title: ''
      type: object
      required:
        - type
        - id
      title: TextEndEvent
    ReasoningStartEvent:
      properties:
        type:
          type: string
          const: reasoning-start
          title: ''
          default: reasoning-start
        id:
          type: string
          title: ''
      type: object
      required:
        - type
        - id
      title: ReasoningStartEvent
    ReasoningDeltaEvent:
      properties:
        type:
          type: string
          const: reasoning-delta
          title: ''
          default: reasoning-delta
        id:
          type: string
          title: ''
        delta:
          type: string
          title: ''
      type: object
      required:
        - type
        - id
        - delta
      title: ReasoningDeltaEvent
    ReasoningEndEvent:
      properties:
        type:
          type: string
          const: reasoning-end
          title: ''
          default: reasoning-end
        id:
          type: string
          title: ''
      type: object
      required:
        - type
        - id
      title: ReasoningEndEvent
    ToolInputStartEvent:
      properties:
        type:
          type: string
          const: tool-input-start
          title: ''
          default: tool-input-start
        toolCallId:
          type: string
          title: ''
        toolName:
          type: string
          title: ''
      type: object
      required:
        - type
        - toolCallId
        - toolName
      title: ToolInputStartEvent
    ToolInputDeltaEvent:
      properties:
        type:
          type: string
          const: tool-input-delta
          title: ''
          default: tool-input-delta
        toolCallId:
          type: string
          title: ''
        inputTextDelta:
          type: string
          title: ''
      type: object
      required:
        - type
        - toolCallId
        - inputTextDelta
      title: ToolInputDeltaEvent
    ToolInputAvailableEvent:
      properties:
        type:
          type: string
          const: tool-input-available
          title: ''
          default: tool-input-available
        toolCallId:
          type: string
          title: ''
        toolName:
          type: string
          title: ''
        input:
          additionalProperties: true
          type: object
          title: ''
      type: object
      required:
        - type
        - toolCallId
        - toolName
        - input
      title: ToolInputAvailableEvent
    ToolOutputAvailableEvent:
      properties:
        type:
          type: string
          const: tool-output-available
          title: ''
          default: tool-output-available
        toolCallId:
          type: string
          title: ''
        output:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: ''
      type: object
      required:
        - type
        - toolCallId
        - output
      title: ToolOutputAvailableEvent
    DataCustomEvent:
      properties:
        type:
          type: string
          const: data-custom
          title: ''
          default: data-custom
        data:
          title: ''
      type: object
      required:
        - type
        - data
      title: DataCustomEvent
    DataTableEvent:
      properties:
        type:
          type: string
          const: data-table
          title: ''
          default: data-table
        data:
          additionalProperties: true
          type: object
          title: ''
      type: object
      required:
        - type
        - data
      title: DataTableEvent
    DataChartEvent:
      properties:
        type:
          type: string
          const: data-chart
          title: ''
          default: data-chart
        data:
          additionalProperties: true
          type: object
          title: ''
      type: object
      required:
        - type
        - data
      title: DataChartEvent
    DataSuggestionsEvent:
      properties:
        type:
          type: string
          const: data-suggestions
          title: ''
          default: data-suggestions
        data:
          additionalProperties: true
          type: object
          title: ''
      type: object
      required:
        - type
        - data
      title: DataSuggestionsEvent
    DataPlanResultEvent:
      properties:
        type:
          type: string
          const: data-plan-result
          title: ''
          default: data-plan-result
        data:
          $ref: '#/components/schemas/PlanResult'
          title: ''
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
      type: object
      required:
        - type
        - data
        - id
      title: DataPlanResultEvent
      description: Vercel AI SDK v6 typed `data-*` event carrying a final PlanResult.
    ErrorEvent:
      properties:
        type:
          type: string
          const: error
          title: ''
          default: error
        errorText:
          type: string
          title: ''
      type: object
      required:
        - type
        - errorText
      title: ErrorEvent
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          type: string
          title: Type
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
      x-speakeasy-include: true
    TextPartInput:
      properties:
        type:
          type: string
          const: text
          title: ''
        text:
          type: string
          title: ''
      type: object
      required:
        - type
        - text
      title: TextPartInput
    FilePartInput:
      properties:
        type:
          type: string
          const: file
          title: ''
        mediaType:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
        fileId:
          anyOf:
            - type: string
            - type: 'null'
          title: ''
      type: object
      required:
        - type
      title: FilePartInput
    _UnknownPartInput:
      properties:
        type:
          type: string
          title: ''
      additionalProperties: true
      type: object
      required:
        - type
      title: _UnknownPartInput
      description: >-
        Catch-all for part types we don't need to parse (tool calls, reasoning,
        etc.).
    PlanResult:
      properties:
        content:
          type: string
          title: Content
          description: The plan/response content
        articles:
          items:
            type: string
          type: array
          title: Articles
          description: Knowledge articles referenced in building this plan
      type: object
      required:
        - content
      title: PlanResult
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````