API Reference
Complete REST API documentation for integrating the SportsBet Pro sportsbook platform. Place bets, manage sessions, fetch live odds, and embed widgets programmatically.
Authentication
API Key Authentication
All API requests must include your client_key parameter. For authenticated endpoints, pass the session token obtained from the provider session endpoint. Generate API keys from the Client Portal under Developer → API Keys.
Base URL
All API endpoints are relative to your deployment domain. Replace your-domain.com with your actual server address.
Endpoints
Place a new bet with one or more selections. Returns a booking confirmation with a unique booking code.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| client | string | Required | Your client key |
| token | string | Optional | Session token for authenticated users |
| currency | string | Required | Currency code (e.g., USD, EUR, TND) |
| stake | number | Required | Bet stake amount |
| total_odds | number | Required | Combined odds for all selections |
| selections | array | Required | Array of selection objects |
| selections[].event_id | integer | Required | Event identifier |
| selections[].market | string | Required | Market type (e.g., match_winner) |
| selections[].outcome | string | Required | Outcome key (e.g., home, draw, away) |
| selections[].odds | number | Required | Odds value for this selection |
Example Request
Example Response
Validate a user session token and retrieve the user's balance and authentication status.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| client | string | Required | Your client key |
| token | string | Required | Session token to validate |
Example Response (Authenticated)
Example Response (Guest)
Retrieve the bet history for a specific user. Returns recent bookings with status, stake, and payout.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| client | string | Required | Your client key |
| token | string | Required | User session token |
Example Response
Retrieve the current odds feed with all sports, leagues, events, and markets. Used for live odds updates.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| client | string | Required | Your client key |
| sport | string | Optional | Filter by sport key (e.g., football) |
Response Format
Returns an array of sports, each containing leagues and events with current odds values.
Embed the sportsbook widget as an iframe. The widget renders a complete betting interface themed to your brand.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| client | string | Required | Your client key |
| token | string | Optional | Session token for authenticated users |
| sport | string | Optional | Default sport (default: football) |
Embed Code
Webhooks
Configure a webhook URL in your client settings to receive real-time event notifications. All webhook payloads are POST requests with JSON body.
Events
| Event | Description |
|---|---|
| BOOKING_CREATED | Fired when a new bet is placed |
| BOOKING_SETTLED | Fired when a booking is settled (won/lost/void) |
Webhook Payload
Error Handling
All errors return a consistent JSON structure with an error message and appropriate HTTP status code.
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request — invalid parameters |
| 401 | Unauthorized — invalid API key or session |
| 404 | Resource not found |
| 422 | Validation error |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Rate Limits
API requests are rate-limited to ensure fair usage and platform stability.
| Endpoint | Limit |
|---|---|
| POST /place-bet | 10 requests per second |
| GET /session | 60 requests per minute |
| GET /odds-feed | 30 requests per minute |