Skip to main content
1

Get your API key

Partner API keys are provisioned by the OpenCX team during onboarding. You’ll receive a JWT token that authenticates all Partner API requests.
Partner API keys are separate from org-level API keys. They manage orgs (create, list, generate API keys, invite users) — they cannot access chat sessions, contacts, or other org data.
2

Create an org

Call the Partner API to create an org for one of your customers:
curl -X POST https://api.open.cx/partner/v1/orgs \
  -H "Authorization: Bearer YOUR_PARTNER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sunset Kayak Tours",
    "external_id": "customer-12345",
    "website": "https://sunsetkayak.com",
    "language": "en",
    "ai_instructions": "You are the support agent for Sunset Kayak Tours. Help customers with booking questions, availability, and tour information. Be friendly and concise."
  }'
The response contains everything you need:
{
  "id": "a1b2c3d4-...",
  "name": "Sunset Kayak Tours",
  "widget_token": "f8e7d6c5b4a3...",
  "external_id": "customer-12345"
}
3

Embed the widget

Use the token from the response to embed the chat widget on the customer’s site:
<script
  src="https://cloud.opencopilot.so/widget.js"
  data-token="f8e7d6c5b4a3..."
></script>
Or with React:
import { Widget } from '@opencx/widget-react';

function App() {
  return <Widget token="f8e7d6c5b4a3..." />;
}
4

Verify

Open the customer’s site. The chat widget should appear and the AI agent will respond using the instructions you provided.For a production-ready setup, follow the Integration Guide to train the AI with real content.

Next steps

Integration Guide

Full end-to-end setup: crawl websites, train the AI, authenticate users.

API Reference

Full endpoint documentation and error codes.