curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/communities \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"name": "<string>",
"slug": "<string>",
"logo": "<string>",
"banner": "<string>",
"descriptionConfig": {
"content": "<string>",
"disableLineClamp": true,
"maxLines": 5.5
},
"links": {
"website": "<string>",
"discord": "<string>",
"douyin": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"kuaishou": "<string>",
"linkedin": "<string>",
"messenger": "<string>",
"pinterest": "<string>",
"qq": "<string>",
"qzone": "<string>",
"quora": "<string>",
"reddit": "<string>",
"snapchat": "<string>",
"telegram": "<string>",
"tiktok": "<string>",
"twitter": "<string>",
"wechat": "<string>",
"weibo": "<string>",
"whatsapp": "<string>",
"youtube": "<string>"
},
"startsAt": "<string>",
"expiresAt": "<string>",
"tags": [
"<string>"
],
"campaigns": [
"<string>"
],
"password": "<string>",
"termsAndConditionsUrl": "<string>",
"privacyPolicyUrl": "<string>",
"additionalInformation": [
{
"variableConfigId": "<string>",
"required": true,
"position": 2
}
],
"customTabs": [
{
"title": "<string>",
"url": "<string>",
"opensInNewTab": true,
"position": 2
}
],
"isGlobalTemplate": true,
"availableAsTemplateForOrganisations": [
"<string>"
],
"featured": true,
"rules": {
"text": "<string>",
"agreements": [
"<string>"
]
},
"communityBackgroundImage": "<string>"
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/communities"
payload = {
"name": "<string>",
"slug": "<string>",
"logo": "<string>",
"banner": "<string>",
"descriptionConfig": {
"content": "<string>",
"disableLineClamp": True,
"maxLines": 5.5
},
"links": {
"website": "<string>",
"discord": "<string>",
"douyin": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"kuaishou": "<string>",
"linkedin": "<string>",
"messenger": "<string>",
"pinterest": "<string>",
"qq": "<string>",
"qzone": "<string>",
"quora": "<string>",
"reddit": "<string>",
"snapchat": "<string>",
"telegram": "<string>",
"tiktok": "<string>",
"twitter": "<string>",
"wechat": "<string>",
"weibo": "<string>",
"whatsapp": "<string>",
"youtube": "<string>"
},
"startsAt": "<string>",
"expiresAt": "<string>",
"tags": ["<string>"],
"campaigns": ["<string>"],
"password": "<string>",
"termsAndConditionsUrl": "<string>",
"privacyPolicyUrl": "<string>",
"additionalInformation": [
{
"variableConfigId": "<string>",
"required": True,
"position": 2
}
],
"customTabs": [
{
"title": "<string>",
"url": "<string>",
"opensInNewTab": True,
"position": 2
}
],
"isGlobalTemplate": True,
"availableAsTemplateForOrganisations": ["<string>"],
"featured": True,
"rules": {
"text": "<string>",
"agreements": ["<string>"]
},
"communityBackgroundImage": "<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({
name: '<string>',
slug: '<string>',
logo: '<string>',
banner: '<string>',
descriptionConfig: {content: '<string>', disableLineClamp: true, maxLines: 5.5},
links: {
website: '<string>',
discord: '<string>',
douyin: '<string>',
facebook: '<string>',
instagram: '<string>',
kuaishou: '<string>',
linkedin: '<string>',
messenger: '<string>',
pinterest: '<string>',
qq: '<string>',
qzone: '<string>',
quora: '<string>',
reddit: '<string>',
snapchat: '<string>',
telegram: '<string>',
tiktok: '<string>',
twitter: '<string>',
wechat: '<string>',
weibo: '<string>',
whatsapp: '<string>',
youtube: '<string>'
},
startsAt: '<string>',
expiresAt: '<string>',
tags: ['<string>'],
campaigns: ['<string>'],
password: '<string>',
termsAndConditionsUrl: '<string>',
privacyPolicyUrl: '<string>',
additionalInformation: [{variableConfigId: '<string>', required: true, position: 2}],
customTabs: [{title: '<string>', url: '<string>', opensInNewTab: true, position: 2}],
isGlobalTemplate: true,
availableAsTemplateForOrganisations: ['<string>'],
featured: true,
rules: {text: '<string>', agreements: ['<string>']},
communityBackgroundImage: '<string>'
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/communities', 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/communities",
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([
'name' => '<string>',
'slug' => '<string>',
'logo' => '<string>',
'banner' => '<string>',
'descriptionConfig' => [
'content' => '<string>',
'disableLineClamp' => true,
'maxLines' => 5.5
],
'links' => [
'website' => '<string>',
'discord' => '<string>',
'douyin' => '<string>',
'facebook' => '<string>',
'instagram' => '<string>',
'kuaishou' => '<string>',
'linkedin' => '<string>',
'messenger' => '<string>',
'pinterest' => '<string>',
'qq' => '<string>',
'qzone' => '<string>',
'quora' => '<string>',
'reddit' => '<string>',
'snapchat' => '<string>',
'telegram' => '<string>',
'tiktok' => '<string>',
'twitter' => '<string>',
'wechat' => '<string>',
'weibo' => '<string>',
'whatsapp' => '<string>',
'youtube' => '<string>'
],
'startsAt' => '<string>',
'expiresAt' => '<string>',
'tags' => [
'<string>'
],
'campaigns' => [
'<string>'
],
'password' => '<string>',
'termsAndConditionsUrl' => '<string>',
'privacyPolicyUrl' => '<string>',
'additionalInformation' => [
[
'variableConfigId' => '<string>',
'required' => true,
'position' => 2
]
],
'customTabs' => [
[
'title' => '<string>',
'url' => '<string>',
'opensInNewTab' => true,
'position' => 2
]
],
'isGlobalTemplate' => true,
'availableAsTemplateForOrganisations' => [
'<string>'
],
'featured' => true,
'rules' => [
'text' => '<string>',
'agreements' => [
'<string>'
]
],
'communityBackgroundImage' => '<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/communities"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"logo\": \"<string>\",\n \"banner\": \"<string>\",\n \"descriptionConfig\": {\n \"content\": \"<string>\",\n \"disableLineClamp\": true,\n \"maxLines\": 5.5\n },\n \"links\": {\n \"website\": \"<string>\",\n \"discord\": \"<string>\",\n \"douyin\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\",\n \"kuaishou\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"messenger\": \"<string>\",\n \"pinterest\": \"<string>\",\n \"qq\": \"<string>\",\n \"qzone\": \"<string>\",\n \"quora\": \"<string>\",\n \"reddit\": \"<string>\",\n \"snapchat\": \"<string>\",\n \"telegram\": \"<string>\",\n \"tiktok\": \"<string>\",\n \"twitter\": \"<string>\",\n \"wechat\": \"<string>\",\n \"weibo\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"youtube\": \"<string>\"\n },\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"password\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"additionalInformation\": [\n {\n \"variableConfigId\": \"<string>\",\n \"required\": true,\n \"position\": 2\n }\n ],\n \"customTabs\": [\n {\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"opensInNewTab\": true,\n \"position\": 2\n }\n ],\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"rules\": {\n \"text\": \"<string>\",\n \"agreements\": [\n \"<string>\"\n ]\n },\n \"communityBackgroundImage\": \"<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/communities")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"logo\": \"<string>\",\n \"banner\": \"<string>\",\n \"descriptionConfig\": {\n \"content\": \"<string>\",\n \"disableLineClamp\": true,\n \"maxLines\": 5.5\n },\n \"links\": {\n \"website\": \"<string>\",\n \"discord\": \"<string>\",\n \"douyin\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\",\n \"kuaishou\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"messenger\": \"<string>\",\n \"pinterest\": \"<string>\",\n \"qq\": \"<string>\",\n \"qzone\": \"<string>\",\n \"quora\": \"<string>\",\n \"reddit\": \"<string>\",\n \"snapchat\": \"<string>\",\n \"telegram\": \"<string>\",\n \"tiktok\": \"<string>\",\n \"twitter\": \"<string>\",\n \"wechat\": \"<string>\",\n \"weibo\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"youtube\": \"<string>\"\n },\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"password\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"additionalInformation\": [\n {\n \"variableConfigId\": \"<string>\",\n \"required\": true,\n \"position\": 2\n }\n ],\n \"customTabs\": [\n {\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"opensInNewTab\": true,\n \"position\": 2\n }\n ],\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"rules\": {\n \"text\": \"<string>\",\n \"agreements\": [\n \"<string>\"\n ]\n },\n \"communityBackgroundImage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/communities")
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 \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"logo\": \"<string>\",\n \"banner\": \"<string>\",\n \"descriptionConfig\": {\n \"content\": \"<string>\",\n \"disableLineClamp\": true,\n \"maxLines\": 5.5\n },\n \"links\": {\n \"website\": \"<string>\",\n \"discord\": \"<string>\",\n \"douyin\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\",\n \"kuaishou\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"messenger\": \"<string>\",\n \"pinterest\": \"<string>\",\n \"qq\": \"<string>\",\n \"qzone\": \"<string>\",\n \"quora\": \"<string>\",\n \"reddit\": \"<string>\",\n \"snapchat\": \"<string>\",\n \"telegram\": \"<string>\",\n \"tiktok\": \"<string>\",\n \"twitter\": \"<string>\",\n \"wechat\": \"<string>\",\n \"weibo\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"youtube\": \"<string>\"\n },\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"password\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"additionalInformation\": [\n {\n \"variableConfigId\": \"<string>\",\n \"required\": true,\n \"position\": 2\n }\n ],\n \"customTabs\": [\n {\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"opensInNewTab\": true,\n \"position\": 2\n }\n ],\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"rules\": {\n \"text\": \"<string>\",\n \"agreements\": [\n \"<string>\"\n ]\n },\n \"communityBackgroundImage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organisationId": "<string>",
"name": "<string>",
"slug": "<string>",
"tags": [
"<string>"
],
"campaigns": [
"<string>"
],
"customTabs": [
{
"title": "<string>",
"url": "<string>",
"opensInNewTab": true,
"position": 2
}
],
"descriptionConfig": {
"content": "<string>",
"disableLineClamp": true,
"maxLines": 5.5
},
"links": {
"website": "<string>",
"discord": "<string>",
"douyin": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"kuaishou": "<string>",
"linkedin": "<string>",
"messenger": "<string>",
"pinterest": "<string>",
"qq": "<string>",
"qzone": "<string>",
"quora": "<string>",
"reddit": "<string>",
"snapchat": "<string>",
"telegram": "<string>",
"tiktok": "<string>",
"twitter": "<string>",
"wechat": "<string>",
"weibo": "<string>",
"whatsapp": "<string>",
"youtube": "<string>"
},
"style": {
"lightMode": {
"navbarLogo": "<string>",
"logo": "<string>",
"banner": "<string>",
"theme": {},
"customCSS": "<string>",
"favicon": "<string>"
},
"darkMode": {
"navbarLogo": "<string>",
"logo": "<string>",
"banner": "<string>",
"theme": {},
"customCSS": "<string>",
"favicon": "<string>"
},
"general": {}
},
"usersWaiting": [
"<string>"
],
"verified": true,
"termsAndConditionsUrl": "<string>",
"privacyPolicyUrl": "<string>",
"additionalInformation": [
{
"variableConfigId": "<string>",
"required": true,
"position": 2
}
],
"bannerTitle": "<string>",
"bannerDescription": "<string>",
"bannerButtonText": "<string>",
"bannerHref": "<string>",
"rules": {
"text": "<string>",
"agreements": [
"<string>"
]
},
"requireMemberRole": true,
"featured": true,
"memberRequirements": [
{
"type": "<string>",
"minimumAge": 123,
"parentManaged": true
}
],
"availableAsTemplateForOrganisations": [
"<string>"
],
"isGlobalTemplate": true,
"referralUrlOverride": "<string>",
"startsAt": "<string>",
"expiresAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"communityBackgroundImage": "<string>",
"password": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Create a new community
Create a new community.
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/communities \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"name": "<string>",
"slug": "<string>",
"logo": "<string>",
"banner": "<string>",
"descriptionConfig": {
"content": "<string>",
"disableLineClamp": true,
"maxLines": 5.5
},
"links": {
"website": "<string>",
"discord": "<string>",
"douyin": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"kuaishou": "<string>",
"linkedin": "<string>",
"messenger": "<string>",
"pinterest": "<string>",
"qq": "<string>",
"qzone": "<string>",
"quora": "<string>",
"reddit": "<string>",
"snapchat": "<string>",
"telegram": "<string>",
"tiktok": "<string>",
"twitter": "<string>",
"wechat": "<string>",
"weibo": "<string>",
"whatsapp": "<string>",
"youtube": "<string>"
},
"startsAt": "<string>",
"expiresAt": "<string>",
"tags": [
"<string>"
],
"campaigns": [
"<string>"
],
"password": "<string>",
"termsAndConditionsUrl": "<string>",
"privacyPolicyUrl": "<string>",
"additionalInformation": [
{
"variableConfigId": "<string>",
"required": true,
"position": 2
}
],
"customTabs": [
{
"title": "<string>",
"url": "<string>",
"opensInNewTab": true,
"position": 2
}
],
"isGlobalTemplate": true,
"availableAsTemplateForOrganisations": [
"<string>"
],
"featured": true,
"rules": {
"text": "<string>",
"agreements": [
"<string>"
]
},
"communityBackgroundImage": "<string>"
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/communities"
payload = {
"name": "<string>",
"slug": "<string>",
"logo": "<string>",
"banner": "<string>",
"descriptionConfig": {
"content": "<string>",
"disableLineClamp": True,
"maxLines": 5.5
},
"links": {
"website": "<string>",
"discord": "<string>",
"douyin": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"kuaishou": "<string>",
"linkedin": "<string>",
"messenger": "<string>",
"pinterest": "<string>",
"qq": "<string>",
"qzone": "<string>",
"quora": "<string>",
"reddit": "<string>",
"snapchat": "<string>",
"telegram": "<string>",
"tiktok": "<string>",
"twitter": "<string>",
"wechat": "<string>",
"weibo": "<string>",
"whatsapp": "<string>",
"youtube": "<string>"
},
"startsAt": "<string>",
"expiresAt": "<string>",
"tags": ["<string>"],
"campaigns": ["<string>"],
"password": "<string>",
"termsAndConditionsUrl": "<string>",
"privacyPolicyUrl": "<string>",
"additionalInformation": [
{
"variableConfigId": "<string>",
"required": True,
"position": 2
}
],
"customTabs": [
{
"title": "<string>",
"url": "<string>",
"opensInNewTab": True,
"position": 2
}
],
"isGlobalTemplate": True,
"availableAsTemplateForOrganisations": ["<string>"],
"featured": True,
"rules": {
"text": "<string>",
"agreements": ["<string>"]
},
"communityBackgroundImage": "<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({
name: '<string>',
slug: '<string>',
logo: '<string>',
banner: '<string>',
descriptionConfig: {content: '<string>', disableLineClamp: true, maxLines: 5.5},
links: {
website: '<string>',
discord: '<string>',
douyin: '<string>',
facebook: '<string>',
instagram: '<string>',
kuaishou: '<string>',
linkedin: '<string>',
messenger: '<string>',
pinterest: '<string>',
qq: '<string>',
qzone: '<string>',
quora: '<string>',
reddit: '<string>',
snapchat: '<string>',
telegram: '<string>',
tiktok: '<string>',
twitter: '<string>',
wechat: '<string>',
weibo: '<string>',
whatsapp: '<string>',
youtube: '<string>'
},
startsAt: '<string>',
expiresAt: '<string>',
tags: ['<string>'],
campaigns: ['<string>'],
password: '<string>',
termsAndConditionsUrl: '<string>',
privacyPolicyUrl: '<string>',
additionalInformation: [{variableConfigId: '<string>', required: true, position: 2}],
customTabs: [{title: '<string>', url: '<string>', opensInNewTab: true, position: 2}],
isGlobalTemplate: true,
availableAsTemplateForOrganisations: ['<string>'],
featured: true,
rules: {text: '<string>', agreements: ['<string>']},
communityBackgroundImage: '<string>'
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/communities', 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/communities",
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([
'name' => '<string>',
'slug' => '<string>',
'logo' => '<string>',
'banner' => '<string>',
'descriptionConfig' => [
'content' => '<string>',
'disableLineClamp' => true,
'maxLines' => 5.5
],
'links' => [
'website' => '<string>',
'discord' => '<string>',
'douyin' => '<string>',
'facebook' => '<string>',
'instagram' => '<string>',
'kuaishou' => '<string>',
'linkedin' => '<string>',
'messenger' => '<string>',
'pinterest' => '<string>',
'qq' => '<string>',
'qzone' => '<string>',
'quora' => '<string>',
'reddit' => '<string>',
'snapchat' => '<string>',
'telegram' => '<string>',
'tiktok' => '<string>',
'twitter' => '<string>',
'wechat' => '<string>',
'weibo' => '<string>',
'whatsapp' => '<string>',
'youtube' => '<string>'
],
'startsAt' => '<string>',
'expiresAt' => '<string>',
'tags' => [
'<string>'
],
'campaigns' => [
'<string>'
],
'password' => '<string>',
'termsAndConditionsUrl' => '<string>',
'privacyPolicyUrl' => '<string>',
'additionalInformation' => [
[
'variableConfigId' => '<string>',
'required' => true,
'position' => 2
]
],
'customTabs' => [
[
'title' => '<string>',
'url' => '<string>',
'opensInNewTab' => true,
'position' => 2
]
],
'isGlobalTemplate' => true,
'availableAsTemplateForOrganisations' => [
'<string>'
],
'featured' => true,
'rules' => [
'text' => '<string>',
'agreements' => [
'<string>'
]
],
'communityBackgroundImage' => '<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/communities"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"logo\": \"<string>\",\n \"banner\": \"<string>\",\n \"descriptionConfig\": {\n \"content\": \"<string>\",\n \"disableLineClamp\": true,\n \"maxLines\": 5.5\n },\n \"links\": {\n \"website\": \"<string>\",\n \"discord\": \"<string>\",\n \"douyin\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\",\n \"kuaishou\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"messenger\": \"<string>\",\n \"pinterest\": \"<string>\",\n \"qq\": \"<string>\",\n \"qzone\": \"<string>\",\n \"quora\": \"<string>\",\n \"reddit\": \"<string>\",\n \"snapchat\": \"<string>\",\n \"telegram\": \"<string>\",\n \"tiktok\": \"<string>\",\n \"twitter\": \"<string>\",\n \"wechat\": \"<string>\",\n \"weibo\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"youtube\": \"<string>\"\n },\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"password\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"additionalInformation\": [\n {\n \"variableConfigId\": \"<string>\",\n \"required\": true,\n \"position\": 2\n }\n ],\n \"customTabs\": [\n {\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"opensInNewTab\": true,\n \"position\": 2\n }\n ],\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"rules\": {\n \"text\": \"<string>\",\n \"agreements\": [\n \"<string>\"\n ]\n },\n \"communityBackgroundImage\": \"<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/communities")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"logo\": \"<string>\",\n \"banner\": \"<string>\",\n \"descriptionConfig\": {\n \"content\": \"<string>\",\n \"disableLineClamp\": true,\n \"maxLines\": 5.5\n },\n \"links\": {\n \"website\": \"<string>\",\n \"discord\": \"<string>\",\n \"douyin\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\",\n \"kuaishou\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"messenger\": \"<string>\",\n \"pinterest\": \"<string>\",\n \"qq\": \"<string>\",\n \"qzone\": \"<string>\",\n \"quora\": \"<string>\",\n \"reddit\": \"<string>\",\n \"snapchat\": \"<string>\",\n \"telegram\": \"<string>\",\n \"tiktok\": \"<string>\",\n \"twitter\": \"<string>\",\n \"wechat\": \"<string>\",\n \"weibo\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"youtube\": \"<string>\"\n },\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"password\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"additionalInformation\": [\n {\n \"variableConfigId\": \"<string>\",\n \"required\": true,\n \"position\": 2\n }\n ],\n \"customTabs\": [\n {\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"opensInNewTab\": true,\n \"position\": 2\n }\n ],\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"rules\": {\n \"text\": \"<string>\",\n \"agreements\": [\n \"<string>\"\n ]\n },\n \"communityBackgroundImage\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/communities")
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 \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"logo\": \"<string>\",\n \"banner\": \"<string>\",\n \"descriptionConfig\": {\n \"content\": \"<string>\",\n \"disableLineClamp\": true,\n \"maxLines\": 5.5\n },\n \"links\": {\n \"website\": \"<string>\",\n \"discord\": \"<string>\",\n \"douyin\": \"<string>\",\n \"facebook\": \"<string>\",\n \"instagram\": \"<string>\",\n \"kuaishou\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"messenger\": \"<string>\",\n \"pinterest\": \"<string>\",\n \"qq\": \"<string>\",\n \"qzone\": \"<string>\",\n \"quora\": \"<string>\",\n \"reddit\": \"<string>\",\n \"snapchat\": \"<string>\",\n \"telegram\": \"<string>\",\n \"tiktok\": \"<string>\",\n \"twitter\": \"<string>\",\n \"wechat\": \"<string>\",\n \"weibo\": \"<string>\",\n \"whatsapp\": \"<string>\",\n \"youtube\": \"<string>\"\n },\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"password\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"additionalInformation\": [\n {\n \"variableConfigId\": \"<string>\",\n \"required\": true,\n \"position\": 2\n }\n ],\n \"customTabs\": [\n {\n \"title\": \"<string>\",\n \"url\": \"<string>\",\n \"opensInNewTab\": true,\n \"position\": 2\n }\n ],\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"rules\": {\n \"text\": \"<string>\",\n \"agreements\": [\n \"<string>\"\n ]\n },\n \"communityBackgroundImage\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organisationId": "<string>",
"name": "<string>",
"slug": "<string>",
"tags": [
"<string>"
],
"campaigns": [
"<string>"
],
"customTabs": [
{
"title": "<string>",
"url": "<string>",
"opensInNewTab": true,
"position": 2
}
],
"descriptionConfig": {
"content": "<string>",
"disableLineClamp": true,
"maxLines": 5.5
},
"links": {
"website": "<string>",
"discord": "<string>",
"douyin": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"kuaishou": "<string>",
"linkedin": "<string>",
"messenger": "<string>",
"pinterest": "<string>",
"qq": "<string>",
"qzone": "<string>",
"quora": "<string>",
"reddit": "<string>",
"snapchat": "<string>",
"telegram": "<string>",
"tiktok": "<string>",
"twitter": "<string>",
"wechat": "<string>",
"weibo": "<string>",
"whatsapp": "<string>",
"youtube": "<string>"
},
"style": {
"lightMode": {
"navbarLogo": "<string>",
"logo": "<string>",
"banner": "<string>",
"theme": {},
"customCSS": "<string>",
"favicon": "<string>"
},
"darkMode": {
"navbarLogo": "<string>",
"logo": "<string>",
"banner": "<string>",
"theme": {},
"customCSS": "<string>",
"favicon": "<string>"
},
"general": {}
},
"usersWaiting": [
"<string>"
],
"verified": true,
"termsAndConditionsUrl": "<string>",
"privacyPolicyUrl": "<string>",
"additionalInformation": [
{
"variableConfigId": "<string>",
"required": true,
"position": 2
}
],
"bannerTitle": "<string>",
"bannerDescription": "<string>",
"bannerButtonText": "<string>",
"bannerHref": "<string>",
"rules": {
"text": "<string>",
"agreements": [
"<string>"
]
},
"requireMemberRole": true,
"featured": true,
"memberRequirements": [
{
"type": "<string>",
"minimumAge": 123,
"parentManaged": true
}
],
"availableAsTemplateForOrganisations": [
"<string>"
],
"isGlobalTemplate": true,
"referralUrlOverride": "<string>",
"startsAt": "<string>",
"expiresAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"communityBackgroundImage": "<string>",
"password": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Body
The input required to create a community
The name of the community
The slug of the community in format of only letters and hyphens
The url of the community logo image
The url of the community banner image
The description configuration including content and display settings
Show child attributes
Show child attributes
The links of the community
Show child attributes
Show child attributes
The date the community is set to be available publicly
The date the community is set to be unavailable publicly
Set the community status, by default will be set to draft if not provided
archived, draft, expired, live, scheduled An array of objectId tagIds referencing the tags collection
^[0-9a-fA-F]{24}$An array of objectId campaignIds referencing the campaigns collection
^[0-9a-fA-F]{24}$A password to access the community. If set then the community will require a password to join.
The terms and conditions url of the community
The privacy policy url of the community
Configurable form fields to collect additional user information when joining the community. Each field (e.g., email, phone, address) is defined by a variable config that specifies its type, validation rules, and display order.
Show child attributes
Show child attributes
Array of custom navigation tabs (maximum 2)
2Show child attributes
Show child attributes
Whether the community is a global template
The organisations that the community is available as a template for
^[0-9a-fA-F]{24}$Community rules with text content and agreement statements
Show child attributes
Show child attributes
Background image URL for the community. Recommended size: 1920x1080px (laptop screen size) or larger for optimal display across devices
Response
Successful response
A community
The id of the community
^[0-9a-fA-F]{24}$The organisation that the community belongs to
^[0-9a-fA-F]{24}$The name of the community
The slug of the community in format of only letters and hyphens
The type of the community
Artist, Brand, Business, Cause, Community, Entertainment, Organisation, Place, Product The access level of the community
open, request The status of the community
archived, draft, expired, live, scheduled An array of objectId tagIds referencing the tags collection
^[0-9a-fA-F]{24}$An array of objectId campaignIds referencing the campaigns collection
^[0-9a-fA-F]{24}$Array of custom navigation tabs (maximum 2)
2Show child attributes
Show child attributes
The description configuration including content and display settings
Show child attributes
Show child attributes
The links of the community
Show child attributes
Show child attributes
The style of the community
Show child attributes
Show child attributes
The users waiting for approval
Whether the community is verified
The terms and conditions url of the community
The privacy policy url of the community
Configurable form fields to collect additional user information when joining the community. Each field (e.g., email, phone, address) is defined by a variable config that specifies its type, validation rules, and display order.
Show child attributes
Show child attributes
Community rules with text content and agreement statements
Show child attributes
Show child attributes
- Option 1
- CodeMemberRequirement
- Option 3
Show child attributes
Show child attributes
The organisations that the community is available as a template for
^[0-9a-fA-F]{24}$Whether the community is a global template
The referral url override of the community
The date the community is set to be available publicly
The date the community is set to be unavailable publicly
The date the community was created
The date the community was last updated
Background image URL for the community. Recommended size: 1920x1080px (laptop screen size) or larger for optimal display across devices
A password to access the community. If set then the community will require a password to join.
Was this page helpful?

