app.bsky.draft.defs

bsky-lexicons.bsky.social

{
  "id": "app.bsky.draft.defs",
  "defs": {
    "draft": {
      "type": "object",
      "required": [
        "posts"
      ],
      "properties": {
        "langs": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "language"
          },
          "maxLength": 3,
          "description": "Indicates human language of posts primary text content."
        },
        "posts": {
          "type": "array",
          "items": {
            "ref": "#draftPost",
            "type": "ref"
          },
          "maxLength": 100,
          "minLength": 1,
          "description": "Array of draft posts that compose this draft."
        },
        "deviceId": {
          "type": "string",
          "maxLength": 100,
          "description": "UUIDv4 identifier of the device that created this draft."
        },
        "deviceName": {
          "type": "string",
          "maxLength": 100,
          "description": "The device and/or platform on which the draft was created."
        },
        "threadgateAllow": {
          "type": "array",
          "items": {
            "refs": [
              "app.bsky.feed.threadgate#mentionRule",
              "app.bsky.feed.threadgate#followerRule",
              "app.bsky.feed.threadgate#followingRule",
              "app.bsky.feed.threadgate#listRule"
            ],
            "type": "union"
          },
          "maxLength": 5,
          "description": "Allow-rules for the threadgate to be created when this draft is published."
        },
        "postgateEmbeddingRules": {
          "type": "array",
          "items": {
            "refs": [
              "app.bsky.feed.postgate#disableRule"
            ],
            "type": "union"
          },
          "maxLength": 5,
          "description": "Embedding rules for the postgates to be created when this draft is published."
        }
      },
      "description": "A draft containing an array of draft posts."
    },
    "draftPost": {
      "type": "object",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string",
          "maxLength": 3000,
          "description": "The primary post content.",
          "maxGraphemes": 300
        },
        "labels": {
          "refs": [
            "com.atproto.label.defs#selfLabels"
          ],
          "type": "union",
          "description": "Self-label values for this post. Effectively content warnings."
        },
        "embedImages": {
          "type": "array",
          "items": {
            "ref": "#draftEmbedImage",
            "type": "ref"
          },
          "maxLength": 4
        },
        "embedVideos": {
          "type": "array",
          "items": {
            "ref": "#draftEmbedVideo",
            "type": "ref"
          },
          "maxLength": 1
        },
        "embedRecords": {
          "type": "array",
          "items": {
            "ref": "#draftEmbedRecord",
            "type": "ref"
          },
          "maxLength": 1
        },
        "embedExternals": {
          "type": "array",
          "items": {
            "ref": "#draftEmbedExternal",
            "type": "ref"
          },
          "maxLength": 1
        }
      },
      "description": "One of the posts that compose a draft."
    },
    "draftView": {
      "type": "object",
      "required": [
        "id",
        "draft",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "tid",
          "description": "A TID to be used as a draft identifier."
        },
        "draft": {
          "ref": "#draft",
          "type": "ref"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "The time the draft was created."
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime",
          "description": "The time the draft was last updated."
        }
      },
      "description": "View to present drafts data to users."
    },
    "draftWithId": {
      "type": "object",
      "required": [
        "id",
        "draft"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "tid",
          "description": "A TID to be used as a draft identifier."
        },
        "draft": {
          "ref": "#draft",
          "type": "ref"
        }
      },
      "description": "A draft with an identifier, used to store drafts in private storage (stash)."
    },
    "draftEmbedImage": {
      "type": "object",
      "required": [
        "localRef"
      ],
      "properties": {
        "alt": {
          "type": "string",
          "maxGraphemes": 2000
        },
        "localRef": {
          "ref": "#draftEmbedLocalRef",
          "type": "ref"
        }
      }
    },
    "draftEmbedVideo": {
      "type": "object",
      "required": [
        "localRef"
      ],
      "properties": {
        "alt": {
          "type": "string",
          "maxGraphemes": 2000
        },
        "captions": {
          "type": "array",
          "items": {
            "ref": "#draftEmbedCaption",
            "type": "ref"
          },
          "maxLength": 20
        },
        "localRef": {
          "ref": "#draftEmbedLocalRef",
          "type": "ref"
        }
      }
    },
    "draftEmbedRecord": {
      "type": "object",
      "required": [
        "record"
      ],
      "properties": {
        "record": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      }
    },
    "draftEmbedCaption": {
      "type": "object",
      "required": [
        "lang",
        "content"
      ],
      "properties": {
        "lang": {
          "type": "string",
          "format": "language"
        },
        "content": {
          "type": "string",
          "maxLength": 10000
        }
      }
    },
    "draftEmbedExternal": {
      "type": "object",
      "required": [
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "draftEmbedLocalRef": {
      "type": "object",
      "required": [
        "path"
      ],
      "properties": {
        "path": {
          "type": "string",
          "maxLength": 1024,
          "minLength": 1,
          "description": "Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}

Validate Record

Validate a record against app.bsky.draft.defs

Validation Options
Automatically resolve and include external schemas for full validation
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:4v4y5r3lwsbtmsxhile2ljac
CID
bafyreih2eta22shvxzwdyu336oewjks7jbsm544jzke7t7v2lbdisicaem
Indexed At
2026-02-12 22:21 UTC
AT-URI
at://did:plc:4v4y5r3lwsbtmsxhile2ljac/com.atproto.lexicon.schema/app.bsky.draft.defs

Referenced Schemas (6)

Lexicon Garden

@