Game API Overview
The Game API is for backend-to-backend integration. All endpoints require a secret key via the X-API-Secret header. Never expose secret keys in client-side code.
Base URL
Section titled “Base URL”https://api.gamifyhost.comAuthentication
Section titled “Authentication”Include your secret key in every request:
X-API-Secret: sk_live_your_secret_keySee Authentication for details.
Endpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
POST | /v1/points/award | Award points to a user |
GET | /v1/users/:userId/balance | Get user balance & profile |
GET | /v1/users/:userId/history | Get user point history |
Typical Use Cases
Section titled “Typical Use Cases”- User signup — Award points when a new user creates an account
- Purchase completed — Award points proportional to order value
- Referral — Award points when a referred user signs up
- Profile completion — Award points for filling in profile details
- Daily login — Award points for returning users
- Content engagement — Award points for reading articles, watching videos, etc.
Idempotency
Section titled “Idempotency”The reference field on the Award Points endpoint acts as an idempotency key. If you send the same reference for the same eventType, the API returns a 409 Conflict instead of double-awarding points. Use this to safely retry failed requests.