Goldilocks Docs
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

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' });

Widget API reference →

REST API

Server-side integration for:

  • Creating content programmatically
  • Fetching analytics
  • Managing configurations
  • Custom applications

API reference →

Webhooks

Receive real-time notifications:

  • New conversations
  • Escalations
  • Workflow triggers
  • Custom events

Webhook setup →

Quick Start

1. Get Your API Key

  1. Go to Settings > Security
  2. 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

TopicDescription
Widget IntegrationBasic and advanced widget setup
Widget OptionsConfiguration and JavaScript API
Contact TrackingIdentify contacts for personalization
API ReferenceREST API endpoints
WebhooksReal-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:

  1. Go to Settings > Security
  2. Add allowed domains
  3. Widget only loads on listed domains

Support

Developer Support

For integration help:

Bug Reports

Report issues:

  • Include reproduction steps
  • Note browser/environment
  • Attach console errors if any