Skip to content

Achievements API

Unlock an achievement for a player.

Auth: x-game-api-key header

Terminal window
curl -X POST https://api.questdata.io/v1/achievements/unlock \
-H "Content-Type: application/json" \
-H "x-game-api-key: YOUR_API_KEY" \
-d '{
"achievement_key": "beat_final_boss",
"player_id": "player-123"
}'
FieldTypeRequiredDescription
achievement_keystringYesAchievement identifier (defined in dashboard)
player_idstringYesPlayer identifier
{
"success": true,
"achievement": {
"key": "beat_final_boss",
"name": "Dragon Slayer",
"description": "Defeat the final boss",
"points": 100
},
"already_unlocked": false,
"total_points": 350
}

If the achievement was already unlocked, already_unlocked is true and success is still true.

StatusBodyCause
400{ "error": "..." }Missing required fields
404{ "error": "Achievement not found" }Invalid achievement_key

Fetch all achievements with optional player unlock status.

Auth: x-game-api-key header

Terminal window
curl "https://api.questdata.io/v1/achievements?player_id=player-123" \
-H "x-game-api-key: YOUR_API_KEY"
ParameterTypeDescription
player_idstringIf provided, includes unlock status per achievement
{
"achievements": [
{
"key": "beat_final_boss",
"name": "Dragon Slayer",
"description": "Defeat the final boss",
"icon_url": "",
"points": 100,
"hidden": false,
"unlocked": true,
"unlocked_at": "2026-04-08T14:30:00Z"
},
{
"key": "secret_room",
"name": "???",
"description": "???",
"icon_url": "",
"points": 50,
"hidden": true,
"unlocked": false,
"unlocked_at": null
}
],
"total_points": 500,
"unlocked_points": 100
}

Hidden achievements show "???" for name and description until unlocked.