Gamification API for digital engagement and loyalty programmes

Launch missions, streaks, rewards and leaderboards in days — not months. A flexible REST API and programme management dashboard to run loyalty and retention directly inside your product.

Helping product teams drive retention, loyalty and measurable user behaviour inside digital products — from aviation and retail to lottery, education and beyond.

GameLayer is a gamification API platform for adding missions, rewards, and leaderboards to apps and websites.

FOR DEVELOPERS

Developer Quickstart Kit

Everything you need to integrate GameLayer in minutes — guides, API examples, Postman collections, and working client code.

  • 10-minute Quickstart Guide
  • In-depth Integration Guide
  • One-page API Cheat Sheet
  • Postman Collection with auto-discovery
  • Example clients (JavaScript, Python, C#)
  • curl scripts for core API flows
Direct download - no email required Works with any backend Try in Postman in 60 seconds Production & Dev environments included
# GameLayer API Quickstart

Get from zero to your first gamification integration in ~10 minutes.

> **Note:** The code examples in this guide are simplified for clarity. See the [full client libraries](../examples/) for production-ready implementations with error handling.

## Prerequisites

- A GameLayer account with an **API key** (get one from the [dashboard](https://app.gamelayer.co))
- At least one **event** configured in the dashboard
- An HTTP client (curl, Postman) or your language of choice

## Environments

| Environment | API Base URL | Dashboard |
|-------------|-------------|-----------|
| Production | `https://api.gamelayer.co/api/v0` | [app.gamelayer.co](https://app.gamelayer.co) |
| Development | `https://api.dev.gamelayer.co/api/v0` | [app.dev.gamelayer.co](https://app.dev.gamelayer.co) |

## Authentication

Every request needs two things:

| What | Where | Example |
|------|-------|---------|
| API key | `api-key` header | `api-key: your-api-key-here` |
| Account ID | `account` query param or request body | `account=my-account` |

```
GET /api/v0/events?account=my-account
Host: api.gamelayer.co
api-key: your-api-key-here
```

---

## Step 1: Create a Player

Players represent your users inside GameLayer. Use your own user ID as the player ID to keep the mapping simple.

### curl

```bash
curl -X POST https://api.gamelayer.co/api/v0/players \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "YOUR_ACCOUNT",
    "player": "user-123",
    "name": "Jane Doe"
  }'
```

### JavaScript (fetch)

```javascript
const BASE_URL = "https://api.gamelayer.co/api/v0";
const API_KEY = "YOUR_API_KEY";
const ACCOUNT = "YOUR_ACCOUNT";

const res = await fetch(`${BASE_URL}/players`, {
  method: "POST",
  headers: {
    "api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    account: ACCOUNT,
    player: "user-123",
    name: "Jane Doe",
  }),
});

const player = await res.json();
console.log(player);
```

### Python (requests)

```python
import requests

BASE_URL = "https://api.gamelayer.co/api/v0"
API_KEY = "YOUR_API_KEY"
ACCOUNT = "YOUR_ACCOUNT"

headers = {"api-key": API_KEY, "Content-Type": "application/json"}

res = requests.post(f"{BASE_URL}/players", headers=headers, json={
    "account": ACCOUNT,
    "player": "user-123",
    "name": "Jane Doe",
})

player = res.json()
print(player)
```

### Expected response (201 Created)

```json
{
  "player": "user-123",
  "name": "Jane Doe",
  "tags": [],
  "category": "",
  "imgUrl": "",
  "isAvailable": true,
  "points": 0,
  "credits": 0,
  "team": "",
  "level": { "id": "", "name": "", "description": "", "imgUrl": "", "ordinal": 0 },
  "createdOn": "2025-03-15T10:30:00.000Z"
}
```

The player starts with **0 points** and **0 credits**. Points accumulate over time and drive level progression. Credits are a spendable balance for the prize shop.

---

## Step 2: Set Up Gamification (Dashboard)

Before your player can earn rewards, you need game elements configured in the [GameLayer Dashboard](https://app.gamelayer.co) (or [dev dashboard](https://app.dev.gamelayer.co)):

- **Events** — the actions your users take (e.g., "complete-lesson", "make-purchase")
- **Missions** — goals with objectives tied to events (e.g., "Complete 5 lessons this week")
- **Achievements** — step-based milestones (e.g., "Complete 10 missions")
- **Levels** — progression tiers based on accumulated points
- **Prizes** — reward shop items redeemable with credits

If you're using a development account, sample elements may already be configured for you.

---

## Step 3: Complete an Event

This is the core integration point. When a user performs an action in your app, call `POST /events/{id}/complete`. GameLayer handles the rest through the **progression cascade** — a single call can trigger mission progress, achievement steps, level ups, streak updates, and leaderboard changes.

### curl

```bash
curl -X POST https://api.gamelayer.co/api/v0/events/complete-lesson/complete \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "YOUR_ACCOUNT",
    "player": "user-123",
    "count": 1
  }'
```

### JavaScript

```javascript
const res = await fetch(`${BASE_URL}/events/complete-lesson/complete`, {
  method: "POST",
  headers: {
    "api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    account: ACCOUNT,
    player: "user-123",
    count: 1,
  }),
});

const result = await res.json();
console.log("Points earned:", result.progress.points.earned);
console.log("Missions completed:", result.progress.missions);
```

### Python

```python
res = requests.post(
    f"{BASE_URL}/events/complete-lesson/complete",
    headers=headers,
    json={
        "account": ACCOUNT,
        "player": "user-123",
        "count": 1,
    },
)

result = res.json()
print("Points earned:", result["progress"]["points"]["earned"])
print("Missions completed:", result["progress"]["missions"])
```

### Expected response (200 OK)

```json
{
  "event": {
    "id": "complete-lesson",
    "name": "Complete Lesson",
    "reward": { "points": 10, "credits": 5, "achievements": [] }
  },
  "player": { "name": "Jane Doe", "points": 10, "credits": 5 },
  "progress": {
    "points": { "before": 0, "earned": 10 },
    "credits": { "before": 0, "earned": 5 },
    "missions": [],
    "startedMissions": [
      { "id": "weekly-challenge", "name": "Weekly Challenge", "description": "Complete 5 lessons this week", "imgUrl": "..." }
    ],
    "achievements": [],
    "unlockedAchievements": [],
    "levels": { "completed": [], "started": {} },
    "completedStreaks": [],
    "activeStreaks": [],
    "rules": []
  }
}
```

**Reading the `progress` object:**

| Field | Meaning |
|-------|---------|
| `points.earned` | Total points earned from this cascade (after rule multipliers) |
| `credits.earned` | Total credits earned |
| `missions` | Missions **completed** by this event (with reward details) |
| `startedMissions` | Missions that **started** progressing |
| `achievements` | Achievements **completed** |
| `unlockedAchievements` | Achievements that received steps but aren't complete yet |
| `levels.completed` | Levels the player advanced through |
| `levels.started` | The player's new current level (if they leveled up) |
| `completedStreaks` | Streaks that completed |
| `activeStreaks` | Streaks that incremented |

---

## Step 4: Check Player Progress

Query specific progress areas to build your UI.

### Get player missions

```bash
curl "https://api.gamelayer.co/api/v0/players/user-123/missions?account=YOUR_ACCOUNT&completion=all" \
  -H "api-key: YOUR_API_KEY"
```

```javascript
const res = await fetch(
  `${BASE_URL}/players/user-123/missions?account=${ACCOUNT}&completion=all`,
  { headers: { "api-key": API_KEY } }
);
const data = await res.json();
console.log("Started missions:", data.missions.started);
console.log("Completed missions:", data.missions.completed);
```

```python
res = requests.get(
    f"{BASE_URL}/players/user-123/missions",
    headers=headers,
    params={"account": ACCOUNT, "completion": "all"},
)
data = res.json()
print("Started:", data["missions"]["started"])
print("Completed:", data["missions"]["completed"])
```

### Get player achievements

```bash
curl "https://api.gamelayer.co/api/v0/players/user-123/achievements?account=YOUR_ACCOUNT" \
  -H "api-key: YOUR_API_KEY"
```

### Get player levels

```bash
curl "https://api.gamelayer.co/api/v0/players/user-123/levels?account=YOUR_ACCOUNT" \
  -H "api-key: YOUR_API_KEY"
```

---

## Step 5: Prize Economy

Players spend **credits** to claim prizes from your reward shop.

### List available prizes

```bash
curl "https://api.gamelayer.co/api/v0/prizes?account=YOUR_ACCOUNT&player=user-123" \
  -H "api-key: YOUR_API_KEY"
```

Passing `player` filters to only prizes the player is eligible for (meets requirements and has stock).

### Claim a prize

```bash
curl -X POST https://api.gamelayer.co/api/v0/prizes/cup-coffee/claim \
  -H "api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "YOUR_ACCOUNT",
    "player": "user-123"
  }'
```

```javascript
const res = await fetch(`${BASE_URL}/prizes/cup-coffee/claim`, {
  method: "POST",
  headers: {
    "api-key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    account: ACCOUNT,
    player: "user-123",
  }),
});

const claim = await res.json();
console.log("Claim result code:", claim.code);
console.log("Remaining credits:", claim.player.credits);
```

```python
res = requests.post(
    f"{BASE_URL}/prizes/cup-coffee/claim",
    headers=headers,
    json={"account": ACCOUNT, "player": "user-123"},
)

claim = res.json()
print("Claim result:", claim["code"])
print("Remaining credits:", claim["player"]["credits"])
```

### Claim response codes

| Code | Meaning |
|------|---------|
| `2` | **REDEEMED** — success, credits deducted |
| `3` | NOT_ENOUGH_CREDITS — insufficient balance |
| `4` | OUT_OF_STOCK — no stock remaining |
| `5` | COUNT_EXCEEDED — player hit their redemption limit for this period |

---

## What's Next

- **[Integration Guide](integration-guide.md)** — Common patterns, architecture guidance, and advanced scenarios
- **[API Cheat Sheet](cheat-sheet.md)** — One-page reference of all endpoints and parameters
- **[Postman Collection](../postman/)** — Import and explore the API interactively
- **[Code Examples](../examples/)** — Copy-paste client libraries in JavaScript, Python, C#, and curl
- **[API Reference](https://gamelayer.io/api-docs)** — Full interactive documentation with try-it-out

Add some STICKY to your site or app

Design modular engagement loops — powered by a flexible suite of API-driven mechanics.

Gamification mechanics engagement loop

A modular engagement loop - combine progression, competition and rewards

GameLayer gives you building blocks that connect — so you can design repeatable loops, progression, and rewards without rebuilding logic in your app. Mix and match mechanics, tune behaviours with rules, and evolve programmes over time.

Designed for real engagement — not short-term gimmicks

Open API

Build engagement directly into your product with a flexible REST API. Send events, evaluate rules, and award outcomes in real time — without hardcoding gamification logic into your app.

Content Dashboard

Give product and marketing teams a place to manage programme content — missions, copy, images, and configurations — without shipping new releases. Keep programmes fresh while engineering stays focused.

Rules Manager

Control how mechanics behave using eligibility, limits, and budgets. Launch safely, prevent abuse, and tune programmes based on performance — not guesswork.

Missions
Define structured objectives that guide users toward meaningful actions — onboarding, learning, referrals, or repeat engagement.
Streaks
Reinforce consistency over time. Streaks turn repeat behaviour into a habit loop with clear momentum.
Achievements
Recognise milestones and progress with permanent rewards that build status and long-term motivation.
Level-Ups
Create progression that users can feel. Levels unlock new states, status, and increasing challenge over time.
Leaderboards
Add social motivation with visibility and friendly competition — individual, team, or segment-based.
Mystery Wins
Introduce surprise and delight with randomized rewards that keep engagement feeling fresh.
Prizes
Convert effort into tangible outcomes. Offer guaranteed rewards, redeemables, or perks with controlled budgets.
Raffles
Run prize draws based on participation or eligibility — ideal for campaigns, milestones, and periodic events.
Quizzes
Add lightweight interactive moments for knowledge, onboarding, and engagement — standalone or as mission objectives.
Virtual Currencies
Power earning and spending loops with balances and progression — configurable for your programme design.
Modular mechanics can be used alone or combined to support different engagement and loyalty use cases

How GameLayer drives measurable business outcomes

GameLayer turns engagement mechanics into real performance results — from higher retention and loyalty to behaviour change and revenue-driving actions.

Engagement Depth

Turn passive users into active participants

Structured missions, challenges and progression give users clear reasons to engage — moving them from browsing to meaningful interaction.

Retention Frequency

Create repeat usage without constant promotions

Streaks, levels and ongoing goals build habits around your product, increasing visit frequency and long-term retention.

Revenue-Linked Actions

Drive actions that impact growth

Guide users toward purchases, referrals, learning or feature adoption using targeted objectives and rewards — not just generic engagement.

Measurable Behaviour Change

Understand what actually drives behaviour

Track participation, progression and outcomes so teams can see which mechanics influence users — and optimise programs over time.

Powered by GameLayer

GameLayer powers real engagement and loyalty systems inside live digital products. The examples below show how the same core mechanics — missions, progression, rewards and rules — are applied to very different business models.

Finnair - GameLayer implementation screenshot

Finnair | Airline

Driving repeat engagement beyond transactions. GameLayer powers missions, rewards and progression mechanics that encourage return visits, deeper product use and long-term customer relationships.

Reima - GameLayer implementation screenshot

Reima | Retail

Turning physical activity and learning into digital engagement. GameLayer powers seasonal challenges, daily streaks and achievements that connect real-world behaviour to brand interaction.

Veikkaus Points - GameLayer implementation screenshot

Veikkaus Points | National Lottery

Adding progression and rewards on top of regulated gaming experiences. GameLayer enables missions, tiers, and campaigns that increase participation while respecting platform rules and constraints.

Step-Up - GameLayer implementation screenshot

Step-Up | Wellbeing

Encouraging healthy behaviour through structured engagement loops. GameLayer powers challenges, progression systems and team-based mechanics that motivate ongoing participation.

Learn more about Step-Up
Finnair - GameLayer customer
Reima - GameLayer customer
Veikkaus - GameLayer customer
Samsung - GameLayer customer
Kesko - GameLayer customer
Baaz - GameLayer customer
Dubbz - GameLayer customer
Symbaloo - GameLayer customer
Lahti - GameLayer customer
SDP - GameLayer customer

Why companies choose GameLayer

GameLayer is chosen by teams that need engagement mechanics to work reliably at scale — across products, users, and real-world programmes.

1
Sustainable engagement by design
Design programmes for repeat participation — not one-off campaigns. Use missions, streaks, and rewards to create long-term engagement loops that keep users coming back without relying on constant promotions or manual effort.
2
Progress users can clearly feel
Make improvement visible and motivating. Show progress through XP, levels, and achievements so users always know what they're working towards — building momentum and sustained motivation over time.
3
Social motivation that scales
Turn individual actions into shared experiences - at scale. Use teams, leaderboards, and friendly competition to encourage participation through collaboration and social proof — not pressure or gimmicks.
4
Built for real-world programmes
Run production-ready engagement with confidence. Control rules, eligibility, budgets, and rewards in one system. Launch safely, evolve programmes over time, and scale without re-engineering your product.
75%
of users engaged weekly
60%
boost in brand sentiment
25%
increase in session time
200%
increase in task completion
50%
boost in product awareness
40%
increase in no. of sessions
Metrics are indicative and vary by implementation and use case

Simple, transparent pricing

Choose a plan based on programme size — not features. Every plan includes full access to GameLayer's engagement mechanics, replacing the need to build and maintain complex in-house engagement systems.

Core

€100 month
  • Up to 1,000 active users
  • Technical & Implementation Support: Email
  • Concept & Programme Design Support: Ask for pricing
  • Analytics & Reporting: Dashboard

Growth

€1,500 month
  • Up to 50,000 active users
  • Technical & Implementation Support: Slack
  • Concept & Programme Design Support: Ask for pricing
  • Analytics & Reporting: Weekly reports & monthly insights

Scale

€3,500 month
  • Up to 250,000 active users
  • Technical & Implementation Support: Slack
  • Concept & Programme Design Support: Included (on request)
  • Analytics & Reporting: Weekly reports & monthly insights

Enterprise

€TBA month
  • Above 500,000 active users
  • Technical & Implementation Support: Customer specific
  • Concept & Programme Design Support: Included (on request)
  • Analytics & Reporting: Customer specific

These plans represent common programme sizes. GameLayer pricing scales flexibly across additional usage tiers — Contact us for more details.

Free plan available for testing - up to 100 users
GameLayer gamification platform - digital engagement and loyalty points system

Start building engagement that lasts

Whether you're experimenting or scaling in production, GameLayer gives you the tools to design engagement mechanics that fit your product - quickly and safely.

Free plan includes usage limits - No credit card required