Introduction
GameAPI Pro provides a comprehensive REST API for integrating professional gaming content into your platform. Our API is designed to be simple, reliable, and powerful.
Base URL
https://api.gameapi.pro/v1
Authentication
All API requests require authentication using an API key. Include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
Get your API key from your account dashboard.
Quick Start
Get up and running in 5 minutes:
- Get your API key from the dashboard
- Install the SDK for your language
- Initialize the client with your API key
- Call game endpoints
- Handle webhooks for real-time updates
REST API
Our API follows REST conventions. All responses are in JSON format.
Example Request
GET /v1/games HTTP/1.1
Host: api.gameapi.pro
Authorization: Bearer YOUR_API_KEY
Example Response
{
"status": "success",
"data": {
"games": [...],
"count": 120
}
}
Main Endpoints
Games
GET /games - List all available games
GET /games/{id} - Get specific game details
Players
POST /players - Create new player
GET /players/{id} - Get player info
PUT /players/{id} - Update player
Sessions
POST /sessions - Start game session
GET /sessions/{id} - Get session status
POST /sessions/{id}/end - End session
Transactions
GET /transactions - List transactions
POST /transactions - Record transaction
Webhooks
Receive real-time notifications for game events:
- game.started - Game session started
- game.completed - Game session completed
- transaction.created - New transaction
- player.joined - New player joined
Error Handling
API errors are returned with appropriate HTTP status codes:
Game Initialization
Initialize a game session before starting gameplay:
POST /sessions
{
"game_id": "aviator",
"player_id": "player_123",
"currency": "USD",
"bet_amount": 10.00
}
Player Management
Manage player accounts and profiles:
POST /players
{
"username": "player123",
"email": "player@example.com",
"country": "US",
"currency": "USD"
}
Transactions
Record game transactions:
POST /transactions
{
"player_id": "player_123",
"type": "win",
"amount": 25.50,
"game_id": "aviator",
"session_id": "session_456"
}
Reporting & Analytics
Access real-time analytics and reporting:
GET /analytics/daily?date=2024-01-15&game_id=aviator
PHP SDK
composer require gameapi/php-sdk
$client = new GameAPI\Client('YOUR_API_KEY');
$games = $client->games()->list();
JavaScript SDK
npm install gameapi-js
const GameAPI = require('gameapi-js');
const client = new GameAPI('YOUR_API_KEY');
Python SDK
pip install gameapi-python
import gameapi
client = gameapi.Client('YOUR_API_KEY')
C# SDK
Install-Package GameAPI.CSharp
var client = new GameAPIClient("YOUR_API_KEY");