Write Actions

Edit Draft Tweet

Replace an existing draft's contents on the account behind your registered session. The fields you send become the draft in full: text is required, and media_ids, reply_to and quote are re-applied rather than merged, so send everything the draft should keep. Billed at $0.0016 per call. Cost: $0.0016 per call.

post/draft/edit

Request

  • Base URL: https://api.twitterapis.com/twitter
  • URL: https://api.twitterapis.com/twitter/draft/edit
  • Auth: HTTP bearer

Request body

idstring required

ID of the draft to edit, from draft/list. Also accepted as draft_tweet_id.

textstring required

The replacement draft body. Required: an edit with no text is refused with 400.

media_idsstring

Up to 4 media IDs from media/upload, as a comma-separated string or a JSON array. Omitting it drops the media the draft had; it is not merged.

reply_tostring

ID of the tweet this draft replies to (send it as a string).

quotestring

ID of the tweet this draft quotes (send it as a string).

Example request

{
  "id": "2086650228950683648",
  "text": "Draft v2: the Q1 changelog ships Thursday.",
  "media_ids": "1899999999999999999",
  "reply_to": "2080297101888733302",
  "quote": "1900000000000000000"
}

Response

Replace the contents of an existing draft on your own account.

okboolean

True when the edit call reached X and X answered success. The response body is not re-read, so this is transport-level success rather than a re-read of the stored draft.

draft_tweet_idstring

The draft ID you edited, echoed back.

Changes

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