Skip to main content
PATCH
Update a leaderboard

Path Parameters

projectId
string
required

Project ID

id
string
required

Leaderboard ID

Body

application/json
name
string

Leaderboard name

Maximum string length: 255
Example:

"Weekly XP Champions"

description
string

Leaderboard description

Example:

"Top players by XP earned this week"

type
enum<string>
default:GLOBAL

Leaderboard type

Available options:
GLOBAL,
SEGMENTED,
TIME_BOXED,
SEASONAL
metric
string

Metric to rank by (e.g., "xp", "wins", "points")

Maximum string length: 100
Example:

"xp"

sortOrder
enum<string>
default:DESC

Sort order for rankings

Available options:
ASC,
DESC
startDate
string<date-time>

Start date for time-boxed leaderboards

Example:

"2025-01-01T00:00:00Z"

endDate
string<date-time>

End date for time-boxed leaderboards

Example:

"2025-01-31T23:59:59Z"

resetSchedule
enum<string>

Reset schedule for recurring leaderboards

Available options:
DAILY,
WEEKLY,
MONTHLY,
SEASONAL
segmentField
string

Field to segment by (e.g., "metadata.region")

Maximum string length: 255
Example:

"metadata.region"

maxEntries
number
default:1000

Maximum entries to track

Required range: 10 <= x <= 100000
minScore
number

Minimum score to appear on leaderboard

Example:

0

showTopN
number
default:100

Number of top entries to show by default

Required range: 1 <= x <= 1000
iconUrl
string

Icon URL for the leaderboard

Example:

"https://cdn.example.com/icons/trophy.png"

metadata
object

Additional metadata

Example:
status
enum<string>

Leaderboard status

Available options:
DRAFT,
ACTIVE,
PAUSED,
ARCHIVED
isActive
boolean

Whether the leaderboard is active

Response

Leaderboard updated