Articles

Update Article Cover Image

Set the cover image on an article you own, identified by its entity id. This attaches media you have already uploaded; it does not upload anything itself, so call media/upload first and pass the media_id it returns. Requires a registered session. Billed at $0.0016 per call. Cost: $0.0016 per call.

post/article/update_cover_media

Request

  • Base URL: https://api.twitterapis.com/twitter
  • URL: https://api.twitterapis.com/twitter/article/update_cover_media
  • Auth: HTTP bearer

Request body

idstring required

The article's base64 entity id, returned by article/create or article/list (the id field, not rest_id).

media_idstring required

The media id returned by media/upload for the image you want to use as the cover.

media_categorystring

X's media category for the upload. Defaults to DraftTweetImage, which is what the X article editor itself sends. Only override this if you know X expects a different category for your media.

Example request

{
  "id": "QXJ0aWNsZUVudGl0eToyMDg2NjUwMjI4OTUwNjgzNjQ4",
  "media_id": "2088949698573090816",
  "media_category": "DraftTweetImage"
}

Response

Attach an uploaded image as an article's cover.

okboolean

True when the cover image was attached.

articleobject

The updated article, full shape, with cover_media now populated: id, rest_id, title, preview_text, lifecycle, content_state, cover_media, media_entities, author, created_at_secs, modified_at_secs, first_published_at_secs, visibility_setting, tweet_id, public_url.

Changes

No recorded changes to this operation across all 1 revision of this API.