Skip to main content
POST
/
comments
Add a new comment
curl --request POST \
  --url https://{subdomain}.nudj.cx/api/v2/integration/comments \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "communityId": "<string>",
  "discussionId": "<string>",
  "content": "<string>",
  "imageUrl": "<string>"
}
'
{
  "id": "<string>",
  "organisationId": "<string>",
  "communityId": "<string>",
  "discussionId": "<string>",
  "content": "<string>",
  "createdAt": "<string>",
  "createdBy": "<string>",
  "updatedAt": "<string>",
  "updatedBy": "<string>",
  "username": "<string>",
  "displayName": "<string>",
  "parentId": "<string>",
  "imageUrl": "<string>",
  "profilePictureUrl": "<string>"
}

Authorizations

x-api-token
string
header
required

Body

application/json

The input required to create a comment

communityId
string
required

The id of the community the comment belongs to

Pattern: ^[0-9a-fA-F]{24}$
discussionId
string
required

The id of the discussion the comment belongs to

Pattern: ^[0-9a-fA-F]{24}$
content
string

The content of the comment

Minimum string length: 1
imageUrl
string | null

The url of the image attached to the comment

Response

Successful response

A comment

id
string
required

The id of the comment

Pattern: ^[0-9a-fA-F]{24}$
organisationId
string
required

The id of the organisation the comment belongs to

Pattern: ^[0-9a-fA-F]{24}$
communityId
string
required

The id of the community the comment belongs to

Pattern: ^[0-9a-fA-F]{24}$
discussionId
string
required

The id of the discussion the comment belongs to

Pattern: ^[0-9a-fA-F]{24}$
content
string
required

The content of the comment

Minimum string length: 1
createdAt
string
required

The date the comment was created

createdBy
string
required

The id of the user who created the comment

Pattern: ^[0-9a-fA-F]{24}$
updatedAt
string
required

The date the comment was last updated

updatedBy
string
required

The id of the user who last updated the comment

Pattern: ^[0-9a-fA-F]{24}$
username
string
required

The username of the user who created the comment

displayName
string
required

The display name of the user who created the comment

parentId
string | null

The id of the parent comment

Pattern: ^[0-9a-fA-F]{24}$
imageUrl
string | null

The url of the image attached to the comment

profilePictureUrl
string | null

The url of the profile picture of the user who created the comment