Skip to main content
PATCH
/
leaderboards
/
configs
/
{id}
Update a leaderboard configuration
curl --request PATCH \
  --url https://{subdomain}.nudj.cx/api/v2/admin/leaderboards/configs/{id} \
  --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": [
    {
      "type": "<string>",
      "communityId": "<string>"
    }
  ]
}
'
{
  "id": "<string>",
  "organisationId": "<string>",
  "name": "<string>",
  "metricType": "total-xp",
  "period": "daily",
  "startsAt": "<string>",
  "status": "archived",
  "conditions": [
    {
      "type": "<string>",
      "communityId": "<string>"
    }
  ],
  "rewardsConfig": [
    {
      "startRank": 2,
      "endRank": 2,
      "distributionEventId": "<string>"
    }
  ],
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "createdBy": "<string>",
  "updatedBy": "<string>",
  "description": "<string>",
  "expiresAt": "<string>"
}

Authorizations

x-api-token
string
header
required

Headers

x-language
string

The language to update the leaderboard in. This will update the leaderboard's content for the specified language.

Path Parameters

id
string
required

The id of the leaderboard config

Body

application/json

The input required to update a leaderboard config

name
string

The name of the leaderboard

Minimum string length: 1
description
string

The description of the leaderboard

metricType
enum<string>

The type of metric to track in the leaderboard

Available options:
total-xp,
total-challenges-completed,
total-challenges-started,
total-actions-completed
startsAt
string

The start date of the leaderboard

expiresAt
string

The expiry date of the leaderboard

status
enum<string>

The status of the leaderboard config

Available options:
archived,
draft,
expired,
live,
scheduled
period
enum<string>

The period for the leaderboard

Available options:
daily,
weekly,
monthly,
yearly,
open
conditions
object[]

The conditions for leaderboard participation

Response

Successful response

A leaderboard configuration (admin view)

id
string
required

The id of the leaderboard config

organisationId
string
required

The id of the organisation the leaderboard config belongs to

name
string
required

The name of the leaderboard

Minimum string 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
period
enum<string>
required

The period for the leaderboard (daily, weekly, monthly, yearly, open)

Available options:
daily,
weekly,
monthly,
yearly,
open
startsAt
string
required

The start date of the leaderboard

status
enum<string>
required

The status of the leaderboard config

Available options:
archived,
draft,
expired,
live,
scheduled
conditions
object[]
required

The conditions that participants must meet to appear on this leaderboard

rewardsConfig
LeaderboardRewardsConfig · object[]
required

The reward configuration for different rank ranges

createdAt
string
required

The creation date of the leaderboard config

updatedAt
string
required

The update date of the leaderboard config

createdBy
string
required

The admin user who created this leaderboard config

updatedBy
string
required

The admin user who last updated this leaderboard config

description
string | null

The description of the leaderboard

expiresAt
string | null

The expiry date of the leaderboard