Skip Navigation Links

Post Comments

Endpoint Overview

GET /api/posts/v4/comments/{comment_id}
Get a Comment
PATCH /api/posts/v4/comments/{comment_id}
Update a Comment
DELETE /api/posts/v4/comments/{comment_id}
Delete a Comment
POST /api/posts/v4/comments/{comment_id}/pin
Pin a Comment
DELETE /api/posts/v4/comments/{comment_id}/pin
Unpin a Comment
GET /api/posts/v4/comments/{comment_id}/replies
Get a Comment's Replies
POST /api/posts/v4/comments/{comment_id}/report
Report a Comment
GET /api/posts/v4/comments/{comment_id}/translate
Get a Comment Auto-Translation
POST /api/posts/v4/comments/{comment_id}/translate
Trigger a Comment Auto-Translation
GET /api/posts/v4/posts/{post_id}/comments
Get a Post's Comments
POST /api/posts/v4/posts/{post_id}/comments
Add a Comment to a Post

Get a Comment

Requires authentication via bearer.

Get a single comment of a post by its primary identifier.

The body is always returned in its original language. Use the comment auto-translation endpoints to request and retrieve a translated body.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Query Params

embed string[]

Options for embedding additional data into comment responses:

  • AUTHOR: Includes the comment author's profile in the author field.
  • ATTACHMENTS: Includes the files attached to the comment in the attachments field.
  • REACTIONS: Includes the reactions on the comment in the reactions_summary field.
  • REPLIES: Includes the first replies to the comment in the replies field. The number of replies is controlled by reply_limit.

The embed options also apply to the comments in replies.

reply_limit integer

The maximum number of replies to embed per comment. Only applicable together with the REPLIES embed option, and ignored without it.

Headers

Accept-Language string

The preferred language used when returning localized strings.

Response Body

200 OK

Error Codes

  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND

Update a Comment

Requires authentication via bearer.

Update a comment of a post by its primary identifier.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Query Params

embed string[]

Options for embedding additional data into comment responses:

  • AUTHOR: Includes the comment author's profile in the author field.
  • ATTACHMENTS: Includes the files attached to the comment in the attachments field.
  • REACTIONS: Includes the reactions on the comment in the reactions_summary field.
  • REPLIES: Includes the first replies to the comment in the replies field. The number of replies is controlled by reply_limit.

The embed options also apply to the comments in replies.

reply_limit integer

The maximum number of replies to embed per comment. Only applicable together with the REPLIES embed option, and ignored without it.

Headers

Accept-Language string

The preferred language used when returning localized strings.

Request Body

body string

The plain-text body of the comment.

mentioned_user_ids string[]
attachments string[]

The unique identifier of the file to attach.

The file must be created and uploaded via the Files API and have status FINISHED before it can be attached.

Response Body

200 OK

Error Codes

  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND
  • COMMENTS_DISABLED
  • INVALID_CONTENT
  • ATTACHMENT_NOT_FOUND
  • DISALLOWED_ATTACHMENT_TYPE

Delete a Comment

Requires authentication via bearer.

Delete a comment of a post by its primary identifier.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Response Body

204 No Content

Error Codes

  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND

Pin a Comment

Requires authentication via bearer.

Pin a comment on a post. Only one comment can be pinned per post; pinning replaces any previously pinned comment.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Response Body

201 Created

Error Codes

  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND

Unpin a Comment

Requires authentication via bearer.

Remove the pin from a comment on a post.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Response Body

204 No Content

Error Codes

  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND

Get a Comment's Replies

Requires authentication via bearer.

Returns a cursor-paginated list of the replies to a comment.

Replies that were deleted are still contained in the result with is_deleted set to true, so the structure of the conversation stays intact.

Comment bodies are always returned in their original language. Use the comment auto-translation endpoints to request and retrieve a translated body.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Query Params

sort string[]

Sort options for comments. Comments are ordered by the time they were created:

  • CREATED_AT_ASC: oldest comment first.
  • CREATED_AT_DESC: newest comment first.
page_cursor string

A cursor pointing to the first item to be contained in the response array. Refer to our general "pagination" concept for more information.

page_limit integer

The maximum number of items to be contained in the response array. Refer to our general "pagination" concept for more information.

embed string[]

Options for embedding additional data into comment responses:

  • AUTHOR: Includes the comment author's profile in the author field.
  • ATTACHMENTS: Includes the files attached to the comment in the attachments field.
  • REACTIONS: Includes the reactions on the comment in the reactions_summary field.
  • REPLIES: Includes the first replies to the comment in the replies field. The number of replies is controlled by reply_limit.

The embed options also apply to the comments in replies.

reply_limit integer

The maximum number of replies to embed per comment. Only applicable together with the REPLIES embed option, and ignored without it.

Headers

Accept-Language string

The preferred language used when returning localized strings.

Response Body

200 OK

Error Codes

  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND

Report a Comment

Requires authentication via bearer.

Report a comment.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Response Body

201 Created

Get a Comment Auto-Translation

Requires authentication via bearer.

Get the automatic translation of a comment for the requested target language.

The comment property is only present when status is TRANSLATED. It contains the comment with its body in the requested language, in the same shape as getting the comment itself. If no automatic translation was triggered for the target language before, status is NOT_REQUESTED.

When the target language matches the comment's own language, the original body is served as TRANSLATED right away.

FAILED is terminal: the automatic translation is not retried until the comment body is updated.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Query Params

target_language stringrequired

The language to translate the comment body into.

embed string[]

Options for embedding additional data into a comment translation response:

  • AUTHOR: Includes the comment author's profile in the author field.
  • ATTACHMENTS: Includes the files attached to the comment in the attachments field.
  • REACTIONS: Includes the reactions on the comment in the reactions_summary field.

Replies cannot be embedded here: only the comment's own body is translated, so embedded replies would carry untranslated bodies. Request the replies separately to translate them individually.

Response Body

200 OK

Error Codes

  • TARGET_LANGUAGE_NOT_SUPPORTED
  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND

Trigger a Comment Auto-Translation

Requires authentication via bearer.

Trigger an automatic translation of the comment's body into the requested target language.

The translation is processed asynchronously. Use the corresponding GET endpoint to poll for the result. Returns an error if the target language is not supported for automatic translation.

When the target language matches the comment's own language, no translation is triggered — the GET endpoint serves the original body directly.

A translation that previously failed is not retried. It stays FAILED until the comment body is updated, which invalidates the stored translation, or until the translation is triggered again with force set to true.

Path Params

comment_id stringrequired

The primary identifier of the comment to access.

Request Body

target_language stringrequired

A locale representing a language and region.

force boolean

Invalidate the stored automatic translation for the target language and request a new one — for example to retry a translation that previously failed.

Response Body

202 Accepted

Error Codes

  • TARGET_LANGUAGE_NOT_SUPPORTED
  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND

Get a Post's Comments

Requires authentication via bearer.

Returns a cursor-paginated list of the comments on a post. Only top-level comments are returned; replies are reachable via the REPLIES embed option or the replies endpoint.

Pinned comment: a post has at most one pinned comment. It is always returned as the first entry of comments on the first page — the page requested without a page_cursor — in either sort order, so it stays visible no matter how old it is. It is left out of the rest of the collection, so it is never returned twice and paging through every page still yields each comment exactly once. Because it is returned in addition to the requested page, the first page holds up to page_limit + 1 entries while every following page holds up to page_limit. Deleting a comment clears its pin, so a deleted comment is never hoisted. Use the pinned field to tell the pinned comment apart from the rest.

Comments that were deleted are still contained in the result with is_deleted set to true, so the structure of the conversation stays intact.

Comment bodies are always returned in their original language. Use the comment auto-translation endpoints to request and retrieve a translated body.

Path Params

post_id stringrequired

The primary identifier of the post to access.

Query Params

sort string[]

Sort options for comments. Comments are ordered by the time they were created:

  • CREATED_AT_ASC: oldest comment first.
  • CREATED_AT_DESC: newest comment first.
page_cursor string

A cursor pointing to the first item to be contained in the response array. Refer to our general "pagination" concept for more information.

page_limit integer

The maximum number of items to be contained in the response array. Refer to our general "pagination" concept for more information.

embed string[]

Options for embedding additional data into comment responses:

  • AUTHOR: Includes the comment author's profile in the author field.
  • ATTACHMENTS: Includes the files attached to the comment in the attachments field.
  • REACTIONS: Includes the reactions on the comment in the reactions_summary field.
  • REPLIES: Includes the first replies to the comment in the replies field. The number of replies is controlled by reply_limit.

The embed options also apply to the comments in replies.

reply_limit integer

The maximum number of replies to embed per comment. Only applicable together with the REPLIES embed option, and ignored without it.

Headers

Accept-Language string

The preferred language used when returning localized strings.

Response Body

200 OK

Error Codes

  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND

Add a Comment to a Post

Requires authentication via bearer.

Add a comment to a post as the current user.

Path Params

post_id stringrequired

The primary identifier of the post to access.

Query Params

embed string[]

Options for embedding additional data into comment responses:

  • AUTHOR: Includes the comment author's profile in the author field.
  • ATTACHMENTS: Includes the files attached to the comment in the attachments field.
  • REACTIONS: Includes the reactions on the comment in the reactions_summary field.
  • REPLIES: Includes the first replies to the comment in the replies field. The number of replies is controlled by reply_limit.

The embed options also apply to the comments in replies.

reply_limit integer

The maximum number of replies to embed per comment. Only applicable together with the REPLIES embed option, and ignored without it.

Headers

Accept-Language string

The preferred language used when returning localized strings.

Request Body

reply_to string

The unique identifier of the comment this comment replies to.

body string

The plain-text body of the comment. Either a body or at least one attachment must be present.

mentioned_user_ids string[]
attachments string[]

The unique identifier of the file to attach.

The file must be created and uploaded via the Files API and have status FINISHED before it can be attached.

Response Body

201 Created

Error Codes

  • POST_NOT_FOUND
  • POST_ACCESS_DENIED
  • COMMENT_NOT_FOUND
  • COMMENTS_DISABLED
  • INVALID_CONTENT
  • ATTACHMENT_NOT_FOUND
  • DISALLOWED_ATTACHMENT_TYPE