Complete REST API documentation. Use this for custom integrations or platforms without an official SDK.
https://api.ondara.io/v1X-API-Key: YOUR_API_KEYAuthorization: Bearer ACCESS_TOKEN1# Authenticate2curl -X POST https://api.ondara.io/v1/auth/anonymous \3 -H "X-API-Key: YOUR_API_KEY" \4 -H "Content-Type: application/json"5
6# Response7{8 "playerId": "pl_abc123",9 "accessToken": "eyJhbGciOiJSUzI1NiIs...",10 "refreshToken": "rt_xyz789...",11 "expiresIn": 360012}13
14# Use the access token for subsequent requests15curl https://api.ondara.io/v1/players/pl_abc123/data \16 -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."/auth/anonymous/auth/email/register/auth/email/login/auth/google/auth/refresh/auth/logout/players/{id}/data/players/{id}/data/{key}/players/{id}/data/{key}/players/{id}/data/{key}/players/{id}/data/saves/saves/{key}/saves/{key}/saves/{key}/leaderboards/{id}/leaderboards/{id}/scores/leaderboards/{id}/player/economy/currencies/economy/currencies/{id}/add/economy/currencies/{id}/subtract/economy/inventory/economy/purchaseAll responses are JSON. Successful responses include the data directly. Error responses follow this format:
1{2 "error": {3 "code": "INVALID_TOKEN",4 "message": "The access token has expired",5 "details": {}6 }7}API requests are rate limited per project:
Rate limit headers are included in all responses:X-RateLimit-Remaining