# Pryzr Engage > Live chat and player support for the gaming industry. One script tag puts a > chat bubble on a casino site; conversations land in a single agent inbox that > covers many casinos. Optionally identify logged-in players, and optionally let > agents read balances and approve redemptions from your platform. Base URL: https://support.pryzr.tech Full docs: https://support.pryzr.tech/docs Connector contract (OpenAPI 3.1): https://support.pryzr.tech/casino-connector.openapi.yaml ## Minimum integration Put this before on every page. Replace the slug. That is complete and working for anonymous visitors. Appearance, wording, policies and the AI assistant are configured in the owner portal, not in code. ## Identifying a logged-in player (optional) Your server mints a short-lived token and passes it to the tag as data-player-token, or via window.PryzrEngage.identify(token) in a SPA. POST https://support.pryzr.tech/api/integration/token authorization: Bearer content-type: application/json {"id":"player-123","name":"Maya","email":"maya@example.com","ttl":3600} -> {"token":".","expires_at":"...","expires_in":3600} This endpoint sends no CORS headers: it is server to server only. Alternatively sign it yourself with the casino's signing secret: payload = base64url(JSON with sub, exp, optional name and email) signature = base64url(HMAC_SHA256(payload, signing_secret)) token = payload + "." + signature Sign the base64url TEXT of the payload, not the raw JSON. That is the most common integration mistake. IMPORTANT: an invalid player token does not raise an error. The chat falls back to an anonymous guest so a broken token never stops a player getting help. If every player shows up as a guest, the token is wrong -- check it in the portal's Install tab. ## Endpoints we expose POST /api/integration/token Mint a player token. Auth: Bearer integration key. 400 bad input, 401 bad key. GET /api/widget/config Launcher appearance. Query: brand=. 403 site not allowed, 404 unknown casino. POST /api/widget/session Start or resume a chat. Returns last 200 messages. Body, camelCase: {brand, token, playerToken, pageUrl} 403, 404, 429. WATCH THE SPELLING: the JSON field is playerToken, not player_token. The script tag attribute IS data-player-token, so the two differ. A field we do not recognise is simply absent, and a missing player token means a guest -- silently, with a 200. GET /api/widget/messages Poll. Header: x-visitor-token. Query: after=. POST /api/widget/messages Send. Header: x-visitor-token. Body: {body}. Max 4000 chars. 401, 429. Errors are JSON: {"error": "human readable message"}. ## Endpoints you may expose (optional) Only the first is required; skip the rest and those panels stay empty. GET /players/{id} profile, KYC, balances GET /players/{id}/redemptions newest first POST /players/{id}/redemptions/{rid}/approve must be idempotent, 409 if not pending GET /players/{id}/transactions GET /players/{id}/games v2, also optional. Each unlocks a button in the agent's player panel, shown only to agents who hold the right for that casino (can_manage_players for notes/block/break/email, can_adjust_balances for adjust). Writes carry idempotency-key: crm-- and a JSON body whose "by" is the agent's display name. Log every write as engage:. GET /players/search?q= {items:[{id,name,email,status}]} max 20 GET /players/{id}/notes {items:[{id,text,by,created_at}]} newest first POST /players/{id}/notes {text, by} add a staff note POST /players/{id}/block {reason, by} no play, buy or redeem POST /players/{id}/unblock {by} POST /players/{id}/break {days, by} responsible-play break, 1-90 days POST /players/{id}/adjust {currency:"GC"|"SC", amount, reason, by} signed coins; Engage caps at +/-10,000 SC or +/-10,000,000 GC per call POST /players/{id}/email {template:"verify"|"w9"|"reset", by} GET /players/{id}/timeline?limit= {items:[{at,kind,summary}]} newest first GET /players/{id} may also return (all optional): phone, vip_level, flags{blocked, block_reason, self_excluded_until, on_break_until, kyc_note}, limits{daily_usd, weekly_usd, monthly_usd}, tax{w9_status: none|requested|on_file, ytd_prizes_usd}, notes_count, tags[]. A v1 casino that sends none keeps working. Authenticated with the API key you paste in the portal (or send through the provisioning API), sent as authorization: Bearer . {id} is your own player id, the same value used as "sub" in the chat token. ## Browser API window.PryzrEngage.identify(token) // or identify(null) to sign out window.PryzrEngage.open() window.PryzrEngage.close() window.CRMWidget is a kept alias. Calls before load are queued. postMessage events on the host page: crm-widget:ready, :opened, :closed, :unread (with count), :state (with hasChat). ## Limits New chats: 12 per casino per hour and 30 overall per hour, per visitor address, guests only. Identified players are exempt. Messages: 20 per minute per conversation. Max 4000 characters. Token TTL: 60s to 86400s, default 3600, clamped. Allowed websites: 20 per casino. Subdomains of a listed host are included. An EMPTY allowed list means the widget works on ANY site, not none. ## Multi-tenant notes Everything is scoped per casino: slug, theme, policies, integration key, signing secret, allowed domains, agent access. Player ids are keyed per casino, so the same id at two casinos is two unrelated contacts. Per-casino credentials (integration key, signing secret, connector key) are per tenant, exactly like a per-tenant Clerk or Finix configuration. A launcher that runs many casinos can ALSO hold one platform key for the provisioning API below, which creates and updates casinos unattended. ## Adding Engage to a launcher Three fields on a per-tenant provider card: Casino slug text, public, ^[a-z0-9-]{2,40}$ served to the storefront, like a publishable key Integration key secret, write-only, starts crm__ server side only; store write-only with a Replace button. We keep only its hash, so it cannot be read back from us. Signing secret secret, write-only, optional, 64 hex chars only if you mint tokens yourself; most launchers omit it Both come from the owner portal: create the casino, then Install tab, then create an integration key. Shown once. Storefront renders: Server calls: POST https://support.pryzr.tech/api/integration/token authorization: Bearer {integration_key} {"id":"","name":"...","email":"..."} Auth is a static bearer token. No OAuth, no refresh. MUST NOT SKIP: a new casino starts with an EMPTY allowed-websites list, and empty means the widget works on ANY site, not none. Set the tenant's storefront domain in the portal right after creating the casino. Staging: there is no sandbox/live switch. Make a second casino such as lucky-reef-staging with its own key and domains. Every casino also gets https://support.pryzr.tech/try/, a hosted page running its real widget. Webhooks: one HTTPS URL per tenant with HTTP Basic auth, set in the owner portal. Same shape as your other providers. See the section below. ## Provisioning API (for launchers) One platform-level key (ask us; server side only), sent as authorization: Bearer . No CORS: server to server only. POST /api/platform/brands create or update a casino; idempotent on slug body: {slug (required), name (required on create), color, logo_url, domains:[hostnames], connector:{base_url, api_key}, webhook:{url, username, password}, policies:{terms, rules, privacy, responsible_play}, plain text/Markdown, <= 60 KB each support_email, owner_email} Later calls are PARTIAL updates: only keys present in the body change. {slug, name, policies} alone refreshes the AI policies. null clears connector, webhook or logo_url. 200 {brand_id, slug, widget_signing_secret, script_url, portal_url, inbox_url} widget_signing_secret is the same on every call and is never rotated here. 400 validation, 401 bad key, 409 slug belongs to a casino not created by the platform. owner_email: invited if new, made owner (portal + inbox + uncapped approvals + all rights). POST /api/platform/brands/{slug}/agents invite or update an agent; idempotent body: {email (required), name, can_approve_redemptions, can_manage_players, can_adjust_balances, approval_limit (USD, optional, default 300)} New logins get a Supabase invite email and choose a password. 200 {ok, invited, user_id, display_name, can_*, approval_limit} Rights by role: owner/manager -> all three; support -> manage players + approve; viewer -> do not call (no invite). DELETE /api/platform/brands/{slug}/agents body {email} Takes that casino away from the person. 200 {ok, revoked}. Both agent endpoints: 404 unknown slug, 409 casino not created by the platform. Every call is written to the Engage audit log as actor "platform". ## Webhooks We POST to one HTTPS address per casino when something happens. Configured by the owner in the portal (Webhooks tab), not in code. Typical shape, matching how launchers already receive other providers: POST https://api.yourplatform.com/api/v1/pryzr/webhooks/ authorization: Basic (optional, recommended) content-type: application/json user-agent: PryzrEngage-Webhook/1 Events: chat.started A visitor opens a new conversation. extra: identified (bool) chat.waiting A player's message is unanswered past the casino's threshold (default 3 min) AND no agent has the inbox open. This is the one to wire to alerting. extra: waiting_since, waiting_minutes chat.resolved An agent closes the conversation. extra: messages (count), opened_at redemption.approved An agent approves a redemption. Successful ones only. extra: redemption_id, amount, currency, approved_by webhook.test The owner pressed "Send a test event" in the portal. extra: message Every body has event, occurred_at (UTC ISO 8601), casino_slug and conversation_id. player_id is your own id, the same value signed as "sub", and is null for a guest. {"event":"chat.waiting","occurred_at":"2026-01-31T14:02:11Z", "casino_slug":"lucky-reef","conversation_id":"3f7c...", "player_id":"player-123","waiting_since":"2026-01-31T13:58:40Z", "waiting_minutes":3} IMPORTANT: a webhook body NEVER contains message text. Ids, counts and times only. Read the conversation in the inbox if you need what was said. Answer with any 2xx; the body is ignored. Anything else, including a timeout after 8s, is a failure and is retried at 1, 2, 4, 8 and 16 minutes, six attempts total, then dropped. Delivery is AT LEAST ONCE and NOT ORDERED. Make the handler idempotent and order by occurred_at, never by arrival. Each real occurrence is queued once, so a conversation never yields two chat.started rows. URL rules: https only, public hostname. Loopback, .local and private ranges (10.x, 192.168.x, 172.16-31.x, 169.254.x) are rejected on save, as is any URL pointing back at support.pryzr.tech. ## Testing https://support.pryzr.tech/try/ is a pretend casino page running that casino's real widget, with guest and signed-in player controls and a live event log. The portal's Install tab has a token checker and a connector check.