Opt-in org-scoped gamification leaderboard (F4.GAM.06)
GET /organisations/{id}/leaderboard
GET
/organisations/{id}/leaderboard
Ranks organisation members by user-rank.xp_total, descending, top 50. Gated by organisation.leaderboard_enabled — returns 403 while that flag is false, even for an org admin (must be explicitly turned on; comparing employees’ XP is sensitive, never default-on). A member with user-rank.leaderboard_opt_out set is excluded even when they have the top XP. Members are resolved via an explicit organisation-member join — user-rank itself has no organisation relation (rank is portable across orgs, see F4.GAM.01/.08).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Responses
Section titled “ Responses ”OK
object
data
Array<object>
object
position
integer
user
object
id
integer
documentId
string
username
string
name
string
surname
string
xp_total
integer
rank_level
string
badge_count
integer
Missing or invalid authentication
Caller is not a member of this organisation, or leaderboard_enabled is false
Organisation not found