Step-by-step guide to creating your first AI-powered customer support chatbot
Learn how to build a functional customer support bot from scratch. This beginner-friendly guide walks you through creating a bot, connecting it to Telegram, and setting up an AI integration.
Most AI providers require a proxy service to transform the payload format. See the Webhook Integration Guide for detailed setup instructions.
Step 4: Configure Bot Behavior
Customize how your bot behaves in conversations.
1
Go to Behavior Settings
Click the Behavior tab on your bot’s page.
2
Enable Typing Indicators
Turn on Typing Indicators to show a typing animation while the bot processes responses.This makes conversations feel more natural and gives users feedback that their message is being handled.
3
Set Reply Detection
For group chats, configure when the bot should respond:
All Messages: Respond to every message (good for support channels)
Mentions Only: Only respond when @mentioned
Thread Replies: Only respond in threads where bot is active
4
Set Context Window
Set the conversation context window to 10-15 messages.This determines how much conversation history is sent to your AI integration.
Step 5: Test Your Bot
1
Open Telegram
Find your bot in Telegram by searching for its username.
2
Start a Conversation
Click Start or send /start to begin.
3
Send a Test Message
Try asking a common support question:
What are your business hours?
4
Verify Response
The bot should:
Show a typing indicator
Process your message through the AI integration
Reply with an intelligent response
Congratulations! Your support bot is now live and responding to messages.
Testing Your Bot
Example Conversation
Here’s what a typical interaction looks like:
User: Hi, I need help with my orderBot: [typing indicator appears]Bot: Hello! I'd be happy to help you with your order.Could you please provide your order number or the emailaddress you used when placing the order?User: Order #12345Bot: [typing indicator appears]Bot: Thank you! Let me look up order #12345 for you...
What to Test
Test these common scenarios:
Basic Questions: Ask simple questions your bot should know
Follow-up Questions: Test if conversation context is maintained
Group Behavior: Add bot to a group and test mention detection
Response Time: Verify typing indicators appear and responses are timely
Error Handling: Send unexpected input to see how the bot handles it
Improving Your Bot
Write a Better System Prompt
The system prompt defines your bot’s personality and capabilities. Here’s a template:
You are a helpful customer support assistant for [Your Company Name].Your role is to:- Answer customer questions clearly and professionally- Provide information about products, services, and policies- Help troubleshoot common issues- Escalate complex problems to human agents when necessaryGuidelines:- Always greet customers warmly- Keep responses concise (2-3 sentences when possible)- Use bullet points for lists- If you don't know something, admit it honestly- Never make up information- Maintain a friendly, professional toneWhen to escalate:- Requests for refunds or account changes- Technical issues you cannot resolve- Customer expresses frustration or requests human agent
Add Knowledge Base Context
To provide accurate answers, include your documentation in the AI context:Option 1: RAG (Recommended)
Embed your documentation in a vector database
Search for relevant articles based on user questions
Include relevant content in the AI prompt
Option 2: Static Context
Include key information directly in the system prompt
Best for small knowledge bases (< 5 pages)
Update prompt when documentation changes
Monitor Conversations
Regularly review conversations to identify:
Questions the bot handles well
Topics that need better answers
Common confusion points
Opportunities for improvement
API Examples
You can also interact with your bot programmatically via the API.
Send a message to a user
cURL
JavaScript
PHP
Python
curl -X POST https://api.chatbotplatform.io/v1/messages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "bot_id": "bot_123", "channel_type": "telegram", "chat_id": "987654321", "message": "Hello from the API!" }'
Test the integration using the built-in test feature
Verify API keys are correct and have proper permissions
Check integration logs for error messages
Increase timeout if responses take longer than expected
Bot responds to every message in group chat
Cause: Reply detection is set to “All Messages”Solution: Change to “Mentions Only” or “Thread Replies” in Behavior settings
Typing indicator doesn’t appear
Cause: Typing indicators are disabled or channel doesn’t support themSolution: Enable typing indicators in Behavior settings. Note that not all channels support this feature.
Responses are slow
Possible causes:
AI model is slow (e.g., GPT-4 vs GPT-3.5)
Network latency between platform and your integration
Your integration is processing additional logic
Solutions:
Use a faster AI model
Optimize your integration code
Increase timeout to allow more processing time
Next Steps
Add Grounded Responses
Use Agentic Loops to ground responses in real data
Deploy to More Channels
Connect your bot to Slack, Discord, and more
Manage Conversation Context
Control how conversation history is handled
Webhook Integration Deep Dive
Learn advanced integration patterns
Related Documentation
Bot Behaviors - Configure typing indicators and reply detection
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Chatbot Platform Documentation","colors":{"primary":"#6366F1"},"footer":{},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"chatbotplatform","hasAudioNarration":false,"actualSubdomain":"chatbotplatform","customDomains":["docs.chatbotplatform.io"],"gitSource":{"type":"github","owner":"jonnx","repo":"docs.chatbotplatform.io","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b09daf3bc2b2d94fb276943","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"default","tag":"Bots","count":40},{"language":"default","tag":"Guides","count":16},{"language":"default","tag":"MCP Servers","count":12},{"language":"default","tag":"Agentic Loops","count":10},{"language":"default","tag":"Channels","count":8},{"language":"default","tag":"Behaviors","count":3},{"language":"default","tag":"Conversations","count":3},{"language":"default","tag":"Integrations","count":3},{"language":"default","tag":"Getting Started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"guides/support-bot-basics","slug":"/guides/support-bot-basics","pageMetadata":{"title":"Building a Basic Support Bot","description":"Step-by-step guide to creating your first AI-powered customer support chatbot","href":"/guides/support-bot-basics"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Step-by-step guide to creating your first AI-powered customer support chatbot\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Callout,Card,CardGroup,CodeBlock,Frame,Heading,OptimizedImage,Step,Steps,Tab,Tabs}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Callout)_missingMdxReference(`Callout`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Learn how to build a functional customer support bot from scratch. This beginner-friendly guide walks you through creating a bot, connecting it to Telegram, and setting up an AI integration.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-you’ll-learn`,children:`What You’ll Learn`}),`\n`,_jsx(_components.p,{children:`By the end of this guide, you’ll have:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A working support bot deployed to Telegram`}),`\n`,_jsx(_components.li,{children:`An AI integration that handles customer questions`}),`\n`,_jsx(_components.li,{children:`Typing indicators for natural conversations`}),`\n`,_jsx(_components.li,{children:`Automatic conversation history tracking`}),`\n`,_jsx(_components.li,{children:`Basic understanding of bot configuration`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before starting, you’ll need:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A Chatbot Platform account (`,_jsx(_components.a,{href:`https://app.chatbotplatform.io/register`,children:`sign up here`}),`)`]}),`\n`,_jsx(_components.li,{children:`A Telegram account`}),`\n`,_jsx(_components.li,{children:`An API key from OpenAI, Anthropic, or another AI provider`}),`\n`,_jsx(_components.li,{children:`15 minutes of your time`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-create-your-bot`,children:`Step 1: Create Your Bot`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Access the Dashboard`,children:_jsxs(_components.p,{children:[`Log into `,_jsx(_components.a,{href:`https://app.chatbotplatform.io`,children:`Chatbot Platform`}),` and navigate to the Bots page.`]})}),_jsxs(Step,{title:`Click Create Bot`,children:[_jsxs(_components.p,{children:[`Click the `,_jsx(_components.strong,{children:`Create Bot`}),` button in the top right corner.`]}),_jsx(Frame,{caption:`Bots dashboard`,children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/images/screenshots/01-getting-started/01_bots_index.png`,alt:`Bots dashboard`})})]}),_jsxs(Step,{title:`Fill in Bot Details`,children:[_jsx(_components.p,{children:`Enter the following information:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: “Support Bot” (or your preferred name)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),`: “Customer support assistant that answers common questions”`]}),`\n`]}),_jsx(Frame,{caption:`Create bot form`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatbotplatform/QhGUbEN05MzAjt2K/images/screenshots/01-getting-started/03_create_bot_form.png?fit=max\u0026auto=format\u0026n=QhGUbEN05MzAjt2K\u0026q=85\u0026s=0d7a8d37b31f44d34d8a24661a1763c9`,alt:`Create bot form`,\"data-og-width\":`1920`,width:`1920`,\"data-og-height\":`941`,height:`941`,\"data-path\":`images/screenshots/01-getting-started/03_create_bot_form.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatbotplatform/QhGUbEN05MzAjt2K/images/screenshots/01-getting-started/03_create_bot_form.png?w=280\u0026fit=max\u0026auto=format\u0026n=QhGUbEN05MzAjt2K\u0026q=85\u0026s=4904fec314d4c251177c4a45b622e466 280w, https://mintcdn.com/chatbotplatform/QhGUbEN05MzAjt2K/images/screenshots/01-getting-started/03_create_bot_form.png?w=560\u0026fit=max\u0026auto=format\u0026n=QhGUbEN05MzAjt2K\u0026q=85\u0026s=c900047babc1ab6f8356325670dc7e18 560w, https://mintcdn.com/chatbotplatform/QhGUbEN05MzAjt2K/images/screenshots/01-getting-started/03_create_bot_form.png?w=840\u0026fit=max\u0026auto=format\u0026n=QhGUbEN05MzAjt2K\u0026q=85\u0026s=35ef45f77211424fc97de523526f7bbc 840w, https://mintcdn.com/chatbotplatform/QhGUbEN05MzAjt2K/images/screenshots/01-getting-started/03_create_bot_form.png?w=1100\u0026fit=max\u0026auto=format\u0026n=QhGUbEN05MzAjt2K\u0026q=85\u0026s=5313ce91dedd7d6e276b16dfd533e73e 1100w, https://mintcdn.com/chatbotplatform/QhGUbEN05MzAjt2K/images/screenshots/01-getting-started/03_create_bot_form.png?w=1650\u0026fit=max\u0026auto=format\u0026n=QhGUbEN05MzAjt2K\u0026q=85\u0026s=30ad69e5fba8a5607247af5213ad38a5 1650w, https://mintcdn.com/chatbotplatform/QhGUbEN05MzAjt2K/images/screenshots/01-getting-started/03_create_bot_form.png?w=2500\u0026fit=max\u0026auto=format\u0026n=QhGUbEN05MzAjt2K\u0026q=85\u0026s=b1df3af79ce698b6aee0ca82901bab00 2500w`})})]}),_jsx(Step,{title:`Create the Bot`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Create`}),` to generate your bot instance.`]})})]}),`\n`,_jsx(Callout,{type:`success`,children:_jsx(_components.p,{children:`Your bot is now created! Next, we’ll connect it to Telegram so users can interact with it.`})}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-connect-to-telegram`,children:`Step 2: Connect to Telegram`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open BotFather on Telegram`,children:_jsxs(_components.p,{children:[`In Telegram, search for `,_jsx(_components.a,{href:`https://t.me/BotFather`,children:`@BotFather`}),` and start a chat.`]})}),_jsxs(Step,{title:`Create a New Telegram Bot`,children:[_jsxs(_components.p,{children:[`Send the command `,_jsx(_components.code,{children:`/newbot`}),` to BotFather.`]}),_jsx(_components.p,{children:`Follow the prompts:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: “My Support Bot” (display name, can be anything)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Username`}),`: “my_support_bot” (must be unique and end with “bot”)`]}),`\n`]})]}),_jsxs(Step,{title:`Copy the Bot Token`,children:[_jsx(_components.p,{children:`BotFather will provide a token that looks like:`}),_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`123456789:ABCdefGHIjklMNOpqrsTUVwxyz`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(_components.p,{children:`Copy this token - you’ll need it in the next step.`})]}),_jsxs(Step,{title:`Add Telegram Channel`,children:[_jsx(_components.p,{children:`Back in Chatbot Platform:`}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Go to your bot’s page`}),`\n`,_jsxs(_components.li,{children:[`Click the `,_jsx(_components.strong,{children:`Channels`}),` tab`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create Channel`})]}),`\n`,_jsxs(_components.li,{children:[`Select `,_jsx(_components.strong,{children:`Telegram`})]}),`\n`,_jsx(_components.li,{children:`Paste your bot token`}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create`})]}),`\n`]}),_jsx(Frame,{caption:`Channel configuration`,children:_jsx(OptimizedImage,{src:`https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/images/screenshots/03-channels/01_telegram_form.png`,alt:`Telegram channel form`})})]}),_jsx(Step,{title:`Verify Connection`,children:_jsx(_components.p,{children:`The platform automatically configures the webhook. Your bot is now listening for messages on Telegram.`})})]}),`\n`,_jsx(Callout,{type:`warning`,children:_jsx(_components.p,{children:`Keep your bot token secret. Never share it publicly or commit it to version control.`})}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-set-up-ai-integration`,children:`Step 3: Set Up AI Integration`}),`\n`,_jsx(_components.p,{children:`Now we’ll connect your bot to an AI provider so it can generate intelligent responses.`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Navigate to Integrations`,children:_jsxs(_components.p,{children:[`From your bot’s page, click the `,_jsx(_components.strong,{children:`Integrations`}),` tab.`]})}),_jsxs(Step,{title:`Create Integration`,children:[_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Create Integration`}),` and enter:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: “OpenAI GPT-4”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Webhook URL`}),`: Your AI service endpoint (see examples below)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Timeout`}),`: 30 seconds`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Weight`}),`: 100 (use this integration 100% of the time)`]}),`\n`]}),_jsx(Frame,{caption:`Integration setup`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatbotplatform/IwOyuSig9ydzaHpG/images/screenshots/02-integrations/03_integration_basic_info.png?fit=max\u0026auto=format\u0026n=IwOyuSig9ydzaHpG\u0026q=85\u0026s=fe9bedac25887b9547a1faf26518a754`,alt:`Integration configuration`,\"data-og-width\":`1920`,width:`1920`,\"data-og-height\":`941`,height:`941`,\"data-path\":`images/screenshots/02-integrations/03_integration_basic_info.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatbotplatform/IwOyuSig9ydzaHpG/images/screenshots/02-integrations/03_integration_basic_info.png?w=280\u0026fit=max\u0026auto=format\u0026n=IwOyuSig9ydzaHpG\u0026q=85\u0026s=38325905eb660a9020dea66619d7cd7a 280w, https://mintcdn.com/chatbotplatform/IwOyuSig9ydzaHpG/images/screenshots/02-integrations/03_integration_basic_info.png?w=560\u0026fit=max\u0026auto=format\u0026n=IwOyuSig9ydzaHpG\u0026q=85\u0026s=321df56de5bdab6e115a6403ff6996df 560w, https://mintcdn.com/chatbotplatform/IwOyuSig9ydzaHpG/images/screenshots/02-integrations/03_integration_basic_info.png?w=840\u0026fit=max\u0026auto=format\u0026n=IwOyuSig9ydzaHpG\u0026q=85\u0026s=4b46ad368b140bba0ab73ecef889f81d 840w, https://mintcdn.com/chatbotplatform/IwOyuSig9ydzaHpG/images/screenshots/02-integrations/03_integration_basic_info.png?w=1100\u0026fit=max\u0026auto=format\u0026n=IwOyuSig9ydzaHpG\u0026q=85\u0026s=5c5d9aa1640678ab4c68c82620d875a2 1100w, https://mintcdn.com/chatbotplatform/IwOyuSig9ydzaHpG/images/screenshots/02-integrations/03_integration_basic_info.png?w=1650\u0026fit=max\u0026auto=format\u0026n=IwOyuSig9ydzaHpG\u0026q=85\u0026s=fbea84ab7100ade57717ad7c34a854eb 1650w, https://mintcdn.com/chatbotplatform/IwOyuSig9ydzaHpG/images/screenshots/02-integrations/03_integration_basic_info.png?w=2500\u0026fit=max\u0026auto=format\u0026n=IwOyuSig9ydzaHpG\u0026q=85\u0026s=d4c5aa00a59e098637b29b5642ad268c 2500w`})})]}),_jsxs(Step,{title:`Add Authentication Headers`,children:[_jsx(_components.p,{children:`Add the required authentication headers for your AI provider:`}),_jsx(_components.p,{children:`For OpenAI:`}),_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Authorization: Bearer sk-proj-YOUR_API_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(_components.p,{children:`For Anthropic:`}),_jsx(CodeBlock,{numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`x-api-key: sk-ant-YOUR_API_KEY`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`anthropic-version: 2023-06-01`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Content-Type: application/json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),_jsx(Step,{title:`Save Integration`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Create`}),` to save the integration.`]})})]}),`\n`,_jsx(Callout,{type:`info`,children:_jsxs(_components.p,{children:[`Most AI providers require a proxy service to transform the payload format. See the `,_jsx(_components.a,{href:`/guides/webhook-integration-guide`,children:`Webhook Integration Guide`}),` for detailed setup instructions.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`step-4-configure-bot-behavior`,children:`Step 4: Configure Bot Behavior`}),`\n`,_jsx(_components.p,{children:`Customize how your bot behaves in conversations.`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Go to Behavior Settings`,children:_jsxs(_components.p,{children:[`Click the `,_jsx(_components.strong,{children:`Behavior`}),` tab on your bot’s page.`]})}),_jsxs(Step,{title:`Enable Typing Indicators`,children:[_jsxs(_components.p,{children:[`Turn on `,_jsx(_components.strong,{children:`Typing Indicators`}),` to show a typing animation while the bot processes responses.`]}),_jsx(_components.p,{children:`This makes conversations feel more natural and gives users feedback that their message is being handled.`})]}),_jsxs(Step,{title:`Set Reply Detection`,children:[_jsx(_components.p,{children:`For group chats, configure when the bot should respond:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`All Messages`}),`: Respond to every message (good for support channels)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Mentions Only`}),`: Only respond when @mentioned`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Thread Replies`}),`: Only respond in threads where bot is active`]}),`\n`]})]}),_jsxs(Step,{title:`Set Context Window`,children:[_jsxs(_components.p,{children:[`Set the conversation context window to `,_jsx(_components.strong,{children:`10-15 messages`}),`.`]}),_jsx(_components.p,{children:`This determines how much conversation history is sent to your AI integration.`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`step-5-test-your-bot`,children:`Step 5: Test Your Bot`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open Telegram`,children:_jsx(_components.p,{children:`Find your bot in Telegram by searching for its username.`})}),_jsx(Step,{title:`Start a Conversation`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Start`}),` or send `,_jsx(_components.code,{children:`/start`}),` to begin.`]})}),_jsxs(Step,{title:`Send a Test Message`,children:[_jsx(_components.p,{children:`Try asking a common support question:`}),_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`What are your business hours?`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),_jsxs(Step,{title:`Verify Response`,children:[_jsx(_components.p,{children:`The bot should:`}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Show a typing indicator`}),`\n`,_jsx(_components.li,{children:`Process your message through the AI integration`}),`\n`,_jsx(_components.li,{children:`Reply with an intelligent response`}),`\n`]})]})]}),`\n`,_jsx(Callout,{type:`success`,children:_jsx(_components.p,{children:`Congratulations! Your support bot is now live and responding to messages.`})}),`\n`,_jsx(Heading,{level:`2`,id:`testing-your-bot`,children:`Testing Your Bot`}),`\n`,_jsx(Heading,{level:`3`,id:`example-conversation`,children:`Example Conversation`}),`\n`,_jsx(_components.p,{children:`Here’s what a typical interaction looks like:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`14`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`User: Hi, I need help with my order`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Bot: [typing indicator appears]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Bot: Hello! I'd be happy to help you with your order.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Could you please provide your order number or the email`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`address you used when placing the order?`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`User: Order #12345`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Bot: [typing indicator appears]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Bot: Thank you! Let me look up order #12345 for you...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`what-to-test`,children:`What to Test`}),`\n`,_jsx(_components.p,{children:`Test these common scenarios:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Basic Questions`}),`: Ask simple questions your bot should know`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Follow-up Questions`}),`: Test if conversation context is maintained`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Group Behavior`}),`: Add bot to a group and test mention detection`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Response Time`}),`: Verify typing indicators appear and responses are timely`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Error Handling`}),`: Send unexpected input to see how the bot handles it`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`improving-your-bot`,children:`Improving Your Bot`}),`\n`,_jsx(Heading,{level:`3`,id:`write-a-better-system-prompt`,children:`Write a Better System Prompt`}),`\n`,_jsx(_components.p,{children:`The system prompt defines your bot’s personality and capabilities. Here’s a template:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`21`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`You are a helpful customer support assistant for [Your Company Name].`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Your role is to:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Answer customer questions clearly and professionally`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Provide information about products, services, and policies`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Help troubleshoot common issues`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Escalate complex problems to human agents when necessary`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Guidelines:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Always greet customers warmly`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Keep responses concise (2-3 sentences when possible)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Use bullet points for lists`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- If you don't know something, admit it honestly`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Never make up information`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Maintain a friendly, professional tone`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`When to escalate:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Requests for refunds or account changes`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Technical issues you cannot resolve`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Customer expresses frustration or requests human agent`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`add-knowledge-base-context`,children:`Add Knowledge Base Context`}),`\n`,_jsx(_components.p,{children:`To provide accurate answers, include your documentation in the AI context:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Option 1: RAG (Recommended)`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Embed your documentation in a vector database`}),`\n`,_jsx(_components.li,{children:`Search for relevant articles based on user questions`}),`\n`,_jsx(_components.li,{children:`Include relevant content in the AI prompt`}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Option 2: Static Context`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Include key information directly in the system prompt`}),`\n`,_jsx(_components.li,{children:`Best for small knowledge bases (\u003c 5 pages)`}),`\n`,_jsx(_components.li,{children:`Update prompt when documentation changes`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`monitor-conversations`,children:`Monitor Conversations`}),`\n`,_jsx(_components.p,{children:`Regularly review conversations to identify:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Questions the bot handles well`}),`\n`,_jsx(_components.li,{children:`Topics that need better answers`}),`\n`,_jsx(_components.li,{children:`Common confusion points`}),`\n`,_jsx(_components.li,{children:`Opportunities for improvement`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`api-examples`,children:`API Examples`}),`\n`,_jsx(_components.p,{children:`You can also interact with your bot programmatically via the API.`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Send a message to a user`,id:`send-a-message-to-a-user`,children:_jsxs(Tabs,{children:[_jsx(Tab,{title:`cURL`,id:`curl`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.chatbotplatform.io/v1/messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bot_id\": \"bot_123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"channel_type\": \"telegram\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"chat_id\": \"987654321\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"message\": \"Hello from the API!\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),_jsx(Tab,{title:`JavaScript`,id:`javascript`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.chatbotplatform.io/v1/messages'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` bot_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'bot_123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` channel_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'telegram'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chat_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '987654321'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` message:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Hello from the API!'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Message sent:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})}),_jsx(Tab,{title:`PHP`,id:`php`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`use`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` Illuminate\\\\Support\\\\Facades\\\\`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Http`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`withToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.chatbotplatform.io/v1/messages'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'bot_id'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'bot_123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'channel_type'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'telegram'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'chat_id'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '987654321'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'message'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Hello from the API!'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})}),_jsx(Tab,{title:`Python`,id:`python`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.chatbotplatform.io/v1/messages'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'bot_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'bot_123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'channel_type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'telegram'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'chat_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'987654321'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'message'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Hello from the API!'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Message sent:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, data)`})]}),`\n`]})})})})]})}),_jsx(Accordion,{title:`Get conversation history`,id:`get-conversation-history`,children:_jsxs(Tabs,{children:[_jsx(Tab,{title:`cURL`,id:`curl-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.chatbotplatform.io/v1/conversations/conv_123/messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`})]}),`\n`]})})})}),_jsx(Tab,{title:`JavaScript`,id:`javascript-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.chatbotplatform.io/v1/conversations/conv_123/messages'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Bearer YOUR_API_KEY'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})}),_jsx(Tab,{title:`PHP`,id:`php-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Http`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`withToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.chatbotplatform.io/v1/conversations/conv_123/messages'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})}),_jsx(Tab,{title:`Python`,id:`python-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.get(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.chatbotplatform.io/v1/conversations/conv_123/messages'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`messages `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`]})})})})]})})]}),`\n`,_jsxs(_components.p,{children:[`For complete API documentation, see the `,_jsx(_components.a,{href:`https://app.chatbotplatform.io/openapi`,children:`OpenAPI specification`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`common-issues`,children:`Common Issues`}),`\n`,_jsx(Heading,{level:`3`,id:`bot-doesn’t-respond`,children:`Bot doesn’t respond`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Possible causes:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Integration webhook URL is incorrect`}),`\n`,_jsx(_components.li,{children:`Authentication headers are missing or invalid`}),`\n`,_jsx(_components.li,{children:`Integration timeout is too short`}),`\n`,_jsx(_components.li,{children:`AI service is down or rate-limited`}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Solutions:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Test the integration using the built-in test feature`}),`\n`,_jsx(_components.li,{children:`Verify API keys are correct and have proper permissions`}),`\n`,_jsx(_components.li,{children:`Check integration logs for error messages`}),`\n`,_jsx(_components.li,{children:`Increase timeout if responses take longer than expected`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`bot-responds-to-every-message-in-group-chat`,children:`Bot responds to every message in group chat`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Cause:`}),` Reply detection is set to “All Messages”`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Solution:`}),` Change to “Mentions Only” or “Thread Replies” in Behavior settings`]}),`\n`,_jsx(Heading,{level:`3`,id:`typing-indicator-doesn’t-appear`,children:`Typing indicator doesn’t appear`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Cause:`}),` Typing indicators are disabled or channel doesn’t support them`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Solution:`}),` Enable typing indicators in Behavior settings. Note that not all channels support this feature.`]}),`\n`,_jsx(Heading,{level:`3`,id:`responses-are-slow`,children:`Responses are slow`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Possible causes:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`AI model is slow (e.g., GPT-4 vs GPT-3.5)`}),`\n`,_jsx(_components.li,{children:`Network latency between platform and your integration`}),`\n`,_jsx(_components.li,{children:`Your integration is processing additional logic`}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Solutions:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use a faster AI model`}),`\n`,_jsx(_components.li,{children:`Optimize your integration code`}),`\n`,_jsx(_components.li,{children:`Increase timeout to allow more processing time`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Add Grounded Responses`,icon:`link`,href:`/guides/grounded-support-bot`,children:_jsx(_components.p,{children:`Use Agentic Loops to ground responses in real data`})}),_jsx(Card,{title:`Deploy to More Channels`,icon:`globe`,href:`/guides/multi-channel-deployment`,children:_jsx(_components.p,{children:`Connect your bot to Slack, Discord, and more`})}),_jsx(Card,{title:`Manage Conversation Context`,icon:`messages`,href:`/guides/conversation-context`,children:_jsx(_components.p,{children:`Control how conversation history is handled`})}),_jsx(Card,{title:`Webhook Integration Deep Dive`,icon:`webhook`,href:`/guides/webhook-integration-guide`,children:_jsx(_components.p,{children:`Learn advanced integration patterns`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-documentation`,children:`Related Documentation`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/bots/behaviors/index`,children:`Bot Behaviors`}),` - Configure typing indicators and reply detection`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/bots/channels/telegram`,children:`Telegram Channel`}),` - Telegram-specific features and settings`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/bots/integrations/webhook-setup`,children:`Webhook Setup`}),` - Detailed integration configuration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://app.chatbotplatform.io/openapi`,children:`API Reference`}),` - Complete API documentation`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Building a Basic Support Bot","description":"Step-by-step guide to creating your first AI-powered customer support chatbot","href":"/guides/support-bot-basics"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What You’ll Learn","slug":"what-you’ll-learn","depth":2,"children":[]},{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Step 1: Create Your Bot","slug":"step-1-create-your-bot","depth":2,"children":[]},{"title":"Step 2: Connect to Telegram","slug":"step-2-connect-to-telegram","depth":2,"children":[]},{"title":"Step 3: Set Up AI Integration","slug":"step-3-set-up-ai-integration","depth":2,"children":[]},{"title":"Step 4: Configure Bot Behavior","slug":"step-4-configure-bot-behavior","depth":2,"children":[]},{"title":"Step 5: Test Your Bot","slug":"step-5-test-your-bot","depth":2,"children":[]},{"title":"Testing Your Bot","slug":"testing-your-bot","depth":2,"children":[{"title":"Example Conversation","slug":"example-conversation","depth":3,"children":[]},{"title":"What to Test","slug":"what-to-test","depth":3,"children":[]}]},{"title":"Improving Your Bot","slug":"improving-your-bot","depth":2,"children":[{"title":"Write a Better System Prompt","slug":"write-a-better-system-prompt","depth":3,"children":[]},{"title":"Add Knowledge Base Context","slug":"add-knowledge-base-context","depth":3,"children":[]},{"title":"Monitor Conversations","slug":"monitor-conversations","depth":3,"children":[]}]},{"title":"API Examples","slug":"api-examples","depth":2,"children":[]},{"title":"Common Issues","slug":"common-issues","depth":2,"children":[{"title":"Bot doesn’t respond","slug":"bot-doesn’t-respond","depth":3,"children":[]},{"title":"Bot responds to every message in group chat","slug":"bot-responds-to-every-message-in-group-chat","depth":3,"children":[]},{"title":"Typing indicator doesn’t appear","slug":"typing-indicator-doesn’t-appear","depth":3,"children":[]},{"title":"Responses are slow","slug":"responses-are-slow","depth":3,"children":[]}]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]},{"title":"Related Documentation","slug":"related-documentation","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"chatbotplatform","siteName":"Chatbot Platform Documentation","title":"Building a Basic Support Bot - Chatbot Platform Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T19:20:14.780Z","originalFileLocation":"guides/support-bot-basics.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Step-by-step guide to creating your first AI-powered customer support chatbot\">\u003cmeta data-mint-head name=\"application-name\" content=\"Chatbot Platform Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Building a Basic Support Bot - Chatbot Platform Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Step-by-step guide to creating your first AI-powered customer support chatbot\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Chatbot Platform Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.chatbotplatform.io/guides/support-bot-basics\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://chatbotplatform.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Building+a+Basic+Support+Bot\u0026amp;description=Step-by-step+guide+to+creating+your+first+AI-powered+customer+support+chatbot\u0026amp;theme=c1a9ad670a5314018887f4f9\u0026amp;signature=0516012ddf4f3592265d7a7ed13001c72e9ee1a80591c74165586e390538f70a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Building a Basic Support Bot - Chatbot Platform Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Step-by-step guide to creating your first AI-powered customer support chatbot\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chatbotplatform.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Building+a+Basic+Support+Bot\u0026amp;description=Step-by-step+guide+to+creating+your+first+AI-powered+customer+support+chatbot\u0026amp;theme=c1a9ad670a5314018887f4f9\u0026amp;signature=0516012ddf4f3592265d7a7ed13001c72e9ee1a80591c74165586e390538f70a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Chatbot Platform Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.chatbotplatform.io/guides/support-bot-basics\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/support-bot-basics.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.chatbotplatform.io/#organization\",\"name\":\"Chatbot Platform Documentation\",\"url\":\"https://docs.chatbotplatform.io\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.chatbotplatform.io#website\",\"name\":\"Chatbot Platform Documentation\",\"url\":\"https://docs.chatbotplatform.io\",\"publisher\":{\"@id\":\"https://docs.chatbotplatform.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.chatbotplatform.io/guides/support-bot-basics#webpage\",\"url\":\"https://docs.chatbotplatform.io/guides/support-bot-basics\",\"name\":\"Building a Basic Support Bot\",\"description\":\"Step-by-step guide to creating your first AI-powered customer support chatbot\",\"dateModified\":\"2026-10-28T19:20:14.780Z\",\"isPartOf\":{\"@id\":\"https://docs.chatbotplatform.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.chatbotplatform.io/guides/support-bot-basics#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.chatbotplatform.io/guides/support-bot-basics#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.chatbotplatform.io/guides/embedded-assistant-with-mcp\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a Basic Support Bot\",\"item\":\"https://docs.chatbotplatform.io/guides/support-bot-basics\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.chatbotplatform.io/guides/support-bot-basics#article\",\"headline\":\"Building a Basic Support Bot\",\"name\":\"Building a Basic Support Bot\",\"description\":\"Step-by-step guide to creating your first AI-powered customer support chatbot\",\"url\":\"https://docs.chatbotplatform.io/guides/support-bot-basics\",\"mainEntityOfPage\":{\"@id\":\"https://docs.chatbotplatform.io/guides/support-bot-basics#webpage\"},\"dateModified\":\"2026-10-28T19:20:14.780Z\",\"publisher\":{\"@id\":\"https://docs.chatbotplatform.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.chatbotplatform.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Chatbot Platform Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Chatbot Platform Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/support-bot-basics.md","siteName":"Chatbot Platform Documentation","nav":{"global":null,"tabs":[{"tab":"Guides","groups":[{"group":"Getting Started","pages":[{"title":"Welcome to Chatbot Platform","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Guides","pages":[{"title":"Embed an AI assistant backed by your product's MCP server","description":"An agent-executable guide: put a web chat on any product that has an MCP server, powered by an agentic loop that uses tools authorized for the signed-in user","href":"/guides/embedded-assistant-with-mcp"},{"title":"Building a Basic Support Bot","href":"/guides/support-bot-basics"},{"title":"Building a Grounded Support Bot","description":"Add agentic loops and MCP servers for responses grounded in real data","href":"/guides/grounded-support-bot"},{"title":"Building a Personal Assistant Bot","href":"/guides/personal-assistant"},{"title":"Multi-Channel Bot Deployment","href":"/guides/multi-channel-deployment"},{"title":"Webhook Integration Guide","href":"/guides/webhook-integration-guide"},{"title":"Managing Conversation Context","href":"/guides/conversation-context"}]}]},{"tab":"Bots","pages":[{"title":"Bots","href":"/bots/overview"}]},{"tab":"Agentic Loops","pages":[{"title":"Agentic Loops","href":"/agentic-loops/overview"}]},{"tab":"MCP Servers","pages":[{"title":"MCP Servers","href":"/mcp-servers/overview"}]}]},"basePath":"","title":"Building a Basic Support Bot - Chatbot Platform Documentation","deploymentId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","buildId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-CUYDhsh7.js","DynamicMarkdown-D8KwOkxZ.js","zoom-image-lightbox-lceUjs6n.js","lightbox-handle-r17bVUz3.js"]}