Leaderboards
Update Leaderboard
Update the display name, points label, or sort direction of a leaderboard. Existing scores are not affected.
POST
/api/leaderboards/update.php
Requires
Authorization: AppID:AppKey headerRequest body
| Field | Type | Required | Description |
|---|---|---|---|
| slug | string | required | Identifies the leaderboard to update |
| name | string | optional | New display name |
| points_name | string | optional | New score unit label |
| sort_order | string | optional | desc or asc |
Test this endpoint
Headers
Body
Success response 200
{
"success": true,
"leaderboard": {
"id": 1,
"app_id": "com.myapp.game",
"slug": "goals",
"name": "Top Scorers",
"points_name": "Goals",
"sort_order": "desc"
}
}
Errors
| Code | Message | Cause |
|---|---|---|
| 400 | slug is required. | Missing identifier |
| 404 | Leaderboard not found. | Slug doesn't exist for this app |