Post API v1 comment

Changed on
post/api/v1/comment/

Request

  • The document declares no server URL.
  • Auth: HTTP bearer

Request body

$schemastring uri

A URL to the JSON Schema for this object.

descriptionstring required

Content of the comment

is_anonymousboolean required

If true, user_id is hidden from regular users; super user always sees it

parent_comment_idstring

CommentID the comment belongs to

post_idstring required

PostID the comment belongs to

Example request

{
  "$schema": "https://example.com/schemas/CreateCommentBody.json",
  "description": "This is a helpful thread",
  "parent_comment_id": "550e8400-e29b-41d4-a716-446655440000",
  "post_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

descriptionstring required

Content of the comment

idstring required

ID of comment

is_anonymousboolean required

True if posted as anonymous; frontend can show 'Anonymous' when user_id is omitted

parent_comment_idstring required

CommentID the comment belongs to

post_idstring required

PostID the comment belongs to

userstring

The user who commented; omitted for anonymous comments

Example response

{
  "$schema": "https://example.com/schemas/CreateCommentResponse.json",
  "description": "This is a helpful thread",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "parent_comment_id": "550e8400-e29b-41d4-a716-446655440000",
  "post_id": "550e8400-e29b-41d4-a716-446655440000"
}

Changes