Skip to Content
MinexonMinexon

content.news-comment

Submit a news comment where commenting is available.

POST/api/v1/{locale}/news/{slug}/comment

API scope content.news-comment

Request

Send Authorization: Bearer <key> with each request.

Path parameters

FieldTypeRequirementDescription
localetr or enRequiredRequest locale.
slugstringRequiredURL slug of the resource.

Request body

FieldTypeRequirementDescription
commentstringRequiredComment text, 10–1,500 characters.
_noncestringRequiredengagement.commentNonce from article details in the same session.

Run samples from your application server. See Quickstart for variables and sessions.

curl --fail-with-body --request POST \
  -H "Authorization: Bearer $MINEXON_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{
  "comment": "Thanks for the announcement.",
  "_nonce": "<commentNonce from GET>"
}' \
  "${MINEXON_BASE_URL}/api/v1/en/news/example/comment"

Response

HTTP 200 · application/json

FieldTypeRequirementDescription
nextstringRequiredNext location returned by the CMS or provider.
noticesstring[]ConditionalSuccess and state codes.
errorstringConditionalError code.
errorsstring[]ConditionalField or operation error codes.
{
  "next": "/en/news/example"
}

When the form is shown again, the response can contain data instead of next. Check the HTTP status and the error fields together.

Form response fields
FieldTypeRequirementDescription
localestringRequiredResponse locale.
errorstring or nullConditionalAction error. Can be empty on success.
errorsarray or objectConditionalField or form validation errors.
noticestring or nullConditionalAction notice.
postobjectConditionalSelected news article.
engagementobjectConditionalLike and comment state.
newsCommentRestrictedbooleanConditionalNews comment restriction for the account.
newsLikeRestrictedbooleanConditionalNews like restriction for the account.
engagementActionstring or nullConditionalLast engagement action.
engagementErrorstring or nullConditionalLast engagement error.
engagementNoticestring or nullConditionalLast engagement notice.
relatedarray or objectConditionalRelated published records.
post.bodyHtmlstring or nullConditionalFormatted article body.
post.bodystring[]ConditionalPlain-text paragraphs.
post.commentModeclosed, moderated or immediateConditionalPublication rule for comments on this article.
engagement.viewsintegerConditionalView count.
engagement.likesintegerConditionalLike count.
engagement.likedbooleanConditionalLike state for the current account or guest session.
engagement.commentsarrayConditionalPublished comments.
engagement.pendingCommentsarrayConditionalPending comments for this account or session.
engagement.commentNoncestring or nullConditionalSend as _nonce in the comment request within the same session.

Flow and error cases

A comment can be published or held for approval depending on settings. Check the article afterward.

Shared error and authentication contract