API Reference
Complete documentation for Gami Protocol REST API
Authentication
All API requests require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Get your API key from the developer dashboard after creating an account.
Endpoints
POST
/api/v1/questsCreate a new quest
curl -X POST https://api.gami.io/v1/quests \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Complete Tutorial", "reward": {"xp": 100}}'GET
/api/v1/users/:id/progressGet user progress and XP
curl https://api.gami.io/v1/users/user123/progress \
-H "Authorization: Bearer YOUR_API_KEY"POST
/api/v1/users/:id/rewardsAward reward to user
curl -X POST https://api.gami.io/v1/users/user123/rewards \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"type": "xp", "amount": 50}'GET
/api/v1/leaderboardFetch global leaderboard
curl https://api.gami.io/v1/leaderboard?limit=100&offset=0 \
-H "Authorization: Bearer YOUR_API_KEY"Response Format
All responses are returned as JSON with standard HTTP status codes:
200 OKSuccessful request
201 CreatedResource created
400 Bad RequestInvalid parameters
401 UnauthorizedInvalid API key
Rate Limiting
API requests are rate-limited to prevent abuse:
- • Free tier: 100 requests per minute
- • Pro tier: 1,000 requests per minute
- • Enterprise: Custom limits available