Leelabet API

Reseller API documentation

Use your client API key to pull sports odds, casino tables, score cards, and the custom Live TV player. Base URL: https://api.leelabet.com

Getting started

Authentication

API key is secret. Use it only from your backend (or secure server code) — never put it in frontend HTML, JS, or iframe URLs. Anyone can copy a key from DevTools.

curl -H "X-Api-Key: lb_xxx" https://api.leelabet.com/v1/sports

Your package controls sports/casino feeds, media toggles, TV domains, IP allow list, and expiry.

Sports

Sports endpoints

MethodPathNotes
GET/v1/sportsSport catalogue (filtered to your package)
GET/v1/treeCompetition / event tree
GET/v1/odds?gmid=&sid=Market odds for an event. sid defaults to 4 (Cricket)

Odds example

GET /v1/odds?gmid=787327544&sid=4
Header: X-Api-Key: lb_xxx
Casino

Casino endpoints

MethodPathNotes
GET/v1/casino/tablesTables available to your package
GET/v1/casino/data?type=Live runners / round for a table type (e.g. teen20)
GET/v1/casino/result?type=Recent results for a table
GET/v1/casino/tv?type=Casino Live TV iframe — domain whitelist only, no API key
GET /v1/casino/data?type=teen20
Header: X-Api-Key: lb_xxx
<iframe src="https://api.leelabet.com/v1/casino/tv?type=teen20"
  style="width:100%;height:360px;border:0;background:#000" allow="autoplay; fullscreen"></iframe>

Works only when the page domain is in your TV domain whitelist and Casino Live TV is ON.

Media

Custom Live TV & score

Media embeds are domain-based — no API key in the iframe. Turn Match TV / Score / Casino TV ON in admin and add the client website to TV domain whitelist.

Live TV player

GET /v1/tv?event_id=EVENT_ID

Requires matchTv + whitelisted domain. Redirects to our player (short-lived ticket, not your API key).

Score card

GET /v1/score?gmid=EVENT_ID

Requires score + whitelisted domain.

Casino Live TV

GET /v1/casino/tv?type=teen20

Requires casinoTv + whitelisted domain.

Embed examples (no key)

<iframe
  src="https://api.leelabet.com/v1/tv?event_id=787327544"
  allow="autoplay; fullscreen; encrypted-media"
  style="width:100%;height:360px;border:0;background:#000"
></iframe>

<iframe
  src="https://api.leelabet.com/v1/score?gmid=787327544"
  style="width:100%;height:120px;border:0"
></iframe>

<iframe
  src="https://api.leelabet.com/v1/casino/tv?type=teen20"
  style="width:100%;height:360px;border:0;background:#000"
></iframe>

Keep the API key on your server for odds/casino JSON. Never paste ?key= into frontend code.

Whitelist any host: production domain (wiin11.com), localhost, 127.0.0.1, or localhost:3000 — must be listed in admin before embeds work.

Reference

Errors & health

Health (no key): GET /health and GET /v1/health?key=…

{ "success": false, "message": "Sport not in package" }
Quick start

Typical client flow

  1. Call /v1/sports with X-Api-Key from your backend.
  2. Pick an event gmid, poll /v1/odds for prices (server-side key).
  3. Embed /v1/score and /v1/tv iframes without a key (domain must be whitelisted).
  4. For casino data use the key header; for casino TV embed /v1/casino/tv?type= with no key.
const KEY = "lb_xxx";
const base = "https://api.leelabet.com/v1";

const sports = await fetch(base + "/sports", {
  headers: { "X-Api-Key": KEY }
}).then(r => r.json());

const odds = await fetch(base + `/odds?gmid=${gmid}&sid=4`, {
  headers: { "X-Api-Key": KEY }
}).then(r => r.json());

Need a key? Contact Leelabet — keys are issued from the API admin panel with sports/casino package checklists.