API Reference
See the promos your accounts hold right now - Mega Boosts, odds boosts, savers, bonus bets, SGM savers - and place the ones that are a single bet with one call, by id.
Base URL: https://api.b337.ai
This is the same list the Manual Betting page shows, with the same wording. Everything here can also be placed from the Manual Betting page. To force a fresh read of one account's offers, see Refresh promos (section 3).
When a session logs in, it reads the offers the bookie is showing that
account and stores them (bet365 is the exception: a bet365 API session
never reads offers by itself - see Refresh promos). Each one
becomes an account promo with a stable promo_id. Most promos are
tokens you spend on a selection you choose (a saver on any runner in a
race, a bonus bet on any market). A few are a
whole bet the bookie has already built and priced - a bet365 Mega Boost
("Horse A or Horse B (Either to Win) 1.50 → 2.00") is one. Those have exactly
one possible bet, so you can place them by id alone.
GET /v3/account_promosSynchronous read. Only active promos are returned; no bookie is contacted.
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | No | Only this session's account. Must be your session (403 otherwise). Omit to list every account on your key. |
bookie | string | No | Filter by bookie, e.g. bet365. |
| Field | Type | Description |
|---|---|---|
promo_id | int | The promo's id. Pass this to /v3/place_promo. |
session_id | string | null | The session you asked about; otherwise your first active session on that account (null when none is running). |
session_ids | string[] | All your active sessions on that account. |
bookie | string | Bookie the account belongs to. |
promo | string | Promo code (bet_boost, boost, 2/3, bonus, …). |
label / summary | string / object | Our customer-facing wording, as on the website. |
kind | string | racing, sports or deposit. Racing rows carry track, race_num, race_type, date; sports rows sport, competition, event, date. |
card_id, voucher_type, selection, base_odds, boosted_odds | Bet Boost cards only. boosted_odds is the card's own price and is absent until it has been captured. | |
placeable_by_id | bool | true only when the promo has exactly one possible bet (see below). |
how_to_bet | object | Where to place it - see below. |
placeable_by_idtrue only for a bet365 Bet Boost card (e.g. a Mega Boost) of a single
fixture - a single racing selection, or a same-game sports card - whose boosted
price has been captured. Multi / outright cards, single-selection sports cards
(voucher_type pba on a sports row) and cards with no captured price
are false.
how_to_bet| Value | Meaning |
|---|---|
{"endpoint": "/v3/place_promo"} | Place it by id (section 2). |
{"endpoint": "/v3/place_bet", "promo_name": "…", "note": "…"} | A token: pick your selection and place via /v3/place_bet with this promo_name. |
{"endpoint": null, "note": "…"} | Not placeable through the API yet (the note says why), or not a bet (deposit offers). |
POST /v3/place_promoPlaces a promo whose placeable_by_id is true. Send no price,
selection or market - the card already names them. At bet time the session
re-reads the card from the bookie and refuses if it has gone or is no longer
boosted.
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Active session on the account that holds the promo |
promo_id | int | Yes | promo_id from GET /v3/account_promos |
stake | float | Yes | Stake in dollars |
callback_url | string | No | Receive the signed result POST here instead of polling |
idempotency_key | string | No | 1-200 chars, held for 48h per key. A retry with the same key returns the same correlation_id and places nothing new - even after the promo has been used. |
trace_id | string | No | Your own id (≤200 chars), echoed back everywhere |
source | string | No | Free-form label for your own reporting (≤200 chars) |
The same pending envelope as /v3/place_bet
(HTTP 200; sandbox samples return 202), plus the promo_id:
A retry with an idempotency_key that already placed returns a short replay
envelope and places nothing:
Poll POST /api/bet_status with {"correlation_ids": ["…"]} every 1-2s
until status is completed or timeout, or pass callback_url to
receive a signed webhook. Details in the
Async API (v3) guide. The bet is recorded as a
promo bet (bet_type: "promo", promo_name: "bet_boost").
Error bodies are {"detail": "..."}.
| Status | When |
|---|---|
400 | session_id, promo_id or stake missing; bad callback_url (must be a public http(s) URL), trace_id, source or idempotency_key |
403 | Betting is not enabled on this account.; Session does not belong to user; the session is not active |
404 | Promo not found for this session's account (also for a non-numeric promo_id) |
409 | idempotency_key in flight; poll bet_status - the first request with this key is still dispatching (~100ms); retry and you get the replay envelope |
422 | The promo is no longer active (used, expired, gone or dismissed), or it is not placeable by id - the message says why and, for tokens, points you to /v3/place_bet with promo_name |
429 | Back-off: the bookie refused this account's recent bets on this selection. Wait the Retry-After seconds |
503 | Promos are temporarily unavailable; retry shortly, or your client PC is offline |
Promos with more than one choice (racing boosts, savers, bonus bets) are still placed via
/v3/place_betwithpromo_name. See Bonus Bets & Promos for the token flags.
bet365 race-card Bet Boost banner (the "BET BOOST" strip at the top of a race, e.g. a runner's Fixed Win 3.00 boosted to 3.50) is not a promo row and has no
promo_id. Place it with/v3/place_beton that runner's Win market with"prebuilt_boost": true(cash, single, no other offer). It is strict: the bet is placed at the banner price or refused withodds_moved, never at the ordinary price.
POST /accounts/tools/scrape_promosPromos update automatically: a session re-reads its account's offers when it logs in and about every hour while it runs, and an account with auto scan turned on is scanned about every 3 hours even with no session running. Use this endpoint when you want a fresh read now for one account - it is the same call as the website's "Scan promos now" button.
bet365 is different: an API session does NOT read its offers. Every bet365 request spends from a small per-login allowance the session needs for betting, so a bet365 session skips the promo read on login and while it runs. The one exception is a bet365 racing strategy session with Auto Scan Promos on: it keeps that account's racing offers (racing Mega Boost cards included) fresh while it runs. For an account that only runs API sessions, bet365 offers, Mega Boost cards included, reach
GET /v3/account_promosonly from a scan: turn auto scan on for each bet365 account (about every 3 hours), and call this endpoint when you want a fresh read sooner. With neither, the account returns no bet365 rows however many API sessions are running on it. The scan rides the session already logged in on that account - it does not open a second bet365 login. Don't call it on a tight loop: each scan spends from that same allowance.
It launches a short scan session on your own machine through the account's own proxy, reads the offers the bookie is showing that account, records them, and stops itself. Nothing is bet. Your client must be running on a PC that account uses - the scan logs in as the account, so it runs from your machine, never from our servers.
| Field | Type | Required | Description |
|---|---|---|---|
account_id | string | Yes | The bookie account (one account = one bookie login) to scan. Every row of GET /v3/account_promos carries it as account_id. |
pc_id | string | No | Run the scan on this machine. Omit to let the server pick the PC the account already runs on. |
use_bypass | bool | No | TAB accounts only: log in via the number-login bypass. Sending a bool saves it as the account's scan setting (shared with the auto scan) - omit it unless you mean to change that. |
success means the scan started, not that it finished.
| Response | Meaning |
|---|---|
status: "success" | Scan launched on pc_id. |
status: "fail", code: "no_pc" | No machine online to run the scan - start your client first. |
status: "fail", code: "busy" | A scan or withdrawal is already running on that account - retry in a couple of minutes. |
status: "fail" (no code) | The account isn't yours, or your key can't bet (read-only plan, credits, subscription) - the message says which. |
The call is fire-and-forget - there is no correlation id to poll. A scan
normally finishes in under two minutes: wait, then re-read
GET /v3/account_promos (section 1). New and changed offers appear there
and on the website's promos pages.
There is no endpoint that writes promos directly - promos always come from a scan of what the bookie is actually showing the account, so triggering a scan is how you update them.