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

# Stream Chatbot Message

> Same as Send Chatbot Message, streamed via Server-Sent Events. Events: `session` (first), `typing`, `progress` ({message, stage}), `delta` ({text}, live LLM tokens), `message` (a complete step reply), `error` ({status_code, code, message}) and `done` (always last; same shape as the blocking `data`).



## OpenAPI

````yaml post /external/chatbots/{chatbot_id}/messages/stream
openapi: 3.1.0
info:
  title: Shieldbase External API
  description: Public API for Shieldbase AI integration
  version: 1.0.0
servers:
  - url: https://api.shieldbase.ai
    description: Production
  - url: http://localhost:8000
    description: Development
security:
  - ClientID: []
    APIKey: []
    Secret: []
paths:
  /external/chatbots/{chatbot_id}/messages/stream:
    post:
      tags:
        - Chatbots
      summary: Stream Chatbot Message
      description: >-
        Same as Send Chatbot Message, streamed via Server-Sent Events. Events:
        `session` (first), `typing`, `progress` ({message, stage}), `delta`
        ({text}, live LLM tokens), `message` (a complete step reply), `error`
        ({status_code, code, message}) and `done` (always last; same shape as
        the blocking `data`).
      parameters:
        - $ref: '#/components/parameters/TenantID'
        - name: chatbot_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatbotMessageRequest'
      responses:
        '200':
          description: SSE stream
          content:
            text/event-stream:
              schema:
                type: string
        '403':
          description: Invalid API credentials
components:
  parameters:
    TenantID:
      name: X-Tenant-ID
      in: header
      required: false
      description: >-
        Optional tenant selector for multitenant accounts. The API key owner
        must have access to the selected tenant.
      schema:
        type: string
  schemas:
    ChatbotMessageRequest:
      type: object
      properties:
        message:
          type: string
          description: >-
            What the user typed. Form and choice answers are understood from
            plain text.
        session_key:
          type: string
          maxLength: 200
          description: >-
            Your stable conversation key, e.g. `telegram:12345` or `wa:+628123`.
            Reuse it to continue a conversation. Omit to start a new one; the
            generated key is returned.
        file_urls:
          type: array
          items:
            type: string
          description: URLs of uploaded files (see `/external/upload`)
        form_values:
          type: object
          additionalProperties: true
          description: >-
            Optional structured form answers keyed by
            `next_step.form_fields[].field`
        reset:
          type: boolean
          default: false
          description: Forget the workflow position and partial answers before this message
        executor_timezone:
          type: integer
          description: Client UTC offset in minutes, e.g. 420 for UTC+7
        timeout_seconds:
          type: integer
          default: 300
          minimum: 1
          maximum: 1800
          description: Max wait for the reply. The turn keeps running after a timeout.
      example:
        session_key: wa:+628123456789
        message: Hi, I'm Budi
  securitySchemes:
    ClientID:
      type: apiKey
      in: header
      name: X-Client-ID
    APIKey:
      type: apiKey
      in: header
      name: X-API-Key
    Secret:
      type: apiKey
      in: header
      name: X-Secret

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.