Skip to content

Add a comment to an article

POST
/cms/content/{id}/comment
curl --request POST \
--url https://api.example.com/cms/content/example/comment \
--header 'API-Key: <API-Key>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Token: <Token>' \
--data '{ "postername": "example", "posteremail": "example", "source": "example", "reply_to": "example", "comment": "example", "comment_anonymously": true, "metadata": {}, "set_as_approved": 1 }'
id
required
string

Content ID

Comment payload (supports multipart/form-data for file uploads)

One of:

JSON payload for comment (without file upload) or rating

object
postername

Name of the poster (optional if logged in)

string
posteremail

Email of the poster (optional if logged in)

string
source

Source of the comment

string
reply_to

ID of the comment being replied to (optional)

string
comment

Comment text

string
comment_anonymously

Post comment anonymously (only if logged in)

boolean
metadata

Comment metadata (optional)

object
set_as_approved

Set comment as approved (1) or pending (0) (only using an Admin API key or UserToken header)

integer

Example generated

{
"postername": "example",
"posteremail": "example",
"source": "example",
"reply_to": "example",
"comment": "example",
"comment_anonymously": true,
"metadata": {},
"set_as_approved": 1
}

Comment added

Media typeapplication/json
object
comment_id

ID of the newly created comment

integer

Example generated

{
"comment_id": 1
}