Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.toebox.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Get widget configuration

Retrieve the configuration for a chatbot widget. This endpoint is used by the embed script to load the widget’s appearance and behavior settings.

Endpoint

GET /api/widget/config

Query parameters

ParameterTypeRequiredDescription
chatbot_idstringYesThe chatbot ID

Headers

HeaderValueRequired
AuthorizationBearer tb_your-api-keyYes

Response

{
  "chatbot_id": "cb_abc123",
  "agent_id": "agent_def456",
  "name": "Storefront Assistant",
  "config": {
    "welcome_message": "Hi there! How can I help you today?",
    "suggested_prompts": [
      "What's new this week?",
      "Help me find running shoes",
      "Track my order",
      "What's your return policy?"
    ],
    "theme": {
      "primary_color": "#303030",
      "background_color": "#FFFFFF",
      "text_color": "#1A1A1A",
      "user_message_color": "#303030",
      "bot_message_color": "#F3F4F6"
    },
    "bubble_style": "rounded",
    "position": "bottom-right",
    "title": "Support",
    "subtitle": "We typically reply instantly"
  }
}

Response fields

FieldTypeDescription
chatbot_idstringUnique chatbot identifier
agent_idstringThe agent powering this chatbot
namestringInternal chatbot name
config.welcome_messagestringInitial message shown to visitors
config.suggested_promptsarrayClickable prompt suggestions
config.themeobjectColor configuration
config.bubble_stylestringrounded, square, or pill
config.positionstringbottom-right or bottom-left
config.titlestringChat window header title
config.subtitlestringOptional subtitle text

Error responses

StatusDescription
400Missing chatbot_id parameter
401Invalid or missing API key
404Chatbot not found
500Internal server error

Usage with embed script

The embed script calls this endpoint automatically when loading:
<script
  src="https://your-store.toebox.ai/embed/chatbot.js"
  data-chatbot-id="cb_abc123"
  async
></script>
The script fetches the widget config and renders the chat bubble with the configured theme, position, and behavior. You do not need to call this endpoint manually unless you are building a custom integration.