Appearance
POST /api/launch
Create a player session and get a ready-to-embed iframe url. Called server-to-server from the operator's backend. See the Launch guide for the full flow.
Endpoint
POST https://api.oddyne.com/api/launchAuth
Authorization: Bearer <YOUR_SITE_API_KEY>Server-side only
The site API key is issued at onboarding and identifies your site. Never call this from the browser — mint the launch on your server and pass only the returned url to the iframe.
Request body
JSON, camelCase.
json
{
"siteId": "<YOUR_SITE_ID>",
"userId": "<YOUR_PLAYER_ID>",
"username": "player_display_name",
"currency": "USD",
"lang": "en",
"partner": "affiliate-name",
"template": "classic",
"device": "desktop",
"view": "live",
"balance": 100.00
}| Field | Type | Required | Notes |
|---|---|---|---|
siteId | string | Yes | Must match the key's site. |
userId | string | Yes | Your internal player id. |
username | string | No | Player display name. |
currency | string | No | ISO currency code. |
lang | string | No | Language code. |
partner | string | No | Affiliate / brand tag (risk grouping). |
template | string | No | Theme / branding selector. |
device | enum | No | mobile | desktop | terminal. Default desktop. |
view | enum | No | live | prematch | tickets. Default live. |
balance | number | No | Starting balance to display. |
Request
bash
curl -X POST https://api.oddyne.com/api/launch \
-H "Authorization: Bearer <YOUR_SITE_API_KEY>" \
-H "Content-Type: application/json" \
-d '{ "siteId": "<YOUR_SITE_ID>", "userId": "<YOUR_PLAYER_ID>", "currency": "USD", "lang": "en", "device": "desktop", "view": "live" }'Response 200
json
{
"url": "https://<EMBED_HOST>/?siteId=<YOUR_SITE_ID>&token=<jwt>&lang=en&theme=classic&view=live&device=desktop",
"token": "<jwt>",
"expiresAt": "2026-08-09T12:00:00Z"
}| Field | Type | Notes |
|---|---|---|
url | string | Ready-to-embed iframe URL. Embed exactly — do not modify. |
token | string | Signed player session JWT (already in url). Short-lived. |
expiresAt | string | ISO-8601 UTC expiry. Mint a fresh launch per session. |
Errors
| Status | Meaning |
|---|---|
400 | Missing required field (siteId or userId). |
401 | Missing or invalid site API key. |
403 | siteId does not match the key's site. |