Skip to main content

app.bsky.draft.defs

#draftWithId​

A draft with an identifier, used to store drafts in private storage (stash).

PropertyTypeKnown ValuesRequiredDescription
idstring (tid)-✅A TID to be used as a draft identifier.
draft#draft-✅-

#draft​

A draft containing an array of draft posts.

PropertyTypeKnown ValuesRequiredDescription
deviceIdstring-❌UUIDv4 identifier of the device that created this draft.
deviceNamestring-❌The device and/or platform on which the draft was created.
postsarray of #draftPost-✅Array of draft posts that compose this draft.
langsarray of string-❌Indicates human language of posts primary text content.
postgateEmbeddingRulesarray of union
app.bsky.feed.postgate#disableRule
-❌Embedding rules for the postgates to be created when this draft is published.
threadgateAllowarray of union
app.bsky.feed.threadgate#mentionRule
app.bsky.feed.threadgate#followerRule
app.bsky.feed.threadgate#followingRule
app.bsky.feed.threadgate#listRule
-❌Allow-rules for the threadgate to be created when this draft is published.

#draftPost​

One of the posts that compose a draft.

PropertyTypeKnown ValuesRequiredDescription
textstring-✅The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts.
labelsunion of
com.atproto.label.defs#selfLabels
-❌-
embedImagesarray of #draftEmbedImage-❌-
embedGallery#draftEmbedGallery-❌-
embedVideosarray of #draftEmbedVideo-❌-
embedExternalsarray of #draftEmbedExternal-❌-
embedRecordsarray of #draftEmbedRecord-❌-

#draftView​

View to present drafts data to users.

PropertyTypeKnown ValuesRequiredDescription
idstring (tid)-✅A TID to be used as a draft identifier.
draft#draft-✅-
createdAtstring (datetime)-✅The time the draft was created.
updatedAtstring (datetime)-✅The time the draft was last updated.

#draftEmbedLocalRef​

PropertyTypeKnown ValuesRequiredDescription
pathstring-✅Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.

#draftEmbedCaption​

PropertyTypeKnown ValuesRequiredDescription
langstring (language)-✅-
contentstring-✅-

#draftEmbedGallery​

PropertyTypeKnown ValuesRequiredDescription
items#draftEmbedGalleryItems-✅-

#draftEmbedGalleryItems​

PropertyTypeKnown ValuesRequiredDescription
draftEmbedGalleryItemsarray of union
#draftEmbedImage
-❌The schema-level maxLength of 20 is a future-proof ceiling. Clients should currently enforce a soft limit of 10 items in authoring UIs.

#draftEmbedImage​

PropertyTypeKnown ValuesRequiredDescription
localRef#draftEmbedLocalRef-✅-
altstring-❌-

#draftEmbedVideo​

PropertyTypeKnown ValuesRequiredDescription
localRef#draftEmbedLocalRef-✅-
altstring-❌-
captionsarray of #draftEmbedCaption-❌-

#draftEmbedExternal​

PropertyTypeKnown ValuesRequiredDescription
uristring (uri)-✅-

#draftEmbedRecord​

PropertyTypeKnown ValuesRequiredDescription
recordcom.atproto.repo.strongRef-✅-