Betting Monitor API v1

A powerful RESTful API for real-time betting event ingestion and fraud detection. Monitor player behavior, detect anomalies, and receive alerts for suspicious activities.

Quick Start

  1. 1 Log in to the Betting Monitor Dashboard
  2. 2 Generate your API Key in Settings → API Keys
  3. 3 Start sending events using POST /events or /events/batch
  4. 4 Configure webhooks to receive fraud alerts in real-time

Base URL

Production: https://bettingmonitor.cloudpmt.com/api/v1
Sandbox: https://sandbox.bettingmonitor.cloudpmt.com/api/v1

Secure

X-API-Key authentication

Real-time

Async event ingestion

Batch Support

High throughput ingestion

Alerts

Fraud detection webhooks

Authentication

All API requests require authentication via the X-API-Key header.

Required Headers

Header Description Required
X-API-Key Your API key from the dashboard Yes
Content-Type application/json Yes

Example Request

curl -X POST "https://bettingmonitor.cloudpmt.com/api/v1/events" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key-here" \
  -d '{"external_event_id":"evt-123","player_id":"player-456","event_type":"DEPOSIT","amount":100000,"currency":"XOF","event_timestamp":"2026-01-31T12:00:00Z"}'

Error Handling

HTTP Code Meaning Action
200/201/202 Success Request processed successfully
400 Bad Request Check request body and parameters
401 Unauthorized Check your API key
404 Not Found Resource does not exist
429 Rate Limited Reduce request frequency
500 Server Error Retry with exponential backoff
GET /api/v1/lookups

Get lookup tables for event types, game types, and device types. Use these values when ingesting events.

Response 200 OK

{
  "event_types": [
    { "id": 1, "code": "BET", "name": "Bet Placed" },
    { "id": 2, "code": "WIN", "name": "Win" },
    { "id": 3, "code": "LOSS", "name": "Loss" },
    { "id": 4, "code": "DEPOSIT", "name": "Deposit" },
    { "id": 5, "code": "WITHDRAWAL", "name": "Withdrawal" },
    { "id": 6, "code": "BONUS", "name": "Bonus" },
    { "id": 7, "code": "REFUND", "name": "Refund" },
    { "id": 8, "code": "CASHOUT", "name": "Cash Out" }
  ],
  "game_types": [
    { "id": 1, "code": "SPORTS", "name": "Sports Betting" },
    { "id": 2, "code": "CASINO", "name": "Casino" },
    { "id": 3, "code": "VIRTUAL", "name": "Virtual Sports" },
    { "id": 4, "code": "LOTTERY", "name": "Lottery" },
    { "id": 5, "code": "POKER", "name": "Poker" },
    { "id": 6, "code": "ESPORTS", "name": "eSports" },
    { "id": 7, "code": "LIVE_CASINO", "name": "Live Casino" }
  ],
  "device_types": [
    { "id": 1, "code": "DESKTOP", "name": "Desktop" },
    { "id": 2, "code": "MOBILE", "name": "Mobile" },
    { "id": 3, "code": "TABLET", "name": "Tablet" },
    { "id": 4, "code": "API", "name": "API" },
    { "id": 5, "code": "OTHER", "name": "Other" }
  ]
}
POST /api/v1/events

Ingest a single betting event asynchronously. Returns 202 Accepted immediately - the event will be processed in the background.

Grouped Request Structure

Fields are organized into logical groups: player, event, game, and metadata.

Request Body (Grouped Structure)

{
  "event_id": "evt_20250203_143245_abc123",

  // Player information (required)
  "player": {
    "id": "pl_12345abc",
    "phone": "+221771234567",
    "country": "SEN",
    "kyc_level": 2
  },

  // Event details (required)
  "event": {
    "type": "BET",
    "timestamp": "2026-02-03T14:32:45Z",
    "amount": 5000,
    "currency": "XOF",
    "balance_before": 15000,
    "balance_after": 10000
  },

  // Game context (optional - for betting events)
  "game": {
    "type": "SPORTS",
    "id": "game_789",
    "name": "Senegal vs Nigeria",
    "sport": "football",
    "competition": "CAN 2025",
    "odds": 2.5,
    "bet_id": "bet_456"
  },

  // Tracking metadata (optional)
  "metadata": {
    "device_type": "MOBILE",
    "ip_address": "41.138.45.22",
    "session_id": "sess_xyz"
  }
}

Field Reference

Root Fields
Field Type Required Description
event_id string Yes Your unique event ID (max 100 chars)
player object Yes Player information object
event object Yes Event details object
game object No Game/betting context (recommended for BET events)
metadata object No Tracking and session metadata
player object
player.id string Yes Player identifier (max 100 chars)
player.phone string No Phone number (max 50 chars)
player.country string No ISO 3166-1 alpha-3 (SEN, CIV, MLI...)
player.kyc_level integer No KYC verification level (0-5)
event object
event.type string Yes BET, WIN, LOSS, DEPOSIT, WITHDRAWAL, BONUS, REFUND, CASHOUT
event.timestamp string Yes ISO 8601 (2026-01-31T12:00:00Z)
event.amount integer Yes Amount in currency units (5000 = 5,000 XOF)
event.currency string Yes ISO 4217 (XOF, EUR, USD...)
event.balance_before integer No Player balance before event (in currency units)
event.balance_after integer No Player balance after event (in currency units)
game object (optional)
game.type string No SPORTS, CASINO, VIRTUAL, LOTTERY, POKER, ESPORTS, LIVE_CASINO
game.id string No Game identifier (max 100 chars)
game.name string No Match/game name (e.g., "Senegal vs Nigeria")
game.sport string No Sport type (football, basketball...)
game.competition string No Competition name (CAN 2025, Premier League...)
game.odds float No Betting odds
game.bet_id string No Related bet ID (for WIN/LOSS events)
metadata object (optional)
metadata.device_type string No DESKTOP, MOBILE, TABLET, API, OTHER
metadata.ip_address string No Player's IP address
metadata.session_id string No Session identifier (max 100 chars)
metadata.user_agent string No Browser/app user agent (max 500 chars)

Response 202 Accepted

{
  "success": true,
  "message": "Event accepted for processing",
  "data": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "event_id": "evt_20250203_143245_abc123",
    "status": "RECEIVED"
  }
}
POST /api/v1/events/batch

Ingest multiple betting events in a single request. Recommended for high-throughput scenarios. Returns success/failure counts for each event.

Best for high throughput

Send up to 1000 events per request for optimal performance.

Request Body (Grouped Structure)

{
  "events": [
    {
      "event_id": "evt_001",
      "player": {
        "id": "player_123",
        "phone": "+221771234567",
        "country": "SEN"
      },
      "event": {
        "type": "DEPOSIT",
        "timestamp": "2026-01-31T12:00:00Z",
        "amount": 100000,
        "currency": "XOF"
      },
      "metadata": {
        "device_type": "MOBILE",
        "ip_address": "41.138.45.22"
      }
    },
    {
      "event_id": "evt_002",
      "player": {
        "id": "player_123"
      },
      "event": {
        "type": "BET",
        "timestamp": "2026-01-31T12:05:00Z",
        "amount": 50000,
        "currency": "XOF"
      },
      "game": {
        "type": "SPORTS",
        "name": "Senegal vs Mali",
        "sport": "football",
        "odds": 2.5
      }
    }
  ]
}

Response 200 OK

{
  "success": true,
  "total_count": 2,
  "success_count": 2,
  "failed_count": 0,
  "results": [
    {
      "index": 0,
      "event_id": "evt_001",
      "success": true,
      "uuid": "550e8400-e29b-41d4-a716-446655440000"
    },
    {
      "index": 1,
      "event_id": "evt_002",
      "success": true,
      "uuid": "550e8400-e29b-41d4-a716-446655440001"
    }
  ]
}
GET /api/v1/events/:uuid/status

Check the processing status of an event by its UUID.

Response 200 OK

{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "status": "PROCESSED",
  "processed_at": "2026-01-31T12:00:05Z"
}

API Playground

Test the API directly from your browser.

Credentials

Request

Response

Response will appear here after sending the request