Quick Start
Integrate T-Chat in five steps. All host calls use your tenant API key (tes_…) on the server only — never in the browser.
1. Get an API key
In the dashboard, open API keys for your tenant and create a key with read, write, and optionally system:write.
2. Provision a user and mint a JWT
curl -X POST "$API_URL/v1/users" \ -H "Authorization: Bearer $TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"externalId":"user-42","displayName":"Ada"}'
curl -X POST "$API_URL/v1/token" \ -H "Authorization: Bearer $TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"externalUserId":"user-42"}'Save accessToken, and decode the JWT for sub (userId) and app_metadata.tenant_id (tenantId). Tokens expire in 6 hours — refresh from your server before expiry when you add a refresh flow.
3. Create a conversation
curl -X POST "$API_URL/v1/conversations" \ -H "Authorization: Bearer $TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"memberExternalIds":["user-42"],"name":"Support"}'4. Embed the React SDK
pnpm add @tesark/chat-reactimport { ChatProvider, ChatPanel } from "@tesark/chat-react";import "@tesark/chat-react/styles";
<ChatProvider accessToken={accessToken} userId={userId} tenantId={tenantId} apiUrl={API_URL}> <ChatPanel /></ChatProvider>For read-only operator/review embeds, use OperatorChatPanel instead — see Operator view.
5. Send a message
The SDK sends via POST /v1/messages with the user JWT (moderation runs server-side). For server-originated announcements, use POST /v1/system-messages with the API key.
Next: HTTP API reference · React SDK · Operator view · Integration guide