Developers can use this API to edit permanent articles.

Notes:

  1. Articles (permanent articles) can also be saved in Media Asset Management module on Official Accounts Platform.
  2. This API must be called using the HTTPS protocol.

API Request Format

HTTP request method: POST
https://api.weixin.qq.com/cgi-bin/material/update_news?access_token=ACCESS_TOKEN

Calling Example

{
  "media_id":MEDIA_ID,
  "index":INDEX,
  "articles": {
       "title": TITLE,
       "thumb_media_id": THUMB_MEDIA_ID,
       "author": AUTHOR,
       "digest": DIGEST,
       "show_cover_pic": SHOW_COVER_PIC(0 / 1),
       "content": CONTENT,
       "content_source_url": CONTENT_SOURCE_URL
    }
}

Parameters

Parameter Required Description
media_id Yes ID of the article to be edited
index Yes The location of the article to be updated in a multiple-article broadcast. This field only takes effect when there are multiple articles. 0 indicates the first one.
title Yes The Title
thumb_media_id Yes The ID for the cover image asset of articles (it must be a permanent mediaID)
author Yes The author
digest Yes The summary of an article. Only the single article has a summary. For multiple articles, it is empty.
show_cover_pic Yes Indicates whether to display the cover. 0 is false, indicating not to display; 1 is true, indicating to display.
content Yes Detailed contents of articles, which supports HTML tags. It must be less than 20,000 characters and 1 MB in size. JS-related content will be removed.
content_source_url Yes The URL to the original page of an article. This is the URL to be redirected to after Read More is tapped.

Response Description

{
  "errcode": ERRCODE,
  "errmsg": ERRMSG
}

The errcode is 0 for a successful call.