Contents

Promote Articles in a Section

Set the list of promoted articles for the specified section.

URL

POST https://news-api.apple.com/sections/{sectionId}/promotedArticles

Path Parameters

NameTypeDescription
sectionId Requiredstring

The UUID of the section.

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
PromoteArticleResponse

The request was successful.

400Bad Request
Content-Type: application/json
Error

The specified article ID isn’t a valid UUID.

Key path: data.promotedArticle.

401Unauthorized
Content-Type: application/json
Error

You didn’t include the Authorization header.

Key path: None.

403Forbidden
Content-Type: application/json
Error

The channel doesn’t have permission to promote the article.

Key path: data.promotedArticle.

Value: Invalid ID.

404Not Found
Content-Type: application/json
Error

  • The endpoint you tried to access doesn’t exist. Key path: None.

  • NOT_FOUND. The specified section ID doesn’t exist. Key path: None. Value: None.

  • NOT_FOUND. The article with the specified ID doesn’t exist. Key path: data.promotedArticle. Value: Article ID.

422
Content-Type: application/json
Error

MISSING_THUMBNAIL_FOR_PROMOTED_ARTICLE. The list of articles you promoted has at least one article without a thumbnail image.

Key path: data.promotedArticles.

Discussion

A Promote Articles in a Section request sets the list of promoted articles for the specified section. You can promote up to six articles per section. Note that each article promoted in a section should have a thumbnail image. The system generates an error if an article in the list doesn’t include a thumbnail image. The list of articles given in the body of this request replaces any previous list of promoted articles. You can remove the list of promoted articles for the section by specifying an empty list. The promoted articles list is valid for a system-defined time period after it is set.

The request body must be in JSON, in the following format:

{
  "data": {
    "promotedArticles": [
      "F59D1784-CAFC-432A-9A1A-EF2FCE1E1C60",
      "2027DD1B-2794-4B0A-B9DC-F7EE696411FF"
    ]
  }
}

Example

HTTP Body

The list of IDs for articles you want to promote.

See Also

Sections