Organization docs

New to this? Read the overview and FAQ.

Overview

An organization manages clients. Each client gets its own isolated WhatsApp Studio that you can embed in your website. You manage clients and keys from the Organization tab, or programmatically with the Organization API.

Concepts

  • Client: one of your customers. It has a unique, permanent ID (clt_…) and an optional email and reference ID so you can tell who is who.
  • Client key (cv_client_…): the one secret a client signs in with. Every client has exactly one, created with the client. You can read it again, generate a new one, or set your own custom value, but you can't delete it. Changing it signs that client out.
  • Organization API key (cv_org_…): used by your server to call the Organization API. It carries scopes that limit what it can do. Only a hash is stored.
  • Embed link: one permanent link for your organization, the same for every client.
  • Credits: for each client you choose who pays for its AI replies. Either the client buys its own credits from ChatVerse, or your organization pays and the usage is deducted from your credit balance. You choose when creating the client and can change it any time. If your balance runs out, the bot of an organization-paid client pauses.

Embed WhatsApp Studio

  1. Create a client in the Clients tab.
  2. Open the client and copy its access key. Give it to that client.
  3. Open the Embed link card in the Organization tab and copy the link.
  4. Put it on your site:
<iframe
  src="http://127.0.0.1:4178/embed/whatsapp/YOUR_EMBED_KEY"
  style="width:100%;height:100vh;border:0"
  allow="clipboard-write"
></iframe>

The page shows your organization's name and asks for the client key (labelled "Access key"). After signing in, the client sees only its own WhatsApp Studio: its own WhatsApp connection, templates, contacts, campaigns and chats. Clients buy their own credits from ChatVerse.

Automatic sign-in (no key typing). Your server calls POST https://api.chatverse.io/embed/launch and gets a launch_path. Authenticate with your organization API key (cv_org_…, needs the manage_credentials scope) and send which client to open as JSON: {"client_id": "clt_…"} or {"external_id": "your-user-id"}. A single client's key (cv_client_…) as the bearer token also works, with no body. Your page passes it to the loader (ChatVerse.mount in /embed.js), which opens the dashboard and fetches a fresh path by itself when a session ends. The launch path works once and expires after about 60 seconds, and the key never appears in the page. Call it from your server only; requests with a browser Origin are refused. The Embed link card in the dashboard has ready-made code.

  • A session lasts up to 12 hours and renews itself while the page is open. When it ends, the sign-in page appears again.
  • Changing a client's key signs that client out immediately.
  • Generating a new embed link makes the old link stop working and signs out every client. Update the link on your site afterwards.

Appearance

Make the embedded dashboard fit your CRM. In the Appearance tab you can set the accent color, background, card color, font (from a list), corner style, and light or dark. A live preview shows the result before you save.

Match my page reads your page's look automatically. Because the dashboard is a separate site inside your page, it cannot see your page's styles itself. The loader script (/embed.js) runs on your page, so it can: it detects light/dark, the background color and the font (when it is one of the available fonts), and passes them in. It also follows your page when it switches theme. It cannot read arbitrary brand colors, so the accent comes from your saved setting, or from your page's--primary (or --accent, --brand) CSS variable, or from ChatVerse.mount(el, { accent: "#7c3aed" }). Match my page only works with the loader, not with a plain iframe.

The same settings can be read and changed with GET and PUT /v1/organization/embed-theme. The key must have the manage_embed_theme scope.

Organization API: authentication

Create a key in the API keys tab and choose its scopes. Send it from your server:

Authorization: Bearer cv_org_xxxxxxxx

Never put the key in browser code. Requests that carry a browser Origin header are refused. The key is shown once when created.

Organization API: endpoints

Base URL: https://api.chatverse.io. Clients themselves are created in the dashboard.

MethodPathScope
GET/v1/organization/clientsList clients. Query: status, limit, cursor.list_clients
GET/v1/organization/clients/{client_id}One client, with the prefix of its access key.read_clients
GET/v1/organization/clients/{client_id}/keyRead the client's current access key.manage_credentials
PUT/v1/organization/clients/{client_id}/keyChange the key. Send {"key": "cv_client_…"} for a custom value, or nothing to generate one. The client is signed out.manage_credentials
POST/v1/organization/clients/{client_id}/revokeRevoke a client.revoke_client
POST/v1/organization/clients/{client_id}/reactivateReactivate a client.revoke_client
PUT/v1/organization/clients/{client_id}/credit-modeChoose who pays for AI credits: {"credit_mode": "client"} or {"credit_mode": "organization"}.manage_client_billing
GET/v1/organization/embed-themeRead the embed appearance.manage_embed_theme
PUT/v1/organization/embed-themeSet the appearance with {"theme": {…}}, or {"theme": null} to reset it.manage_embed_theme
GET/v1/organization/clients/{client_id}/usageUsage for a client.read_usage

Example: set a custom key for a client. A custom key starts with cv_client_, then 32 to 100 letters, numbers, - or _, with a good mix of characters.

curl -X PUT https://api.chatverse.io/v1/organization/clients/clt_XXXX/key \
  -H "Authorization: Bearer $CHATVERSE_ORG_KEY" \
  -H "Content-Type: application/json" \
  -d '{"key": "cv_client_my-own-long-secret-value"}'

Client API

A client can call these with its own client key as the bearer token (from its server).

  • GET /v1/client/me the client's profile and allowed domains.
  • GET /v1/client/credentials its access key (prefix only).
  • POST /v1/client/domains with {"domain": "example.com"}, and DELETE /v1/client/domains/{domain}.

Billing and credits

Every client is a paid plan, billed monthly or yearly (shown in the Clients tab, currently 299 INR per client per month; USD and EUR are available at checkout). Pay for one client, several, or all at once, or pay in advance for clients you will add later.

When a paid client's month ends, its dashboard pauses (CLIENT_PLAN_EXPIRED) until you renew it. Nothing is deleted.

Credit payer is set per client. client: the client buys its own credits from ChatVerse. organization: usage is taken from your balance. Credits used depend on the AI model and the amount processed.

Security

  • Clients can turn on developer mode in their own dashboard and get one API key for their own WhatsApp account. They cannot create organizations or partner sub-accounts. The key stops working when the client's month ends or the client is suspended.
  • Launch links work once and expire in about a minute.
  • Sessions last 15 minutes, renew automatically up to 12 hours, and are tied to the link they were opened from.
  • Changing a client's key or regenerating the embed link ends existing sessions.
  • Access keys are encrypted at rest. Organization API keys are shown once.
  • An embedded session can only reach WhatsApp Studio features.

Errors and limits

Errors look like {"success": false, "message": "...", "error_type": "..."}.

  • UNAUTHORIZED (401): missing, invalid, or deleted key.
  • INSUFFICIENT_SCOPE (403): the key lacks the scope the endpoint needs.
  • BROWSER_NOT_ALLOWED (403): the request came from a browser.
  • CLIENT_NOT_FOUND (404): no such client in your organization.
  • CLIENT_PLAN_EXPIRED (402): this client's paid period has ended; renew it in the Clients tab.
  • RATE_LIMITED (429): organization keys allow 300 requests a minute, and 30 a minute for credential changes.