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_TOKEN12345678910111213141516# Authenticatecurl -X POST https://api.ondara.io/v1/auth/anonymous \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json"
# Response{ "playerId": "pl_abc123", "accessToken": "eyJhbGciOiJSUzI1NiIs...", "refreshToken": "rt_xyz789...", "expiresIn": 3600}
# Use the access token for subsequent requestscurl https://api.ondara.io/v1/players/pl_abc123/data \ -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:
1234567{ "error": { "code": "INVALID_TOKEN", "message": "The access token has expired", "details": {} }}API requests are rate limited per project:
Rate limit headers are included in all responses:X-RateLimit-Remaining