API Reference
Manage bonus bet tokens, promotional offers, and boost multipliers. View available tokens, check split options, split large tokens, and query promos for specific races.
Base URL: https://api.b337.ai
All four endpoints below -
/v3/promos,/v3/bonus_bets,/v3/promo_tokens,/v3/split_bonus_bet- use the same async contract as/v3/place_bet: an HTTP 200 response in ~100ms withstatus: "pending"and acorrelation_id, then poll/api/bet_status(or receive a signed webhook atcallback_url) for the actual result.The
resultfield on the poll response carries the payload documented under each endpoint below.Placing bets with promo tokens: the bonus / saver / boost flags shown below (
use_bonus_bet,use_boost,promo_name,bet_type) all work on/v3/place_bet- same payload, async response.
V2 is retired.
/v2/promos,/v2/bonus_betsand/v2/promo_tokensnow return HTTP 410 Gone with{"detail": "POST /v2/... is deprecated — use POST /v3/... instead."}./v2/split_bonus_betstill answers synchronously withDeprecationheaders - migrate it to/v3/split_bonus_bet./v2/boost_tokenis unaffected.
Every v3 endpoint on this page returns HTTP 200 with this pending envelope (sandbox samples return 202 - treat both as accepted):
callback_url is echoed only when the webhook was registered. It must be an
http(s) URL (400 otherwise) whose host resolves to public IP addresses
only - a private or loopback host is refused at delivery time, and
redirects are never followed.
Error bodies are FastAPI's {"detail": "..."}.
| Status | detail |
|---|---|
400 | session_id is required, callback_url must be an http(s) URL, Session has no PC ID, or a missing/invalid endpoint field (max_amount, track, race_num) |
401 / 403 | Invalid key / no valid subscription (see Authentication) |
403 | Session is not active - not your session, or not running on the api strategy |
404 | Session <id> not found |
422 | Body failed validation (e.g. not JSON) |
503 | Your client PC is offline or restarting - the command was not dispatched |
A bookie-side failure is not an HTTP error: the poll/webhook result
carries success: false and an error string.
Retrieving the result and webhook semantics (signature verification, retry
behaviour, status values) are identical across all v3 endpoints - see the
Async API (v3) guide. The polling endpoint
POST /api/bet_status works for any correlation_id - place_bet,
withdraw-balance, price_check, and the four endpoints below.
POST /v3/bonus_betsRetrieve all active bonus bet tokens with their split options. Read-only.
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Active session ID |
callback_url | string | No | If set, the result is POSTed to this URL when ready. |
Returns the standard async envelope (see above). Poll /api/bet_status
with the correlation_id for the result.
result payload| Field | Type | Description |
|---|---|---|
| id | string | Unique token identifier |
| amount | float | Token value in dollars |
| status | string | The bookie's token status (defaults to ACTIVE) |
| split_options | array | Number of pieces the token can be split into (empty = not splittable) |
| split_amounts | array | Value per piece for each split option |
Tokens carry no expiry or description fields. On a bookie without token
retrieval the result is success: false with an error, and total_bonus
is the session's bonus balance.
POST /v2/bonus_betsreturns 410. Use v3.
POST /v3/split_bonus_betSplit a large bonus bet token into smaller pieces. State-mutating - fires on the bookie as soon as the pending envelope returns.
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Active session ID |
max_amount | float | Yes | Maximum amount per piece after split (positive) |
callback_url | string | No | If set, the result is POSTed to this URL when ready. |
The session automatically:
max_amount and splittable - one token per call; call again for the nextmax_amount (the largest per-bet amount under the limit)Standard async envelope.
⚠️ Do not retry the submission once it is accepted. Once the envelope comes back, the split has been queued for the bookie. If the dashboard or your client loses the response (network blip, tab close), retry the request and you risk splitting the user's token twice.
The safe pattern is: persist the
correlation_idfrom the envelope immediately, and on any failure surface that ID to the user so they can poll/api/bet_statusfor the result instead of re-firing. Re-submitting is only safe if the request failed before the envelope came back (network error, 4xx/5xx).
result payloadFailures carry error (not message):
Other error cases: tokens over the limit but none splittable; a token that
cannot be split small enough (the message names the factor needed and the
largest available); splitting not implemented for this bookie.
Deprecated:
POST /v2/split_bonus_betstill answers synchronously with the same payload plusDeprecationheaders. Migrate to v3.
POST /v3/promosFetch personalized promotional offers available for a session. Read-only.
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Active session ID |
callback_url | string | No | If set, the result is POSTed to this URL when ready. |
Standard async envelope.
result payloadThe same four buckets on every bookie:
| Bucket | Fields | Notes |
|---|---|---|
race_specific | track, race_num or races (list of race numbers), race_type, promo_type, max_amount, remaining, promo_id, description | Savers tied to a race/meeting. Some bookies group one promo across several races of a track into one row with races: [...]. |
general | race_type, promo_type, max_amount, remaining, promo_id, description | Savers usable on any race of that type |
bonus_boost | track, race_num, race_type, boost_pct, max_amount, promo_id, description | TAB only - winnings boosted by boost_pct paid as bonus bets |
price_boost | boost_type, remaining, promo_id, description | Odds boosts |
count is the total across all four buckets. On failure: success: false,
an error string, and four empty buckets.
POST /v2/promosreturns 410. Use v3.
POST /v3/promo_tokensGet all promo tokens available for a specific race: saver tokens, bonus boost (TAB), price boosts and bonus-bet tokens. Read-only.
| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Active session ID |
track | string | Yes | Track name |
race_num | int | Yes | Race number (>0) |
race_type | string | No | "(R)", "(G)", "(H)". Default: "(R)" |
country | string | No | Country filter |
callback_url | string | No | If set, the result is POSTed to this URL when ready. |
Standard async envelope.
result payload| Field | Type | Description |
|---|---|---|
saver_tokens | array | type, max_amount, promo_id, is_race_specific, remaining, description |
bonus_boost | object | null | TAB only: boost_pct, max_amount, promo_id, description |
price_boost | object | array | null | Odds boosts: available, remaining, promo_id, boost_type, and boosted_odds where the bookie quotes it. One boost = an object, several = an array. |
bonus_tokens | array | null | Bonus-bet tokens usable on this race: amount, promo_id, remaining, description. null when none. |
When nothing is available: success: true, empty saver_tokens, null
boosts and a message. TAB's price multiplier is checked separately via
/v2/boost_token (section 7).
POST /v2/promo_tokensreturns 410. Use v3.
Use bonus bet tokens when placing bets by adding use_bonus_bet: true to
your bet request. Recommended endpoint:
POST /v3/place_bet.
| Field | Type | Required | Description |
|---|---|---|---|
| use_bonus_bet | bool | No | If true, uses bonus bet balance instead of cash |
The system automatically selects a bonus bet token matching the stake. If no suitable token exists, the bet fails.
On Sportsbet (racing and sports, singles and multis) the stake is the
most the bet will spend: a token at or under it is used whole, otherwise a
bigger token is split into 2-10 equal parts to fit (a $50 token on a $10
stake becomes 5 x $10), and if no token can be made to fit the bet fails.
The placed stake is the token's face value, so it can come out below
stake (a $25 token split 3 ways is $8.33); read stake in the
result payload for what was actually bet.
result payload (from /api/bet_status)When placing bets, specify a bet_type to use specific promo tokens.
Works identically on /v3/place_bet.
Every bet_type code, with what we call it, which bookies take it and what
it costs, is on the Promo Codes page. That
includes the free hit codes (lose_100pc_bonus on Sportsbet,
stake_back on bet365).
Send the code as promo_name with "bet_type": "boost". A bet_type that itself starts bonus_betboost is refused (HTTP 400). The bet is refused if the account holds no matching token.
| promo_name | Description |
|---|---|
"bonus_betboost_25pc" | 25% of winnings paid as bonus bet |
"bonus_betboost_50pc" | 50% of winnings paid as bonus bet |
| promo_name | Description |
|---|---|
"pump" | Your odds are boosted and any uplift is paid in cash, not a bonus bet. Subject to the token's own stake cap. |
POST /v2/boost_tokenCheck whether the boost token (multiplier) is available for a given race. The boost token lets you multiply winnings (2x, 3x) by paying more stake - distinct from promo tokens.
Still on the v2 sync surface - not retired with the other v2 endpoints above. Use as-is.
| Field | Type | Required | Description |
|---|---|---|---|
| session_id | string | Yes | Active session ID |
| track | string | Yes | Track name |
| race_num | int | Yes | Race number |
| race_type | string | No | "(R)", "(G)", "(H)". Default: "(R)" |