Skip to main content
POST
/
leaderboards
Create a new leaderboard configuration
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/admin/leaderboards \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "metricType": "total-xp",
  "startsAt": "<string>",
  "expiresAt": "<string>",
  "status": "archived",
  "period": "daily",
  "conditions": [],
  "rewardsConfig": []
}'
{
  "name": "<string>",
  "description": "<string>",
  "metricType": "total-xp",
  "startsAt": "<string>",
  "expiresAt": "<string>",
  "status": "archived",
  "period": "daily",
  "conditions": [],
  "rewardsConfig": [
    {
      "startRank": 123,
      "endRank": 123,
      "distributionEventId": "<string>"
    }
  ],
  "id": "<string>",
  "organisationId": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>"
}

Authorizations

x-api-token
string
header
required

Body

application/json
name
string
required
Minimum length: 1
metricType
enum<string>
required

The type of metric to track in the leaderboard

Available options:
total-xp,
total-challenges-completed,
total-challenges-started,
total-actions-completed
startsAt
string
required
status
enum<string>
required
Available options:
archived,
draft,
expired,
live,
scheduled
period
enum<string>
required
Available options:
daily,
weekly,
monthly,
yearly,
open
description
string
expiresAt
string
conditions
object[]
  • Option 1
  • Option 2
rewardsConfig
object[]

Response

Successful response

name
string
required
Minimum length: 1
metricType
enum<string>
required

The type of metric to track in the leaderboard

Available options:
total-xp,
total-challenges-completed,
total-challenges-started,
total-actions-completed
startsAt
string
required
status
enum<string>
required
Available options:
archived,
draft,
expired,
live,
scheduled
period
enum<string>
required
Available options:
daily,
weekly,
monthly,
yearly,
open
conditions
object[]
required
  • Option 1
  • Option 2
id
string
required
organisationId
string
required
createdAt
string
required
updatedAt
string
required
description
string | null
expiresAt
string | null
rewardsConfig
object[]
I