Console
Achievements

Create Achievement

Define a new achievement for your app. The slug must be unique within your app and cannot be reused after deletion.

POST /api/achievements/create.php
Requires Authorization: AppID:AppKey header

Request body

FieldTypeRequiredDescription
slugstringrequiredUnique identifier [a-z0-9_-]. E.g. first_kill
namestringrequiredDisplay name shown to users
descriptionstringoptionalWhat the user must do to unlock
iconstringoptionalURL of the achievement icon
raritystringoptionalcommon (default), uncommon, rare, epic, legendary
xpintoptionalXP granted on unlock. Default: 0
secretbooloptionalHidden until unlocked. Default: false

Success response 200

{
  "success": true,
  "achievement": {
    "id": 1,
    "app_id": "com.myapp.game",
    "slug": "first_kill",
    "name": "First Kill",
    "description": "Get your first kill",
    "icon": null,
    "rarity": "common",
    "xp": 100,
    "secret": false,
    "created_at": "2026-05-29 14:00:00"
  }
}

Errors

CodeMessageCause
401Authorization header with appid:appkey is required.Missing or malformed header
401Invalid app credentials.AppID or AppKey not recognized
400slug and name are required.Missing required fields
400Invalid slug format.Slug contains characters outside [a-z0-9_-]
400Invalid rarity value.Rarity must be one of the five defined values
409A achievement with this slug already exists for this app.Duplicate slug