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

# Stream a public Agent conversation response

> Emits `text_delta`, `tool_progress`, `action_proposal`, `complete`, and `failure` server-sent events. The completed assistant message is also stored in the canonical conversation.



## OpenAPI

````yaml /openapi.yaml post /public/agents/{agent}/conversations/{conversation}/messages/stream
openapi: 3.1.0
info:
  title: Contact Button API
  version: 1.0.0-alpha.1
  description: >
    API-first management and public agent actions for Contact Buttons and
    button.contact pages.

    API v1 is the first public contract. Existing private legacy API and browser
    workflows remain supported.
  contact:
    name: Contact Button
    url: https://learn.contactbutton.com
servers:
  - url: https://api.contactbutton.com/v1
    description: Production (canonical)
  - url: https://app.contactbutton.com/v1
    description: Backwards-compatible application-domain alias
security:
  - bearerAuth: []
tags:
  - name: Onboarding
    description: Human-verified agent onboarding.
  - name: Workspaces
  - name: Team
  - name: Pages
  - name: Agents
    description: Workspace Agent profile and behavior configuration.
  - name: Domains
  - name: Buttons
  - name: Forms
  - name: Surveys
  - name: Apps
  - name: Knowledge
  - name: Booking
  - name: Telephony
    description: >-
      Bring-your-own-Telnyx setup, call flows, phone numbers, and voice
      interactions.
  - name: Reviews
    description: >-
      Send consented review requests through workspace-owned email, SMS, and
      WhatsApp channels.
  - name: Commerce
  - name: Conversations
    description: >-
      Contact-centric threads and messages across chat, email, WhatsApp, and
      forms.
  - name: Engagement inbox
  - name: Public actions
    description: Public, rate-limited actions that may require human confirmation.
paths:
  /public/agents/{agent}/conversations/{conversation}/messages/stream:
    post:
      tags:
        - Conversations
      summary: Stream a public Agent conversation response
      description: >-
        Emits `text_delta`, `tool_progress`, `action_proposal`, `complete`, and
        `failure` server-sent events. The completed assistant message is also
        stored in the canonical conversation.
      operationId: streamPublicAgentConversationMessage
      parameters:
        - $ref: '#/components/parameters/PublicAgent'
        - $ref: '#/components/parameters/ConversationId'
        - $ref: '#/components/parameters/ConversationToken'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - body
              properties:
                body:
                  type: string
                  maxLength: 10000
                suggested_reply_id:
                  type: string
                  format: uuid
                attachment_ids:
                  type: array
                  maxItems: 5
                  items:
                    type: string
                    format: uuid
      responses:
        '200':
          description: Server-sent event stream.
          content:
            text/event-stream:
              schema:
                type: string
      security: []
components:
  parameters:
    PublicAgent:
      name: agent
      in: path
      required: true
      schema:
        type: string
        format: uuid
    ConversationId:
      name: conversation
      in: path
      required: true
      schema:
        type: string
        format: uuid
    ConversationToken:
      name: X-Conversation-Token
      in: header
      required: true
      description: Opaque participant token returned only when the conversation is created.
      schema:
        type: string
        minLength: 32
        maxLength: 128
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: Stable 8–120 character key for safe mutation retries.
      schema:
        type: string
        minLength: 8
        maxLength: 120
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum personal access token or OAuth 2.0 access token
      description: >
        A Contact Button scoped bearer key. Send `Authorization: Bearer
        <token>`.

        Token abilities are enforced independently of workspace membership; both
        checks must pass.

        Interactive MCP clients use registered OAuth applications, Authorization
        Code + PKCE,

        audience-bound tokens, and explicit workspace grants. Personal Sanctum
        tokens remain supported.
      x-contact-button-token-abilities:
        workspaces:read: Read workspaces, teams, domains, settings, and connections.
        workspaces:write: >-
          Create and manage workspaces, teams, domains, settings, and
          connections.
        content:read: Read buttons, forms, lists, pages, booking types, and knowledge.
        content:write: Create, update, publish, and remove content.
        engagements:read: >-
          Read submissions, subscribers, bookings, callbacks, calls, reviews,
          and conversations.
        engagements:manage: Reply to and manage engagement records.
        actions:request: Request protected actions that can still require human confirmation.

````