Amba

Achievements

All visible achievements with the current user's progress + unlock state.

/client/achievements hides is_hidden = true achievements the user hasn't unlocked; hidden unlocked achievements are still returned so the UI can reveal them.

Source: apps/api/src/routes/client/achievements.ts.

Endpoints

MethodPathDescription
GET/client/achievementsAll visible achievements with per-user progress.
GET/client/achievements/:achievementIdOne achievement with progress.

GET /client/achievements

Response 200

{
  "data": [
    {
      "id": "…",
      "key": "first_workout",
      "name": "First Workout",
      "description": "…",
      "icon_url": "…",
      "xp_reward": 10,
      "criteria": { "target_value": 1 },
      "is_hidden": false,
      "sort_order": 0,
      "unlocked_at": null,
      "progress": { "current_value": 0, "target_value": 1 }
    }
  ]
}

Errors

  • 500 FETCH_FAILED.

Try it:

GET/client/achievements
client auth
curl -X GET 'https://api.amba.dev/client/achievements'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/client/achievements' \
  -H 'X-Api-Key: ${CLIENT_API_KEY}' \
  -H 'Authorization: Bearer ${SESSION_TOKEN}'

GET /client/achievements/:achievementId

Response 200

Same single-achievement shape as above.

Errors

  • 404 FETCH_FAILED — achievement not found (returns 404 with code: FETCH_FAILED).
  • 500 FETCH_FAILED.

Try it:

GET/client/achievements/%7B%7BachievementId%7D%7D
client auth
curl -X GET 'https://api.amba.dev/client/achievements/%7B%7BachievementId%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/client/achievements/{achievementId}' \
  -H 'X-Api-Key: ${CLIENT_API_KEY}' \
  -H 'Authorization: Bearer ${SESSION_TOKEN}'

On this page