Skip to main content
PATCH
/
xp-config
Update XP configuration
curl --request PATCH \
  --url https://{subdomain}.nudj.cx/api/v2/admin/xp-config \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "xpConfigs": [
    {
      "description": "<string>",
      "total": 1,
      "knowledge": 1,
      "creativity": 1,
      "loyalty": 1,
      "influence": 1,
      "participation": 1,
      "contribution": 1
    }
  ]
}
'
import requests

url = "https://{subdomain}.nudj.cx/api/v2/admin/xp-config"

payload = { "xpConfigs": [
{
"description": "<string>",
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
}
] }
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
xpConfigs: [
{
description: '<string>',
total: 1,
knowledge: 1,
creativity: 1,
loyalty: 1,
influence: 1,
participation: 1,
contribution: 1
}
]
})
};

fetch('https://{subdomain}.nudj.cx/api/v2/admin/xp-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.nudj.cx/api/v2/admin/xp-config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'xpConfigs' => [
[
'description' => '<string>',
'total' => 1,
'knowledge' => 1,
'creativity' => 1,
'loyalty' => 1,
'influence' => 1,
'participation' => 1,
'contribution' => 1
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{subdomain}.nudj.cx/api/v2/admin/xp-config"

payload := strings.NewReader("{\n \"xpConfigs\": [\n {\n \"description\": \"<string>\",\n \"total\": 1,\n \"knowledge\": 1,\n \"creativity\": 1,\n \"loyalty\": 1,\n \"influence\": 1,\n \"participation\": 1,\n \"contribution\": 1\n }\n ]\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://{subdomain}.nudj.cx/api/v2/admin/xp-config")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"xpConfigs\": [\n {\n \"description\": \"<string>\",\n \"total\": 1,\n \"knowledge\": 1,\n \"creativity\": 1,\n \"loyalty\": 1,\n \"influence\": 1,\n \"participation\": 1,\n \"contribution\": 1\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{subdomain}.nudj.cx/api/v2/admin/xp-config")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"xpConfigs\": [\n {\n \"description\": \"<string>\",\n \"total\": 1,\n \"knowledge\": 1,\n \"creativity\": 1,\n \"loyalty\": 1,\n \"influence\": 1,\n \"participation\": 1,\n \"contribution\": 1\n }\n ]\n}"

response = http.request(request)
puts response.read_body
[
  {
    "description": "<string>",
    "total": 1,
    "knowledge": 1,
    "creativity": 1,
    "loyalty": 1,
    "influence": 1,
    "participation": 1,
    "contribution": 1,
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
]
{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}
{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}

Authorizations

x-api-token
string
header
required

Body

application/json

Input for updating XP configuration settings

xpConfigs
object[]
required

Response

Successful response

eventCategory
enum<string>
required
Available options:
achievement,
action,
auth,
blog,
challenge,
community,
custom,
game,
leaderboard,
organisation,
points,
post,
referral,
reward,
shop,
social,
social-connection,
streak,
user,
variable,
xp
eventSubCategory
enum<string>
required
Available options:
achievement-completion,
facebook-comment,
facebook-follow,
facebook-like,
image-analysis-object-detection,
image-analysis-receipt-detection,
instagram-follow,
instagram-like,
instagram-comment,
instagram-share,
instagram-post,
interaction-engage-with-content,
interaction-external-link,
interaction-image-upload,
interaction-spot-object,
platform-comment-on-post,
platform-complete-achievement,
platform-generative-action,
platform-like-post,
platform-play-game,
platform-validate-event,
question-multiple-choice,
question-open-ended,
question-rate-your-experience,
question-secret-access-code,
question-select-date,
question-select-from-images,
question-select-value-in-range,
question-select-from-list,
question-closed-ended,
question-vote,
spotify-follow,
spotify-listen,
spotify-save,
tiktok-follow,
tiktok-watch,
tiktok-post,
youtube-like,
youtube-comment,
youtube-subscribe,
action-completion,
skip-action,
42-school,
api-auth-link,
api-token-link,
apple,
asgardeo,
atlassian,
auth0,
authentik,
azure-ad-b2c,
azure-ad,
azure-devops,
battlenet,
beyondidentity,
box,
boxyhq-saml,
bungie,
click-up,
cognito,
coinbase,
descope,
discord,
dribbble,
dropbox,
duende-identity-server6,
email,
eveonline,
facebook,
faceit,
foursquare,
freshbooks,
fusionauth,
github,
gitlab,
google,
hubspot,
identity-server4,
instagram,
kakao,
keycloak,
line,
linkedin,
mailchimp,
mailru,
mastodon,
mattermost,
medium,
naver,
netlify,
notion,
okta,
onelogin,
organisation-oidc,
osso,
osu,
passage,
patreon,
pinterest,
pipedrive,
reddit,
salesforce,
slack,
spotify,
strava,
tiktok,
todoist,
trakt,
twitch,
twitter,
united-effects,
vk,
wikimedia,
wordpress,
workos,
yandex,
youtube,
zitadel,
zoho,
zoom,
blog-comment,
blog-like,
blog-share,
blog-view,
challenge-started,
challenge-completion,
challenge-unlock,
community-visit,
parental-approval-requested,
parental-approval-approved,
parental-approval-rejected,
custom,
game-started,
game-completed,
leaderboard-finish,
invite-admin-user,
points-credit,
points-spend,
post-comment,
post-like,
post-view,
reward-redemption,
reward-allocation-purchase,
reward-giveaway-winner,
reward-claim,
reward-distribution,
manual-distribution,
referral-link-used,
shop-purchase,
share-challenge-details,
share-challenge-results,
share-community,
share-reward,
share-post,
share-profile,
share-anything,
streak-extended,
profile-picture-added,
bio-added,
variable-captured,
xp-gained,
xp-total,
xp-leaderboard-topper
description
string
required
total
number
required
Required range: x >= 0
knowledge
number
required
Required range: x >= 0
creativity
number
required
Required range: x >= 0
loyalty
number
required
Required range: x >= 0
influence
number
required
Required range: x >= 0
participation
number
required
Required range: x >= 0
contribution
number
required
Required range: x >= 0
createdAt
string
required
updatedAt
string
required