
Integrate bet code conversion into your application with the BetRelay REST API.
All API requests (except GET /bookmakers) require an API key in the X-API-Key header.
Get your API key from the Dashboard → API Keys page.
curl -H "X-API-Key: br_live_xxxxx" https://betrelay.com.ng/api/v1/usage
Keys are prefixed with br_test_ (development) or br_live_ (production).
Each API key can be restricted to specific domains. When set, the API checks the Origin or Referer header against the allowed list. Requests from unauthorized domains return 403 Forbidden.
*.mysite.com matches all subdomainshttps://betrelay.com.ng/api/v1
Convert a bet code from one bookmaker to another.
| Parameter | Type | Description | |
|---|---|---|---|
code | string | required | The bet code to convert |
from | string | required | Source bookmaker name |
to | string | required | Target bookmaker name |
country | string | optional | Country code (default: ng) |
Request:
{
"code": "58CFLYL",
"from": "bet9ja",
"to": "betking",
"country": "ng"
}
Success response (200):
{
"message": "success",
"data": {
"shareCode": "FJ1A2U",
"shareURL": "https://m.betking.com/en-ng/sports/book-bet/FJ1A2U",
"selections": [
{
"home": "Freiburg",
"away": "Celta Vigo",
"market": "1X2",
"pick": "Away",
"sourceOdds": "3.1",
"targetOdds": "3.1"
}
]
},
"usage": {
"plan": "starter",
"daily_remaining": 199,
"monthly_remaining": 4999
}
}
Returns all supported bookmakers grouped by name with available countries.
{
"message": "success",
"data": [
{
"name": "sportybet",
"countries": [
{ "country": "Nigeria", "code": "ng" },
{ "country": "Ghana", "code": "gh" }
]
}
]
}
Returns current usage and limits for your API key.
{
"message": "success",
"data": {
"plan": "starter",
"daily_limit": 200,
"daily_used": 1,
"daily_remaining": 199,
"monthly_limit": 5000,
"monthly_used": 1,
"monthly_remaining": 4999,
"expires_at": null
}
}
Limits are enforced per API key. Every response includes rate limit headers:
X-RateLimit-Daily-RemainingX-RateLimit-Monthly-RemainingX-API-Mode (test / live)When limits are exceeded, the API returns 429 Too Many Requests.
All errors return a JSON object with message and error fields:
{
"message": "error",
"error": "Unknown bookmaker. Use: sportybet, bet9ja, msport, football, bangbet, betking"
}
| Status | Meaning |
|---|---|
200 | Success |
400 | Bad request — invalid bookmaker or missing params |
401 | Unauthorized — missing or invalid API key |
422 | Conversion failed — code not found or events unavailable |
429 | Rate limit exceeded |
500 | Server error |
curl -X POST https://betrelay.com.ng/api/v1/convert \
-H "Content-Type: application/json" \
-H "X-API-Key: br_live_xxxxx" \
-d '{"code":"58CFLYL","from":"bet9ja","to":"sportybet","country":"ng"}'
const res = await fetch('https://betrelay.com.ng/api/v1/convert', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'br_live_xxxxx', }, body: JSON.stringify({ code: '58CFLYL', from: 'bet9ja', to: 'sportybet', country: 'ng', }), }); const data = await res.json();
import requests res = requests.post( 'https://betrelay.com.ng/api/v1/convert', headers={'X-API-Key': 'br_live_xxxxx'}, json={ 'code': '58CFLYL', 'from': 'bet9ja', 'to': 'sportybet', 'country': 'ng', } ) data = res.json()
$response = Http::withHeaders([
'X-API-Key' => 'br_live_xxxxx',
])->post('https://betrelay.com.ng/api/v1/convert', [
'code' => '58CFLYL',
'from' => 'bet9ja',
'to' => 'sportybet',
'country' => 'ng',
]);
$data = $response->json();