Integration options
- JavaScript SDK
- REST API
- Webhooks
- Integrations
Embed your chatbot on any website with a single Embedded widget — renders the full chat interface inside a container you define:Features:
<script> tag. The widget loads asynchronously and supports two modes.Floating widget — a chat bubble fixed to the bottom-right corner of the page:- Single script tag installation
- Floating bubble or embedded container mode
- Programmatic control via the
$cgptSDK - Mobile-responsive design with shadow DOM isolation
- Commands buffered and replayed before widget loads
Getting started
Choose your integration method
Select the approach that best fits your use case: SDK for websites, API for custom apps, webhooks for real-time events, or integrations for no-code solutions.
Get your API key
Find your API key in your account settings. You’ll need this for API and webhook authentication.
Test in development
Build and test your integration in a development environment before deploying to production.
Common use cases
Website chatbot
Use the JavaScript SDK to add a chatbot to your website:Custom application
Use the REST API to integrate chatbot functionality into your app:Real-time notifications
Use webhooks to receive instant notifications:No-code automation
Use Zapier to connect ContextGPT with other tools:- New lead captured → Add to HubSpot
- Conversation escalated → Create Zendesk ticket
- Message sent → Log to Google Sheets
Authentication
API key
Your API key authenticates requests to the ContextGPT API. Finding your API key:- Go to your account settings
- Navigate to API Keys
- Copy your API key
- Never expose your API key in client-side code
- Store it securely in environment variables
- Rotate it regularly
- Use different keys for development and production
Webhook tokens
Webhook tokens verify that webhook requests come from ContextGPT. Setting webhook tokens:- Go to Settings > Webhooks
- Enter a secure token for each webhook type
- Save your configuration
Rate limits
API requests are rate-limited to ensure fair usage:- Free plan: 100 requests/hour
- Starter plan: 1,000 requests/hour
- Pro plan: 10,000 requests/hour
- Enterprise plan: Custom limits
Best practices
Error handling
Always implement proper error handling:Retry logic
Implement exponential backoff for failed requests:Caching
Cache API responses when appropriate:Logging
Log API interactions for debugging:Support
Need help with your integration?- Documentation: Browse our comprehensive guides
- API reference: Detailed endpoint documentation
- Email support: support@ContextGPT.in
- Community: Join our Slack community
Next steps
JavaScript SDK
Embed your chatbot on websites
REST API
Build custom integrations
Webhooks
Receive real-time notifications
Integrations
Connect with popular platforms