Skip to main content
POST
/
challenges
/
{challengeId}
/
distribution
Assign a distribution details to a challenge
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/admin/challenges/{challengeId}/distribution \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "rewardsConfig": {
    "mechanism": "all",
    "amountToDistribute": 1,
    "allocations": [
      {
        "allocationType": "assets",
        "amountToDistribute": 2,
        "id": "<string>",
        "rewardId": "<string>",
        "supply": 1
      }
    ]
  },
  "pointsToDistribute": 1,
  "bonusXpToDistribute": 1
}'
{
  "pointsToDistribute": 1,
  "bonusXpToDistribute": 1,
  "rewardsConfig": {
    "mechanism": "all",
    "amountToDistribute": 1,
    "allocations": [
      {
        "id": "<string>",
        "allocationType": "assets",
        "supply": 1,
        "amountToDistribute": 2,
        "distributed": 1,
        "isLive": true,
        "rewardId": "<string>"
      }
    ]
  },
  "challengeId": "<string>"
}

Authorizations

x-api-token
string
header
required

Path Parameters

challengeId
string
required

The id of the challenge to assign distribution details to

Body

application/json

The input required to assign distribution details to a challenge

rewardsConfig
object
required
pointsToDistribute
number
required

The amount of points to distribute.

Required range: x >= 0
bonusXpToDistribute
number
required

The amount of bonus xp to distribute

Required range: x >= 0

Response

Successful response

pointsToDistribute
number
required

The amount of points to distribute.

Required range: x >= 0
bonusXpToDistribute
number
required

The amount of bonus xp to distribute

Required range: x >= 0
rewardsConfig
object
required
challengeId
string
required

The id of the challenge with assigned distribution details

I