Skip to content

Markdown Source

Use the raw markdown for copy, automation, and AI agents.

View Markdown

Comment API

List Comments By Post

prolog
GET API_BASE/comments?post_id=:post_id&offset=:offset&limit=:limit

Parameters

ParameterTypeDescription
post_iduint64The post ID.
offsetnumberPagination offset.
limitnumberPagination limit.

Response

json
{
  "data": {
    "pagination": {
      "total": 0,
      "offset": 0,
      "next_offset": 20,
      "limit": 20
    },
    "items": [CommentObject, ...]
  },
  "ts": 1723923923
}

Create Comment

prolog
POST API_BASE/comments

Authorization Required

OAuthAPIKey
YesYes

Request Body

json
{
  "post_id": 1,
  "quote_comment_id": 0,
  "content": "..."
}

Response

json
{
  "data": CommentObject,
  "ts": 1723923923
}

Approve Comment

prolog
PUT API_BASE/comments/:comment_id/approve

Authorization Required

OAuthAPIKey
YesYes

Only the post owner can approve or reject comments.

Response

json
{
  "data": null,
  "ts": 1723923923
}

Reject Comment

prolog
PUT API_BASE/comments/:comment_id/reject

Authorization Required

OAuthAPIKey
YesYes

Response

json
{
  "data": null,
  "ts": 1723923923
}

Mark Comment as Spam

prolog
PUT API_BASE/comments/:comment_id/spam

Authorization Required

OAuthAPIKey
YesYes

Response

json
{
  "data": null,
  "ts": 1723923923
}

Delete Comment

prolog
DELETE API_BASE/comments/:comment_id

Authorization Required

OAuthAPIKey
YesYes

Authors and post owners can delete comments.

Response

json
{
  "data": null,
  "ts": 1723923923
}