Skip to content

Player sessions

Your platform authenticates the player and completes its registration, CPF validation, KYC and eligibility checks before requesting a sportsbook session. Your server then identifies that existing player to OrbiSportbook with externalPlayerId; there is no separate registration or player login inside the iframe.

The endpoint finds or creates an internal sportsbook record linked to that id and returns a single-use launch token. Creating this record is not player onboarding or identity verification by OrbiSportbook.

Endpoint, server to server
POST /api/v1/integration/sessions
Launch token
single use, 120 s
Session
12 h absolute, idle timeout
POST /api/v1/integration/sessions HTTP/1.1
Host: api.orbisportbook.com
Content-Type: application/json
X-Tenant-ID: demo-embed
X-API-Key: <your integration API key>
{"externalPlayerId": "player-42", "displayName": "Maria", "currency": "USD", "path": "/live", "locale": "pt-BR"}
Field Type
externalPlayerId string required Your stable player id, at most 128 characters. The same id within a tenant is always the same player; it is the playerId of every wallet call.
displayName string optional Shown in the sportsbook, at most 64 characters. Updated when it changes. Default Player.
currency string optional The session’s wallet currency, a registry code enabled for the tenant (any case). Default: the tenant’s default currency. See session currency.
displayCurrency object optional {"code": "BRL", "rate": 5.4231}: show amounts in the iframe converted into code at rate, the units of code per 1 unit of currency. Presentation only: the session currency, bets, wallet calls and events do not change. code is any registry code (it does not have to be enabled for the tenant); rate is a JSON number from 1e-9 to 1e9 with at most 12 significant digits. code equal to currency is only accepted with rate: 1. null or absent: no conversion. It reaches the iframe through the launch token, never the URL. See display currency.
overrides object optional Brand customizations for this session over the back-office configuration: theme, colorScheme, content sections (including catalog curation and languages) and the display currency policy. Validated with the back office’s rules, kept on the session and delivered by the launch token, never the URL. See launch overrides.
cpf string deprecated Accepted and ignored for compatibility. Do not send CPF; it is neither validated nor stored.
overridesPolicy string optional strict (default): an invalid override refuses the session. best_effort: an invalid theme or content section is left out and reported in overridesRejected; the display currency policy, the colour scheme and the shape of the object stay strict. See when an override is invalid.
path string optional Deep link put in launchUrl: /, /live, /live/{sportId}, /sport/{sportId}, /competition/{id}, /event/{eventId}, /my-bets, /share/{code} (shared bets).
locale string optional en, pt-BR or es (case-insensitive; pt-br is pt-BR), put in launchUrl. It must be one of the tenant’s enabled languages (all three unless the tenant settings restrict them). Default: the tenant locale. Brand-made languages are not accepted here.
affiliateId string optional Your affiliate id of the player (a btag or affiliate code), 1–64 letters, digits or _ . : @ -. Stored on the player and carried by the bets they share, for your affiliate reports. Absent keeps the stored value; "" clears it.

Unknown fields are refused (400 validation), so typos do not pass silently.

200 OK:

{
"launchToken": "lt_NIpjVSCtwQlG0iLUbF9T7WeY84YSVs3pVQeLxbbH1O0",
"launchExpiresAt": "2026-10-16T03:01:22.081091Z",
"launchUrl": "https://api.orbisportbook.com/?tenant=demo-embed&launch=lt_NIpjVSCtwQlG0iLUbF9T7WeY84YSVs3pVQeLxbbH1O0&path=%2Flive&locale=pt-BR&currency=USD",
"currency": "USD",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
"player": {
"id": "pl_bd387263c326f44e90808bde",
"tenantId": "demo-embed",
"externalId": "player-42",
"status": "active",
"displayName": "Maria",
"currency": "USD",
"kycStatus": "verified",
"createdAt": "2026-10-16T02:43:38.465403Z"
}
}
Field
launchToken Give this to the page: pass it to the embed SDK (launchToken option or setLaunchToken()). Single use, expires at launchExpiresAt.
launchUrl The same token as a ready-made iframe URL, for integrations without the SDK. It carries the session’s currency.
currency The session’s wallet currency.
displayCurrency Only when you sent one: the validated value, with rate in canonical form (5.42310 comes back as 5.4231).
overrides Only when you sent them: the validated, canonical value (the theme merged over the brand’s).
overridesPolicy, overridesRejected Only with overridesPolicy: "best_effort": the policy, and what it left out as [{ section, field, reason, message }] (theme, content or content.<section>). Absent when nothing was left out.
themeVersion The tenant’s published theme version (0 while none is recorded).
themeRef The reference of the theme this session shows: the published theme, or the published theme merged with the session’s overrides.theme. It is the ETag of GET /aggregator/clients/{id}/theme without its quotes, so a session can be matched to a published theme (and a changed ref tells you the player’s theme changed).
themeOverridden true when themeRef is that merged theme.
token The session token itself. Keep it on your server (or ignore it): never put it in a URL or a page. It stays in the response for backward compatibility.
player Internal sportsbook record linked to your player (abridged above). player.currency is the player’s home currency (the first currency the player was created with), not necessarily the session’s. For players created through this integration, kycStatus: verified records delegation to the operator. It is not a KYC result, document check or certification performed by OrbiSportbook.

The origin of launchUrl is the platform’s configured sportsbook URL (SPORTSBOOK_URL); when unset, the origin your request was sent to.

Status code When
401 unauthorized Missing or wrong X-API-Key, or the tenant has no key. Every failure is audited with the caller’s IP.
429 rate_limited Too many wrong X-API-Key attempts from the same IP (10, then one every 20 seconds); Retry-After says when to try again. A right key does not spend this budget and is not refused for the traffic the same IP sent on other routes. A call whose key is not found right (a made-up header, a wrong key, an error before the key is read) also spends a per-IP bucket of 30 such calls, refilled at one a second, and answers 429 before the key is read once it is spent.
400 validation Bad field; details.field names it (externalPlayerId, displayName, path, locale, affiliateId, overridesPolicy, overrides.…), or an unknown field. Invalid overrides are refused before any player or session is created.
400 unsupported_currency currency is not in the registry or not enabled for the tenant; details.supported lists the enabled currencies (absent for a code outside the registry).
400 unsupported_display_currency displayCurrency is invalid; details.field is displayCurrency and details.reason says why: unknown_code (not in the registry), invalid_rate (not a number, a string, zero, negative, out of 1e-9..1e9 or more than 12 significant digits), session_currency_rate (code is the session currency with a rate other than 1) invalid_display_currency (not an object with code and rate) or not_allowed (outside the brand’s or the launch’s allowed display currencies). Refused before any player or session is created.
403 account_blocked The player is blocked or closed on the platform.
403 account_paused, account_closed An existing local player restriction prevents the session.
404 not_found Unknown tenant (X-Tenant-ID).
503 unavailable The tenant is suspended or the service is temporarily unavailable. Retry later.

A player is identified by tenant and externalPlayerId; each currency is a separate wallet of the same player. The session’s currency is fixed for its whole lifetime: its bets, its balance (every /balance, /debit, /credit and /rollback call carries it), GET /api/v1/wallet, live balance pushes and responsible gambling statements all use it. To let the player play in another currency, create a new session with that currency and send its launch token to a remounted sportsbook (see Embedding).

An unsupported currency is refused before any player or session is created:

{
"error": {
"code": "unsupported_currency",
"message": "currency EUR is not enabled for this operator",
"details": { "field": "currency", "supported": ["USD", "BTC"] }
}
}

Responsible gambling money limits stay in the player’s home currency: while one is set, a session in another currency can be created, but bets in it are refused. See Currencies.

A launch token is how the session reaches the iframe without ever being put in a URL. The sportsbook exchanges it once, at start-up or when it receives set_launch_token:

POST /api/v1/integration/launch
Content-Type: application/json
X-Tenant-ID: demo-embed
{"launchToken": "lt_NIpjVSCtwQlG0iLUbF9T7WeY84YSVs3pVQeLxbbH1O0"}
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…", "player": { "id": "pl_bd387263c326f44e90808bde", "…": "…" }, "currency": "USD", "displayCurrency": { "code": "BRL", "rate": 5.4231 } }

currency is the session’s wallet currency; it is authoritative over the currency parameter of the launch URL. displayCurrency is present only when the session was created with one, overrides only when it was created with overrides. You never call this endpoint yourself; the iframe does. It keeps the session token in memory and in sessionStorage for that iframe, and removes launch from its own address before anything else loads.

Rule
Single use The exchange marks the token used in the same database statement: a second exchange (a replayed or shared URL, the browser history) gets 401 with details.reason: "launch_token_used", and the replay is audited.
Expiry 120 seconds after it was issued (launchExpiresAt): 401, launch_token_expired. Create the session right before you render the sportsbook.
Tenant A token only works for its own tenant: elsewhere it is launch_token_invalid, like an unknown token.
Session The session must still be alive: a logged-out or expired session gives 401 (unauthorized or session_expired).
Storage Only a SHA-256 hash of the token is stored. Used and expired tokens are deleted after a day.

When the exchange fails at start-up, the sportsbook stays anonymous and sends your page an error event (code = the reason) followed by session_expired, so the SDK’s onSessionExpired can fetch a fresh token.

  • A session lasts at most 12 hours and ends after the jurisdiction’s idle timeout (60 minutes for .com tenants, 30 minutes for Brazil). Every authenticated call from the iframe (balance, bets, My Bets) counts as activity; browsing odds does not.
  • Each call to integration/sessions opens a new session; earlier sessions of the player keep working until they expire. When the player logs out of your site, call logout() on the SDK to end the sportsbook session too.
  • To refresh, call integration/sessions again and send the new launch token to the iframe. With the SDK, return it from onSessionExpired:
OrbiSportbook.mount('#sportsbook', {
url: 'https://api.orbisportbook.com',
tenant: 'your-tenant',
launchToken,
// called when the sportsbook session ends (idle, expiry, refused token)
onSessionExpired: async () => {
const res = await fetch('/my-site/sportsbook-launch', { method: 'POST' }); // your endpoint
return res.ok ? (await res.json()).launchToken : null; // null: stay logged out
},
});

The same mechanism logs a player in without reloading the iframe: after your login dialog, call sb.setLaunchToken(newLaunchToken).

  • Sessions use the client platform’s stable externalPlayerId, scoped to the tenant. The same ID in the same tenant reuses the player; different tenants have separate players.
  • No profile requires CPF, including BR. The legacy cpf string is accepted and ignored: the integration does not validate it, query CPF lists or store it.
  • Existing players retain their internal ID. A previously stored CPF does not need to be resent and is not used for CPF betting checks on these integrated players.
  • Registration, CPF, KYC and eligibility remain the client platform’s responsibility. Do not send CPF or identity documents in session requests.
  • Local blocks, closures, restrictions and the remaining betting controls still apply.
  • kycStatus: verified records delegation to the operator; it does not mean OrbiSportbook performed KYC.