Skip to Content
MinexonMinexon

content.article

Read a news article, its comments and related articles.

GET/api/v1/{locale}/news/{slug}

API scope content.article

Request

Send Authorization: Bearer <key> with each request.

Path parameters

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

This endpoint takes no request body.

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

curl --fail-with-body --request GET \
  -H "Authorization: Bearer $MINEXON_API_KEY" \
  "${MINEXON_BASE_URL}/api/v1/en/news/example"

Response

HTTP 200 · application/json

The fields below are inside the response’s data object.

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.
Nested fields
FieldTypeRequirementDescription
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.

Selected fields from an example response

{
  "data": {
    "locale": "en",
    "post": {
      "slug": "opening-week",
      "title": "Opening week",
      "body": [
        "The new world opens on Saturday."
      ],
      "commentMode": "moderated"
    },
    "engagement": {
      "views": 4,
      "likes": 1,
      "liked": false,
      "comments": [],
      "pendingComments": [],
      "commentNonce": "<issued nonce>"
    }
  }
}

Flow and error cases

When commenting is available, engagement.commentNonce is the value used for submission in the same session.

Shared error and authentication contract