Post APIs

Create new post

post

This api allow the user to create new post to topic in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Body
contentstringRequired
toPidintegerOptional
Responses
200

successful operation

application/json
post
/discussion/v2/topics/{tid}

Create reply to post

post

This api allow the user to create reply to post in nodebb

Path parameters
tidintegerRequired
Header parameters
AuthorizationstringRequired
Body
contentstringRequired
toPidintegerRequired
Responses
200

successful operation

application/json
post
/discussion/v2/topics/{tid}

Delete a post by postID

delete

This api allows the user to delete post in the nodebb

Path parameters
pidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200

successful operation

application/json
delete
/discussion/v2/posts/{pid}

Vote a post by postID

post

This api allows the user to vote(Up/down) to post in the nodebb

Path parameters
pidintegerRequired
Header parameters
AuthorizationstringRequired
Body
deltaintegerRequired

delta must be a number. If delta > 0, it's considered an upvote; if delta < 0, it's considered a downvote; otherwise, it's an unvote.

Responses
200

successful operation

application/json
post
/discussion/v2/posts/{pid}/vote

Remove votes for a post by postID

delete

This api allows the user to delete vote(Up/down) to post in the nodebb

Path parameters
pidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200

successful operation

application/json
delete
/discussion/v2/posts/{pid}/vote

Bookmarks a post by postID

post

This api allows the user to bookmarks a post in the nodebb

Path parameters
pidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200

successful operation

application/json
post
/discussion/v2/posts/{pid}/bookmark

Removes bookmarks for a post by postID

delete

This api allows the user to Unbookmarks a post in the nodebb

Path parameters
pidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200

successful operation

application/json
delete
/discussion/v2/posts/{pid}/bookmark

Restores a post

put

This api allows the user to Restores a post in the nodebb

Path parameters
pidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200

successful operation

application/json
put
/discussion/v2/posts/{pid}/state

Deletes a post (Soft-delete)

delete

This api allows the user to Deletes a post in the nodebb

Path parameters
pidintegerRequired
Header parameters
AuthorizationstringRequired
Responses
200

successful operation

application/json
delete
/discussion/v2/posts/{pid}/state

Last updated

Was this helpful?