curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/posts \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"communityId": "<string>",
"details": {
"title": "<string>",
"description": "<string>",
"light": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
},
"dark": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
}
},
"content": "<string>",
"startsAt": "<string>",
"expiresAt": "<string>",
"disableComments": true,
"disableLikes": true,
"displayBannerOnPost": true,
"tags": [
"<string>"
],
"campaigns": [
"<string>"
],
"featured": true,
"isGlobalTemplate": true,
"availableAsTemplateForOrganisations": [
"<string>"
]
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/posts"
payload = {
"communityId": "<string>",
"details": {
"title": "<string>",
"description": "<string>",
"light": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
},
"dark": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
}
},
"content": "<string>",
"startsAt": "<string>",
"expiresAt": "<string>",
"disableComments": True,
"disableLikes": True,
"displayBannerOnPost": True,
"tags": ["<string>"],
"campaigns": ["<string>"],
"featured": True,
"isGlobalTemplate": True,
"availableAsTemplateForOrganisations": ["<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({
communityId: '<string>',
details: {
title: '<string>',
description: '<string>',
light: {primaryImageUrl: '<string>', secondaryImageUrl: '<string>'},
dark: {primaryImageUrl: '<string>', secondaryImageUrl: '<string>'}
},
content: '<string>',
startsAt: '<string>',
expiresAt: '<string>',
disableComments: true,
disableLikes: true,
displayBannerOnPost: true,
tags: ['<string>'],
campaigns: ['<string>'],
featured: true,
isGlobalTemplate: true,
availableAsTemplateForOrganisations: ['<string>']
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/posts', 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/posts",
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([
'communityId' => '<string>',
'details' => [
'title' => '<string>',
'description' => '<string>',
'light' => [
'primaryImageUrl' => '<string>',
'secondaryImageUrl' => '<string>'
],
'dark' => [
'primaryImageUrl' => '<string>',
'secondaryImageUrl' => '<string>'
]
],
'content' => '<string>',
'startsAt' => '<string>',
'expiresAt' => '<string>',
'disableComments' => true,
'disableLikes' => true,
'displayBannerOnPost' => true,
'tags' => [
'<string>'
],
'campaigns' => [
'<string>'
],
'featured' => true,
'isGlobalTemplate' => true,
'availableAsTemplateForOrganisations' => [
'<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/posts"
payload := strings.NewReader("{\n \"communityId\": \"<string>\",\n \"details\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"light\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n },\n \"dark\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n }\n },\n \"content\": \"<string>\",\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"disableComments\": true,\n \"disableLikes\": true,\n \"displayBannerOnPost\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ]\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/posts")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"communityId\": \"<string>\",\n \"details\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"light\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n },\n \"dark\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n }\n },\n \"content\": \"<string>\",\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"disableComments\": true,\n \"disableLikes\": true,\n \"displayBannerOnPost\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/posts")
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 \"communityId\": \"<string>\",\n \"details\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"light\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n },\n \"dark\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n }\n },\n \"content\": \"<string>\",\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"disableComments\": true,\n \"disableLikes\": true,\n \"displayBannerOnPost\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organisationId": "<string>",
"communityId": "<string>",
"details": {
"title": "<string>",
"description": "<string>",
"light": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
},
"dark": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
}
},
"likes": [
"<string>"
],
"disableComments": true,
"disableLikes": true,
"displayBannerOnPost": true,
"status": "archived",
"tags": [
"<string>"
],
"campaigns": [
"<string>"
],
"availableAsTemplateForOrganisations": [
"<string>"
],
"isGlobalTemplate": true,
"createdAt": "<string>",
"createdBy": "<string>",
"isEditing": true,
"content": "<string>",
"startsAt": "<string>",
"expiresAt": "<string>",
"featured": true,
"updatedAt": "<string>",
"updatedBy": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Create a new post
Create a new post.
curl --request POST \
--url https://{subdomain}.nudj.cx/api/v2/admin/posts \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"communityId": "<string>",
"details": {
"title": "<string>",
"description": "<string>",
"light": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
},
"dark": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
}
},
"content": "<string>",
"startsAt": "<string>",
"expiresAt": "<string>",
"disableComments": true,
"disableLikes": true,
"displayBannerOnPost": true,
"tags": [
"<string>"
],
"campaigns": [
"<string>"
],
"featured": true,
"isGlobalTemplate": true,
"availableAsTemplateForOrganisations": [
"<string>"
]
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/posts"
payload = {
"communityId": "<string>",
"details": {
"title": "<string>",
"description": "<string>",
"light": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
},
"dark": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
}
},
"content": "<string>",
"startsAt": "<string>",
"expiresAt": "<string>",
"disableComments": True,
"disableLikes": True,
"displayBannerOnPost": True,
"tags": ["<string>"],
"campaigns": ["<string>"],
"featured": True,
"isGlobalTemplate": True,
"availableAsTemplateForOrganisations": ["<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({
communityId: '<string>',
details: {
title: '<string>',
description: '<string>',
light: {primaryImageUrl: '<string>', secondaryImageUrl: '<string>'},
dark: {primaryImageUrl: '<string>', secondaryImageUrl: '<string>'}
},
content: '<string>',
startsAt: '<string>',
expiresAt: '<string>',
disableComments: true,
disableLikes: true,
displayBannerOnPost: true,
tags: ['<string>'],
campaigns: ['<string>'],
featured: true,
isGlobalTemplate: true,
availableAsTemplateForOrganisations: ['<string>']
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/posts', 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/posts",
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([
'communityId' => '<string>',
'details' => [
'title' => '<string>',
'description' => '<string>',
'light' => [
'primaryImageUrl' => '<string>',
'secondaryImageUrl' => '<string>'
],
'dark' => [
'primaryImageUrl' => '<string>',
'secondaryImageUrl' => '<string>'
]
],
'content' => '<string>',
'startsAt' => '<string>',
'expiresAt' => '<string>',
'disableComments' => true,
'disableLikes' => true,
'displayBannerOnPost' => true,
'tags' => [
'<string>'
],
'campaigns' => [
'<string>'
],
'featured' => true,
'isGlobalTemplate' => true,
'availableAsTemplateForOrganisations' => [
'<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/posts"
payload := strings.NewReader("{\n \"communityId\": \"<string>\",\n \"details\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"light\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n },\n \"dark\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n }\n },\n \"content\": \"<string>\",\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"disableComments\": true,\n \"disableLikes\": true,\n \"displayBannerOnPost\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ]\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/posts")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"communityId\": \"<string>\",\n \"details\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"light\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n },\n \"dark\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n }\n },\n \"content\": \"<string>\",\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"disableComments\": true,\n \"disableLikes\": true,\n \"displayBannerOnPost\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/posts")
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 \"communityId\": \"<string>\",\n \"details\": {\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"light\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n },\n \"dark\": {\n \"primaryImageUrl\": \"<string>\",\n \"secondaryImageUrl\": \"<string>\"\n }\n },\n \"content\": \"<string>\",\n \"startsAt\": \"<string>\",\n \"expiresAt\": \"<string>\",\n \"disableComments\": true,\n \"disableLikes\": true,\n \"displayBannerOnPost\": true,\n \"tags\": [\n \"<string>\"\n ],\n \"campaigns\": [\n \"<string>\"\n ],\n \"featured\": true,\n \"isGlobalTemplate\": true,\n \"availableAsTemplateForOrganisations\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organisationId": "<string>",
"communityId": "<string>",
"details": {
"title": "<string>",
"description": "<string>",
"light": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
},
"dark": {
"primaryImageUrl": "<string>",
"secondaryImageUrl": "<string>"
}
},
"likes": [
"<string>"
],
"disableComments": true,
"disableLikes": true,
"displayBannerOnPost": true,
"status": "archived",
"tags": [
"<string>"
],
"campaigns": [
"<string>"
],
"availableAsTemplateForOrganisations": [
"<string>"
],
"isGlobalTemplate": true,
"createdAt": "<string>",
"createdBy": "<string>",
"isEditing": true,
"content": "<string>",
"startsAt": "<string>",
"expiresAt": "<string>",
"featured": true,
"updatedAt": "<string>",
"updatedBy": "<string>"
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Body
The input required to create a post
The content of the post in HTML. Example:
Welcome to Your New Post
This is a placeholder post to demonstrate the capabilities of the editor. Feel free to explore and edit this content to see what you can do!
Basic Formatting
You can use bold, italic, underline, and strikethrough text to emphasize your content.
Lists
You can create a bullet list:
Item 1
Item 2
Item 3
Or a numberered list:
First Item
Second Item
Third Item
Links
You can also add links to your content. For example, visit Example.com for more information.
Images
Including images is simple. Here is an example image:
Blockquotes
You can use blockquotes to highlight important quotes or information:
"This is a sample blockquote. It's great for highlighting quotes or important information in your post."
Feel free to edit this content and explore the various features of the editor. Happy posting!
Response
Successful response
A post
The content of the post in HTML. Example:
Welcome to Your New Post
This is a placeholder post to demonstrate the capabilities of the editor. Feel free to explore and edit this content to see what you can do!
Basic Formatting
You can use bold, italic, underline, and strikethrough text to emphasize your content.
Lists
You can create a bullet list:
Item 1
Item 2
Item 3
Or a numberered list:
First Item
Second Item
Third Item
Links
You can also add links to your content. For example, visit Example.com for more information.
Images
Including images is simple. Here is an example image:
Blockquotes
You can use blockquotes to highlight important quotes or information:
"This is a sample blockquote. It's great for highlighting quotes or important information in your post."
Feel free to edit this content and explore the various features of the editor. Happy posting!
Was this page helpful?

