Create user
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/users \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"email": "<string>",
"username": "<string>",
"displayName": "<string>",
"profilePictureUrl": "<string>",
"externalUserId": "<string>"
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/users"
payload = {
"email": "<string>",
"username": "<string>",
"displayName": "<string>",
"profilePictureUrl": "<string>",
"externalUserId": "<string>"
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
username: '<string>',
displayName: '<string>',
profilePictureUrl: '<string>',
externalUserId: '<string>'
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/users', 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/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'username' => '<string>',
'displayName' => '<string>',
'profilePictureUrl' => '<string>',
'externalUserId' => '<string>'
]),
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/users"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"username\": \"<string>\",\n \"displayName\": \"<string>\",\n \"profilePictureUrl\": \"<string>\",\n \"externalUserId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{subdomain}.nudj.cx/api/v2/admin/users")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"username\": \"<string>\",\n \"displayName\": \"<string>\",\n \"profilePictureUrl\": \"<string>\",\n \"externalUserId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"username\": \"<string>\",\n \"displayName\": \"<string>\",\n \"profilePictureUrl\": \"<string>\",\n \"externalUserId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"username": "<string>",
"points": 123,
"keys": 123,
"xp": {
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
},
"communityData": [
{
"communityId": "<string>",
"streak": {
"currentStreak": 1,
"lastExtendedAt": "<string>",
"longestStreak": 1
},
"challengesCompleted": 1,
"achievementsCompleted": 1,
"points": 123,
"xp": {
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
},
"hasAcceptedRules": true
}
],
"createdAt": "<string>",
"roles": [
"<string>"
],
"email": "<string>",
"isAnonymous": true,
"updatedAt": "<string>",
"organisationId": "<string>",
"displayName": "<string>",
"bio": "<string>",
"profilePictureUrl": "<string>",
"emailVerified": "<string>",
"locale": "<string>",
"socialHandles": {
"instagram": "<string>",
"loyaltyCardNumber": "<string>",
"tiktok": "<string>"
},
"fullName": "John Doe",
"parentEmail": "<string>",
"birthDay": 123,
"birthMonth": 123,
"birthYear": 123,
"externalUserId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}User
Create user
Create a new user.
POST
/
users
Create user
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/users \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"email": "<string>",
"username": "<string>",
"displayName": "<string>",
"profilePictureUrl": "<string>",
"externalUserId": "<string>"
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/users"
payload = {
"email": "<string>",
"username": "<string>",
"displayName": "<string>",
"profilePictureUrl": "<string>",
"externalUserId": "<string>"
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
username: '<string>',
displayName: '<string>',
profilePictureUrl: '<string>',
externalUserId: '<string>'
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/users', 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/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'username' => '<string>',
'displayName' => '<string>',
'profilePictureUrl' => '<string>',
'externalUserId' => '<string>'
]),
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/users"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"username\": \"<string>\",\n \"displayName\": \"<string>\",\n \"profilePictureUrl\": \"<string>\",\n \"externalUserId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{subdomain}.nudj.cx/api/v2/admin/users")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"<string>\",\n \"username\": \"<string>\",\n \"displayName\": \"<string>\",\n \"profilePictureUrl\": \"<string>\",\n \"externalUserId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"<string>\",\n \"username\": \"<string>\",\n \"displayName\": \"<string>\",\n \"profilePictureUrl\": \"<string>\",\n \"externalUserId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"username": "<string>",
"points": 123,
"keys": 123,
"xp": {
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
},
"communityData": [
{
"communityId": "<string>",
"streak": {
"currentStreak": 1,
"lastExtendedAt": "<string>",
"longestStreak": 1
},
"challengesCompleted": 1,
"achievementsCompleted": 1,
"points": 123,
"xp": {
"total": 1,
"knowledge": 1,
"creativity": 1,
"loyalty": 1,
"influence": 1,
"participation": 1,
"contribution": 1
},
"hasAcceptedRules": true
}
],
"createdAt": "<string>",
"roles": [
"<string>"
],
"email": "<string>",
"isAnonymous": true,
"updatedAt": "<string>",
"organisationId": "<string>",
"displayName": "<string>",
"bio": "<string>",
"profilePictureUrl": "<string>",
"emailVerified": "<string>",
"locale": "<string>",
"socialHandles": {
"instagram": "<string>",
"loyaltyCardNumber": "<string>",
"tiktok": "<string>"
},
"fullName": "John Doe",
"parentEmail": "<string>",
"birthDay": 123,
"birthMonth": 123,
"birthYear": 123,
"externalUserId": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Body
application/json
Response
Successful response
A user
User XP Breakdown
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Social media handles and loyalty information for a user
Show child attributes
Show child attributes
Example:
"John Doe"
Was this page helpful?
⌘I

