Developer Portal

API
Documentation

Clean REST and WebSocket APIs designed for AI agents to understand, query, and operate.

API Overview

Our API follows REST conventions with consistent response formats, meaningful error codes, and comprehensive documentation. Every endpoint is designed for programmatic access.

Base URL https://api.everpoolgaming.com/v1
Authentication

All API requests require a Bearer token in the Authorization header.

Authorization: Bearer <jwt_token>

REST API Endpoints

Core endpoints for game operations, user management, and analytics.

Authentication

POST /auth/login

Authenticate user and receive JWT token.

// Request
{
  "email": "user@example.com",
  "password": "********"
}

// Response
{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "user": {
    "id": "usr_abc123",
    "email": "user@example.com",
    "credits": 100
  }
}

Games

GET /games

List all available games with current state.

// Response
{
  "games": [
    {
      "id": "asian_dragon",
      "name": "Asian Dragon",
      "theme": "asian_dragon",
      "isEnabled": true,
      "ticketPrice": 1,
      "ticketsRemaining": 4521,
      "topPrize": 500
    }
  ]
}
GET /deck/{gameId}

Get current deck state for a specific game.

// Response
{
  "game": {
    "id": "asian_dragon",
    "name": "Asian Dragon",
    "ticketPrice": 1,
    "mode": "multiplayer"
  },
  "deck": {
    "totalTickets": 5000,
    "ticketsRemaining": 4521,
    "prizePool": 3900
  },
  "claims": [
    { "prize": 50, "timestamp": "2026-01-21T10:30:00Z" }
  ]
}
POST /draw

Draw a ticket from a game deck. Server-authoritative outcome.

// Request
{
  "gameId": "asian_dragon"
}

// Response
{
  "ticket": {
    "id": "tkt_xyz789",
    "symbols": [3, 1, 5, 2, 3, 3, 4, 1, 6],
    "prize": 10,
    "winLines": ["h2"]
  },
  "user": {
    "credits": 109
  }
}

User Management

GET /user/profile

Get current user profile and credits.

// Response
{
  "user": {
    "id": "usr_abc123",
    "email": "user@example.com",
    "credits": 100,
    "dailyCreditsUsed": 25,
    "dailyCreditsLimit": 100,
    "totalPlays": 1547,
    "totalWins": 12450
  }
}
GET /user/history

Get user's play history with full transaction details.

// Response
{
  "history": [
    {
      "ticketId": "tkt_xyz789",
      "gameId": "asian_dragon",
      "timestamp": "2026-01-21T10:30:00Z",
      "wager": 1,
      "prize": 10,
      "symbols": [3, 1, 5, 2, 3, 3, 4, 1, 6]
    }
  ],
  "pagination": {
    "cursor": "eyJsYXN0S2V5Ijo...",
    "hasMore": true
  }
}

Analytics & Reporting

GET /admin/analytics/game/{gameId}

Get comprehensive analytics for a specific game.

// Response
{
  "gameId": "asian_dragon",
  "analytics": {
    "totalPlays": 15420,
    "totalWagered": 15420,
    "totalPaid": 12028,
    "actualPayback": 0.78,
    "targetPayback": 0.78,
    "uniquePlayers": 342,
    "peakConcurrent": 28
  }
}
POST /admin/reports/compliance

Generate compliance report for specified date range.

// Request
{
  "startDate": "2026-01-01",
  "endDate": "2026-01-21",
  "format": "pdf"
}

// Response
{
  "reportId": "rpt_compliance_20260121",
  "downloadUrl": "https://...",
  "generatedAt": "2026-01-21T11:00:00Z"
}

WebSocket API

Real-time bidirectional communication for live multiplayer features.

WebSocket URL wss://ws.everpoolgaming.com

Connection & Events

WS connect

Establish WebSocket connection with authentication.

// Connection with auth token
const ws = new WebSocket('wss://ws.everpoolgaming.com?token=JWT_TOKEN');

// Subscribe to game room
ws.send(JSON.stringify({
  "action": "joinGame",
  "gameId": "asian_dragon"
}));
WS events

Server-pushed events for real-time updates.

// Player joined game
{
  "type": "playerJoined",
  "data": {
    "playerId": "usr_abc123",
    "displayName": "Player42",
    "activePlayers": 12
  }
}

// Win announcement
{
  "type": "winAnnouncement",
  "data": {
    "playerId": "usr_def456",
    "displayName": "LuckyPlayer",
    "prize": 100,
    "gameName": "Asian Dragon"
  }
}

// Chat message
{
  "type": "chatMessage",
  "data": {
    "from": "Player42",
    "message": "Nice win!",
    "timestamp": "2026-01-21T10:30:00Z"
  }
}

Error Handling

Consistent error responses across all endpoints.

400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing token
402 Payment Required - Insufficient credits
404 Not Found - Resource doesn't exist
409 Conflict - Resource already claimed/used
429 Rate Limited - Too many requests
500 Server Error - Internal error occurred
// Error response format
{
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "Not enough credits to play this game",
    "details": {
      "required": 5,
      "available": 2
    }
  }
}

Ready to Integrate?

Explore the platform or contact us for API access.

Explore Demo Technical Overview