Developers
Developer Guide
Technical documentation for integrating Goldilocks
Welcome to the Goldilocks Developer Guide. This section covers technical integration, APIs, and advanced customization options.
Who This Is For
This documentation is for:
- Web developers integrating the widget
- Backend developers using our API
- DevOps deploying and monitoring
- Technical admins configuring advanced features
Integration Options
Widget (Recommended)
The simplest integration—add our JavaScript widget to your website:
<script
src="https://widget.goldilocks.chat/embed.js"
data-api-key="your-api-key"
async
></script>Full widget integration guide →
JavaScript API
Control the widget programmatically:
// Open widget
Goldilocks.open();
// Send message
Goldilocks.sendMessage('Hello');
// Set customer context
Goldilocks.setContext({ page: 'checkout' });REST API
Server-side integration for:
- Creating content programmatically
- Fetching analytics
- Managing configurations
- Custom applications
Webhooks
Receive real-time notifications:
- New conversations
- Escalations
- Workflow triggers
- Custom events
Quick Start
1. Get Your API Key
- Go to Settings > Security
- Copy your API key
2. Add the Widget
Add to your HTML before </body>:
<script
src="https://widget.goldilocks.chat/embed.js"
data-api-key="YOUR_API_KEY"
async
></script>3. Test
Visit your site and click the chat bubble.
Documentation
| Topic | Description |
|---|---|
| Widget Integration | Basic and advanced widget setup |
| Widget Options | Configuration and JavaScript API |
| Contact Tracking | Identify contacts for personalization |
| API Reference | REST API endpoints |
| Webhooks | Real-time event notifications |
Security
API Keys
Your API key is designed for client-side use:
- Domain restricted
- Limited to widget operations
- Safe to include in frontend code
For server-side operations, use server API keys (available on Pro+ plans).
Domain Restrictions
Lock your widget to specific domains:
- Go to Settings > Security
- Add allowed domains
- Widget only loads on listed domains
Support
Developer Support
For integration help:
- Email: developers@goldilocks.chat
- Documentation search
- In-app support chat
Bug Reports
Report issues:
- Include reproduction steps
- Note browser/environment
- Attach console errors if any