Skip to content

DraftRequest

The whole content of a draft; a save replaces what the draft had. A draft keeps text that a post would refuse (empty, or longer than max_post_characters), up to 100,000 characters, and media that are still being processed; publishing it checks it as a new post.

object
text

The plain text; omitted or empty while there is none.

string
<= 100000 characters
spoiler_text

The content warning; omitted or empty for none. It counts toward max_post_characters.

string
sensitive

Whether the media are sensitive.

boolean
language

A BCP 47 language tag; omitted means the user’s default post language.

string
>= 1 characters <= 35 characters
visibility
required

Who may see a status: public everyone, listed on public timelines; local logged-in users of this instance and followers; unlisted everyone, kept off public timelines; private followers and mentioned accounts; direct mentioned accounts.

string
Allowed values: public local unlisted private direct
in_reply_to_id

The post to reply to, checked when the draft is scheduled and published.

string format: uuid
quoted_status_id

The post to quote, checked when the draft is scheduled and published.

string format: uuid
interaction_policy

Who may reply to, boost, and quote the post; the kinds left out take the user’s default_interaction_policy when the draft is published.

Schema: InteractionPolicyChange

object
media

The media to attach, in order: the user’s own uploads, processed or not. A draft with a poll attaches none.

Array<object>
<= 4 items

A media file to attach, with its alternative text.

object
id
required

The ID of a resource, a UUIDv7 in its canonical string form.

string format: uuid
description

The alternative text; omitted or empty for none. While the instance requires alt text (limits.require_media_description of GET /instance), a post or an edit whose media file has none, or only spaces, is a 422.

string
<= 1500 characters
poll

Schema: DraftPoll

object
article
object

Example generated

{
"text": "example",
"spoiler_text": "example",
"sensitive": true,
"language": "example",
"visibility": "public",
"in_reply_to_id": "01890a5d-ac96-774b-bcce-b302099a8057",
"quoted_status_id": "01890a5d-ac96-774b-bcce-b302099a8057",
"interaction_policy": {},
"media": [
{
"id": "01890a5d-ac96-774b-bcce-b302099a8057",
"description": "example"
}
],
"poll": {},
"article": {}
}

For LLMs and coding agents:llms.txt,llms-full.txt, llms-small.txt

Analytics on this site