Skip to main content
GET
/
posts
/
{postId}
Get post by id
curl --request GET \
  --url https://{subdomain}.nudj.cx/api/v2/admin/posts/{postId} \
  --header 'x-api-token: <api-key>'
{
  "id": "<string>",
  "organisationId": "<string>",
  "communityId": "<string>",
  "details": {
    "title": "<string>",
    "description": "<string>",
    "light": {
      "primaryImageUrl": "<string>",
      "secondaryImageUrl": "<string>"
    },
    "dark": {
      "primaryImageUrl": "<string>",
      "secondaryImageUrl": "<string>"
    }
  },
  "content": "<string>",
  "likes": [
    "<string>"
  ],
  "disableComments": true,
  "disableLikes": true,
  "displayBannerOnPost": true,
  "status": "archived",
  "startsAt": "<string>",
  "expiresAt": "<string>",
  "featured": true,
  "tags": [
    "<string>"
  ],
  "campaigns": [
    "<string>"
  ],
  "availableAsTemplateForOrganisations": [
    "<string>"
  ],
  "isGlobalTemplate": true,
  "createdAt": "<string>",
  "createdBy": "<string>",
  "updatedAt": "<string>",
  "updatedBy": "<string>",
  "isEditing": true
}

Authorizations

x-api-token
string
header
required

Headers

x-language
string

The language to return the post in. If not provided, the default language for the organisation will be used.

Path Parameters

postId
string
required

Response

Successful response

A post

id
string
required

The id of the post

organisationId
string
required

The organisation that the post belongs to

communityId
string
required

The community that the post belongs to

details
object
required

Used to describe an entity The details of this post such as title, description, bannerUrl, logoUrl

likes
string[]
required

Array of user IDs who liked this post

disableComments
boolean
required

Whether comments are disabled on this post. Defaults to false.

disableLikes
boolean
required

Whether likes are disabled on this post. Defaults to false.

displayBannerOnPost
boolean
required

Whether to display a banner on this post. Defaults to false.

status
enum<string>
required

The status of the post

Available options:
archived,
draft,
expired,
live,
scheduled
tags
string[]
required

A list of tags to associate with this post

campaigns
string[]
required

A list of campaigns to associate with this post

availableAsTemplateForOrganisations
string[]
required

The organisations that the post is available as a template for

isGlobalTemplate
boolean
required

Whether the post is a global template

createdAt
string
required

The date when this post was created

createdBy
string
required

The user who created this post

isEditing
boolean
required
content
string | null

The content of the post in HTML. Example:

<h1>Welcome to Your New Post</h1> <p>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!</p> <h2>Basic Formatting</h2> <p>You can use <strong>bold</strong>, <em>italic</em>, underline, and <s>strikethrough</s> text to emphasize your content. </p> <h2>Lists</h2> <p>You can create a bullet list: </p><ul data-tight="true" class="list-disc list-outside leading-3 -mt-2 tight"><li class="leading-normal -mb-2"><p>Item 1</p></li><li class="leading-normal -mb-2"><p>Item 2</p></li><li class="leading-normal -mb-2"><p>Item 3 </p></li></ul><p>Or a numberered list:</p><ol data-tight="true" class="list-decimal list-outside leading-3 -mt-2 tight"><li class="leading-normal -mb-2"><p> First Item </p></li><li class="leading-normal -mb-2"><p>Second Item </p></li><li class="leading-normal -mb-2"><p>Third Item </p></li></ol> <h2>Links </h2> <p>You can also add links to your content. For example, visit <a href="https://www.example.com" class="underline underline-offset-[3px] hover:text-primary transition-colors cursor-pointer" rel="noopener noreferrer nofollow">Example.com</a> for more information. </p> <h2>Images </h2> <p>Including images is simple. Here is an example image: </p><img src="https://via.placeholder.com/150" class="rounded-lg border border-muted"> <h2>Blockquotes </h2> <p>You can use blockquotes to highlight important quotes or information: </p><blockquote class="border-l-4 border-primary"><p>"This is a sample blockquote. It's great for highlighting quotes or important information in your post." </p></blockquote><p></p> <p>Feel free to edit this content and explore the various features of the editor. Happy posting!</p>
startsAt
string | null

The date when this post becomes visible.

expiresAt
string | null

The date when this post expires.

updatedAt
string | null

The date when this post was updated

updatedBy
string | null

The user who last updated this post

I