Skip to main content
This guide walks through the complete lifecycle of setting up a customer org — from creation to a fully trained AI agent handling live conversations.

Overview


Step 1: Create the org

Use your Partner API key to create an org for your customer.
Save the id and widget_token from the response — you’ll need both.
The ai_instructions field is the AI profile — the system prompt that defines the agent’s personality, knowledge scope, and behavior. Write it as if you’re briefing a new support agent — who they work for, what they help with, and how they should behave.
See the full request/response schema in the Create Org API Reference.

Step 2: Create an org API key

The Partner API creates the org, but to train the AI and manage the org, you need an org-level API key. Create one with your partner key:
Save the api_key from the response — this is the org-level API key you’ll use for all subsequent calls.
The org API key is different from your partner API key. The partner key manages orgs. The org key manages a specific org’s data (training, crawling, contacts, etc). The key is only returned once — store it securely.
All subsequent API calls use the org key:
See the full request/response schema in the Create Org API Key Reference.

Step 3: Crawl the customer’s website

The fastest way to train the AI is to crawl the customer’s website. The crawler indexes every page into the knowledge base automatically.
You can check crawl progress at any time:
Or sync a single page without a full crawl:
See all available parameters and endpoints in the Crawl API Reference.

Step 4: Add custom training

Website content gives the AI factual knowledge. Training scenarios teach it how to behave — tone, policies, edge cases, and workflows.
Use "type": "BEHAVIORAL" for always-active instructions (tone, guardrails) that apply to every conversation:
See all training types, directory management, and search in the Training API Reference.

Step 5: Grant dashboard access

Your customers need dashboard access to manage their inbox, handle human handoffs, and review conversations. Use Login Links to give them frictionless access — no emails, no forms, no org picker.
The response contains a short-lived URL:
Redirect the user’s browser to the returned url. If no account exists, one is created automatically. The user lands directly in the dashboard with your partner branding (logo, app name) — not the OpenCX defaults.
Login links expire after 15 minutes and are single-use. Generate a new link each time a user needs to access the dashboard from your platform.
Login links are ideal for embedding a “Manage support” button in your own platform. See the Login Links API Reference for full details.

Step 6: Embed the widget

Use the widget_token from step 1 to embed the chat widget on your customer’s site.
Or with React:
If your customers have logged-in users, you can authenticate them so the AI has context:
See the full widget setup and authentication options in the Widget docs and Widget Authentication API.

Putting it all together

Here’s a complete example that provisions a customer from scratch:

What’s next

After provisioning, the org is fully operational. The AI will:
  1. Answer questions using crawled website content and training scenarios
  2. Hand off to humans when it can’t resolve an issue (configurable via Handoff settings)
  3. Re-crawl the website on the configured interval to stay up to date
For advanced configuration:

Autopilot Settings

Configure which channels the AI operates on and its behavior mode.

Office Hours

Set business hours — the AI behaves differently outside office hours.

Tags

Auto-tag conversations for categorization and reporting.

Contacts

Manage customer contacts and their metadata.