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

# Get all messages for a webchat session (no auth)

> Public endpoint used by the webchat widget to bootstrap the conversation history for a session. Returns sender metadata only when `showSenderNameInWebchat` is enabled on the webchat config.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/messages/webchat/{webchatId}
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/messages/webchat/{webchatId}:
    get:
      tags:
        - Messages
      summary: Get all messages for a webchat session (no auth)
      description: >-
        Public endpoint used by the webchat widget to bootstrap the conversation
        history for a session. Returns sender metadata only when
        `showSenderNameInWebchat` is enabled on the webchat config.
      operationId: get_messages_webchat
      parameters:
        - in: path
          name: webchatId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Webchat messages returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebchatMessagesResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorResponse'
components:
  schemas:
    WebchatMessagesResponse:
      type: object
      properties:
        messages:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              text:
                type: string
              sender:
                type: string
                description: Either "user" or "bot"
              timestamp:
                type: number
              attachments:
                type: array
                items:
                  type: object
                  additionalProperties: true
              senderInfo:
                type: object
                properties:
                  type:
                    type: string
                    description: Either "AI" or "HUMAN"
                  name:
                    type: string
                additionalProperties: false
                description: >-
                  Null when showSenderNameInWebchat is disabled or message is
                  incoming
            additionalProperties: true
      additionalProperties: true
      example:
        messages:
          - id: 67c0a0b0c0d0e0f0a0b0c0d0
            text: Hi! How can we help?
            sender: bot
            timestamp: 1747571400000
            attachments: []
            senderInfo:
              type: AI
              name: Tether AI
          - id: 67c0a0b0c0d0e0f0a0b0c0d1
            text: I need a refund.
            sender: user
            timestamp: 1747571410000
    LegacyErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        data: {}
      additionalProperties: true
      example:
        error: Attachment not found
        message: Attachment not found

````