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>"
    }
  ]
}'
{
  "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

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

Body

application/json
name
string
Minimum length: 1
description
string
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
expiresAt
string
status
enum<string>
Available options:
archived,
draft,
expired,
live,
scheduled
period
enum<string>
Available options:
daily,
weekly,
monthly,
yearly,
open
conditions
object[]
  • Option 1
  • Option 2

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