Skip to main content

Tournament Platform API

The Tournament Platform provides comprehensive REST APIs for integrating real-time multiplayer tournaments into casino systems and game platforms. Our APIs are designed for reliability, scalability, and ease of integration.

API Overview

The Tournament Platform offers two distinct API sets:

Base URL

Production Environment

https://ts.playservices.tech/api
This is the production Tournament Platform API. Use appropriate testing strategies and start with small-scale tournaments during initial integration.

Authentication

The Tournament Platform uses Bearer Token authentication with different API keys for different integration types:

Casino Integration (External APIs)

  • API Key Format: sk_live_... (production)
  • Usage: Tournament management, player registration, results retrieval
  • Permissions: Operator-specific access to tournaments and players
curl -H "Authorization: Bearer sk_live_your_casino_api_key_here" \
  https://ts.playservices.tech/api/tournaments

Game Platform (Internal APIs)

  • API Key Format: internal_...
  • Usage: JWT validation, room management, tournament configuration
  • Permissions: Access to internal game-specific endpoints
curl -H "Authorization: Bearer internal_your_game_platform_key" \
  https://ts.playservices.tech/api/internal/auth/validate-token
Keep your API keys secure and never expose them in client-side code. API keys provide access to sensitive tournament and player data.

Rate Limiting

The Tournament Platform enforces rate limits to ensure service reliability:
API TypeRate LimitBurst Limit
Casino Integration1000 requests/minute100 requests/10s
Game Platform5000 requests/minute500 requests/10s
WebhooksNo limit-
When you exceed rate limits, you’ll receive a 429 Too Many Requests response with a Retry-After header indicating when to retry.

Request/Response Format

Content Type

All API endpoints accept and return application/json. Always include the Content-Type header in POST/PUT requests:
curl -X POST \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "Daily Championship"}' \
  https://ts.playservices.tech/api/tournaments

Response Structure

All API responses follow a consistent format: Success Response (200-299):
{
  "tournamentId": "12345",
  "name": "Daily Championship",
  "status": "scheduled",
  ...
}
Error Response (400-599):
{
  "error": "tournament_not_found",
  "message": "Tournament with ID 12345 does not exist",
  "details": {
    "tournamentId": "12345",
    "timestamp": "2024-01-15T20:30:00Z"
  }
}

Error Handling

HTTP Status Codes

CodeDescriptionCommon Causes
200SuccessRequest completed successfully
201CreatedResource created (tournaments, players)
400Bad RequestInvalid request parameters or format
401UnauthorizedInvalid or missing API key
403ForbiddenAPI key lacks required permissions
404Not FoundTournament, player, or resource not found
409ConflictResource conflict (duplicate registration)
429Too Many RequestsRate limit exceeded
500Internal Server ErrorTemporary server issue

Error Codes

Common error codes and their meanings:
Error CodeDescriptionResolution
invalid_api_keyAPI key format invalidCheck key format and environment
tournament_not_foundTournament doesn’t existVerify tournament ID
player_already_registeredPlayer already in tournamentCheck existing registrations
tournament_fullMax players reachedIncrease limit or use waiting list
insufficient_balancePlayer lacks fundsVerify account balance
tournament_startedCannot modify active tournamentOnly modify before start

Pagination

List endpoints support pagination using limit and offset parameters:
GET /api/tournaments?limit=50&offset=100
Response includes pagination metadata:
{
  "tournaments": [...],
  "pagination": {
    "total": 1247,
    "limit": 50,
    "offset": 100,
    "hasMore": true
  }
}

Filtering & Sorting

Most list endpoints support filtering and sorting:
GET /api/tournaments?status=in_progress&gameSlug=crash-classic&sort=createdAt:desc
Common filter parameters:
  • status - Filter by tournament status
  • gameSlug - Filter by game type
  • startDate / endDate - Filter by date range
  • minPlayers / maxPlayers - Filter by player count

Event Notifications

The Tournament Platform sends real-time tournament event notifications via SQS transport. Webhook endpoints are configured at the transport level, not via API.

Event Documentation

Complete guide to tournament event handling and SQS integration

SDKs & Libraries

Official SDKs are available for popular programming languages:

JavaScript/Node.js

npm install @tournament-platform/js-sdk

PHP

composer require tournament-platform/php-sdk

Python

pip install tournament-platform-sdk

Interactive API Explorer

Use the interactive API explorer below to test endpoints with your API keys:
The API explorer uses the OpenAPI specification to provide real-time API testing. Use appropriate testing strategies when working with the production API.

Common Workflows

1. Tournament Creation & Management

  1. Create Tournament - Set up new tournament
  2. Update Tournament - Modify before start
  3. List Tournaments - View all tournaments
  4. Get Tournament - Retrieve details

2. Player Registration & Management

  1. Register Player - Add player to tournament
  2. Process Rebuy - Handle additional entries
  3. List Players - View tournament participants

3. Results & Leaderboards

  1. Get Leaderboard - Real-time rankings
  2. Get Results - Final tournament results
  3. Player History - Historical performance

4. Game Platform Integration

  1. Validate JWT - Authenticate player access
  2. Get Config - Retrieve tournament settings
  3. Report Events - Send game events

Support & Resources

API Changelog

Stay updated on API changes and new features:
  • v1.0.0 (Current) - Initial release with full tournament management
  • All breaking changes will be announced 30 days in advance
  • Deprecated endpoints will be supported for 6 months minimum
Subscribe to our developer newsletter for API updates and new feature announcements.