API Reference
Programmatic access to Africa's smartest sports prediction AI.
Base URL
https://api.tbet.ng/api/v1
Authentication
Pass your API key in the Authorization header.
Authorization: Bearer tbet_live_xxxxxxxxxxxxxxxxxxxxxxxx
Response Envelope
All successful JSON responses share a standard envelope.
{
"success": true,
"data": { ... },
"meta": { "timestamp": "2026-05-14T10:00:00Z", "request_id": "req_16840584_a1b", "rate_limit": { "limit": 60, "remaining": 59, "reset": 168405846 } }
}
Error Responses
{ "success": false, "error": "Invalid API key" }Interactive API Playground
GET /health
Tier: All | Check API health and version.
curl -X GET https://api.tbet.ng/api/v1/health \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"status": "ok",
"uptime": 3600
}
}
GET /markets
Tier: All | List supported betting markets.
curl -X GET https://api.tbet.ng/api/v1/markets \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{
"code": "O15",
"name": "Over 1.5 Goals",
"emoji": "\u26bd"
}
]
}
GET /free-pick
Tier: All | Get today's free Bet of the Day (stripped reasoning).
curl -X GET https://api.tbet.ng/api/v1/free-pick \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"fixture_id": 101,
"market": "O15",
"odds": 1.45,
"date": "2026-05-14"
}
}
GET /accuracy
Tier: All | Get overall system win rate.
curl -X GET https://api.tbet.ng/api/v1/accuracy \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"win_rate": 76.5,
"total_predictions": 1045
}
}
GET /combos/today
Tier: Pro | Get today's premium combo with AI reasoning.
curl -X GET https://api.tbet.ng/api/v1/combos/today \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"id": 45,
"date": "2026-05-14",
"total_odds": 5.4,
"status": "pending",
"picks": [
{
"market": "O15",
"odds": 1.25,
"confidence": 0.88,
"reasoning": "Arsenal scores often."
}
]
}
}
GET /combos/history
Tier: Pro | Get past premium combos.
curl -X GET https://api.tbet.ng/api/v1/combos/history \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{
"id": 44,
"date": "2026-05-13",
"total_odds": 3.2,
"status": "won"
}
]
}
GET /combos/:date
Tier: Pro | Get combo for a specific date (YYYY-MM-DD).
curl -X GET https://api.tbet.ng/api/v1/combos/:date \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"id": 44,
"date": "2026-05-13",
"total_odds": 3.2,
"status": "won",
"picks": []
}
}
GET /predictions/today
Tier: Pro | List all predictions for today.
curl -X GET https://api.tbet.ng/api/v1/predictions/today \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{
"id": 1001,
"match": "Arsenal vs Chelsea",
"market": "O15",
"odds": 1.25
}
]
}
GET /predictions/:id
Tier: Pro | Get specific prediction details.
curl -X GET https://api.tbet.ng/api/v1/predictions/:id \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"id": 1001,
"match": "Arsenal vs Chelsea",
"market": "O15",
"odds": 1.25,
"status": "won"
}
}
GET /accuracy/markets
Tier: Pro | Get accuracy broken down by market.
curl -X GET https://api.tbet.ng/api/v1/accuracy/markets \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"O15": {
"win_rate": 82.5,
"total": 400
},
"BTS": {
"win_rate": 65.0,
"total": 200
}
}
}
GET /accuracy/leagues
Tier: Pro | Get accuracy broken down by league.
curl -X GET https://api.tbet.ng/api/v1/accuracy/leagues \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"Premier League": {
"win_rate": 75.0,
"total": 150
}
}
}
GET /live/status
Tier: Pro | Get today's pending picks currently live.
curl -X GET https://api.tbet.ng/api/v1/live/status \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{
"fixture_id": 1001,
"elapsed": 45,
"actual_score": "1-0",
"status": "HT"
}
]
}
POST /webhooks
Tier: Pro | Register a new webhook URL.
curl -X POST https://api.tbet.ng/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" -d '{
"url": "https://your-server.com/webhook",
"events": [
"combo.created",
"match.goal"
],
"secret": "your_secure_random_string_here"
}'
{
"success": true,
"data": {
"id": 1,
"url": "https://...",
"events": [
"combo.created"
],
"status": "active"
}
}
GET /webhooks
Tier: Pro | List your registered webhooks.
curl -X GET https://api.tbet.ng/api/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{
"id": 1,
"url": "https://...",
"events": [
"combo.created"
],
"status": "active"
}
]
}
DELETE /webhooks/:id
Tier: Pro | Delete a webhook.
curl -X DELETE https://api.tbet.ng/api/v1/webhooks/:id \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" -d ''
{
"success": true,
"message": "Webhook deleted successfully."
}
GET /webhooks/:id/deliveries
Tier: Pro | View delivery history for a webhook.
curl -X GET https://api.tbet.ng/api/v1/webhooks/:id/deliveries \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{
"id": 10,
"event": "combo.created",
"status": 200,
"timestamp": "2026-05-14T10:00:00Z"
}
]
}
POST /webhooks/test
Tier: Pro | Trigger a test payload to a webhook.
curl -X POST https://api.tbet.ng/api/v1/webhooks/test \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" -d '{
"webhook_id": 1
}'
{
"success": true,
"message": "Test payload dispatched."
}
GET /me
Tier: All | Get information about your API key.
curl -X GET https://api.tbet.ng/api/v1/me \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"tier": "pro",
"daily_calls_used": 15,
"daily_limit": 2000
}
}
GET /me/usage
Tier: All | Get 30-day usage analytics.
curl -X GET https://api.tbet.ng/api/v1/me/usage \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": [
{
"date": "2026-05-14",
"calls": 15
}
]
}
POST /keys/rotate
Tier: All | Rotate your API key (invalidates current key).
curl -X POST https://api.tbet.ng/api/v1/keys/rotate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" -d '{}'
{
"success": true,
"data": {
"new_key": "tbet_live_a1b2c3d4..."
}
}
Webhook Events
| Event | Description |
|---|---|
| combo.created | Fired when a new premium combo is finalized. |
| combo.settled | Fired when all predictions in a combo are settled. |
| prediction.entered | Fired during a match when an early-settle market wins. |
| prediction.settled | Fired when a prediction result is final. |
| match.kickoff | Fired when a match begins. |
| match.goal | Fired when the score changes during a match. |
| match.halftime | Fired when a match reaches halftime. |
| match.fulltime | Fired when a match finishes. |
| free_pick.created | Fired when the free Bet of the Day is finalized. |
Webhook Verification
Verify the x-tbet-signature header using your secret.
const signature = req.headers['x-tbet-signature'];
const expected = 'sha256=' + crypto.createHmac('sha256', process.env.WEBHOOK_SECRET).update(JSON.stringify(req.body)).digest('hex');
if (crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))) {
// Valid
}