Skip to main content
POST
JavaScript

Authorizations

X-API-KEY
string
header
required

Headers

Tenant-ID
string

The tenant identifier for multi-tenant organisations. Required when the organisation has multi-tenancy enabled. Pass your own internal customer ID for the tenant. Ignored for single-tenant organisations.

Body

application/json

Array of leaderboards to create.

Required array length: 1 - 100 elements
name
string
required

The leaderboard name.

Example:

"Revenue Champions"

key
string
required

The leaderboard key. Only alphanumeric characters, hyphens, and underscores are permitted.

Pattern: ^[a-zA-Z\d-_]+$
Example:

"revenue-champions"

rankBy
enum<string>
required

What the leaderboard ranks by.

Available options:
metric,
streak,
points
Example:

"metric"

description
string

The leaderboard description.

Example:

"Ranked by monthly revenue"

status
enum<string>
default:inactive

The initial user-facing status. Defaults to inactive. Use scheduled for leaderboards that should be active in the future and finished only when creating a leaderboard with an end date in the past.

Available options:
inactive,
active,
scheduled,
finished
Example:

"inactive"

metricId
string<uuid>

The metric ID to rank by when rankBy is metric.

pointsSystemId
string<uuid>

The points system ID to rank by when rankBy is points.

maxParticipants
integer | null
default:1000

The maximum number of participants. Defaults to 1000.

Required range: 1 <= x <= 1000
Example:

100

start
string<date>

The leaderboard start date in YYYY-MM-DD format. Defaults to today when omitted.

Example:

"2026-04-20"

end
string<date>

The optional leaderboard end date in YYYY-MM-DD format.

Example:

"2026-05-20"

startTime
string

When set, ranking only counts activity at or after this time of day in the user's timezone (HH:mm format).

Pattern: ^([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$
Example:

"09:00"

endTime
string

When set, ranking only counts activity before this time of day in the user's timezone (HH:mm format).

Pattern: ^([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$
Example:

"17:00"

breakdownAttributes
string<uuid>[]

The UUIDs of the active user attributes to break rankings down by.

runUnit
enum<string>

How often the leaderboard repeats. Omit for a non-recurring leaderboard. Streak leaderboards cannot repeat.

Available options:
day,
month,
year
Example:

"month"

runInterval
integer

The number of runUnits between repeats. Required when runUnit is set.

Required range: x >= 1
Example:

1

Response

Successful operation (no leaderboards created)

Response containing created leaderboards and any per-item issues.

created
AdminLeaderboard · object[]
required

Array of successfully created leaderboards.

issues
AdminIssue · object[]
required

Array of issues encountered during leaderboard creation.