{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lurkapi/json-schema/lurkapi-bluesky-reply-schema.json",
  "title": "BlueskyReply",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lurkapi-openapi.json#/components/schemas/BlueskyReply",
  "type": "object",
  "properties": {
    "uri": {
      "type": "string",
      "description": "The post's `at://` URI, its permanent id."
    },
    "cid": {
      "type": "string",
      "description": "Content hash of this version of the post."
    },
    "url": {
      "type": "string",
      "description": "The post on bsky.app."
    },
    "text": {
      "type": "string",
      "description": "Post text, with links the app shortened (`example.com/long-pa...`) written out in full. Empty for media-only posts."
    },
    "createdAt": {
      "type": "string",
      "description": "When it was posted, ISO 8601."
    },
    "author": {
      "type": "object",
      "properties": {
        "did": {
          "type": "string",
          "description": "The account's permanent id, e.g. `did:plc:z72i7hdynmk6r22z27h6tvur`."
        },
        "handle": {
          "type": "string",
          "description": "Handle, e.g. `bsky.app`. It can change; the DID doesn't."
        },
        "displayName": {
          "description": "Display name; null if not set.",
          "type": [
            "string",
            "null"
          ]
        },
        "avatar": {
          "description": "Avatar image URL; null if none.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "did",
        "handle",
        "displayName",
        "avatar"
      ],
      "additionalProperties": false,
      "description": "Who posted it."
    },
    "replyCount": {
      "type": "number",
      "description": "Replies."
    },
    "repostCount": {
      "type": "number",
      "description": "Reposts."
    },
    "likeCount": {
      "type": "number",
      "description": "Likes."
    },
    "quoteCount": {
      "type": "number",
      "description": "Quote posts."
    },
    "bookmarkCount": {
      "type": "number",
      "description": "Times saved to bookmarks."
    },
    "langs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Languages the author tagged, e.g. `en`."
    },
    "images": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "thumbnail": {
            "type": "string",
            "description": "Small image URL."
          },
          "fullsize": {
            "type": "string",
            "description": "Full-size image URL."
          },
          "alt": {
            "type": "string",
            "description": "Alt text; empty if none."
          }
        },
        "required": [
          "thumbnail",
          "fullsize",
          "alt"
        ],
        "additionalProperties": false
      },
      "description": "Attached images, in order. Empty if none."
    },
    "video": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "playlist": {
              "type": "string",
              "description": "HLS playlist (.m3u8) URL."
            },
            "thumbnail": {
              "description": "Poster image URL; null if none.",
              "type": [
                "string",
                "null"
              ]
            },
            "alt": {
              "description": "Alt text; null if none.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "playlist",
            "thumbnail",
            "alt"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Attached video; null if none."
    },
    "external": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "uri": {
              "type": "string",
              "description": "The linked page."
            },
            "title": {
              "type": "string",
              "description": "Link card title."
            },
            "description": {
              "type": "string",
              "description": "Link card description."
            },
            "thumbnail": {
              "description": "Link card image URL; null if none.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "uri",
            "title",
            "description",
            "thumbnail"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Link card; null if none."
    },
    "quote": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "uri": {
              "type": "string",
              "description": "The quoted post's `at://` URI. Pass it as `url` to the post endpoint."
            },
            "url": {
              "type": "string",
              "description": "The quoted post on bsky.app."
            },
            "text": {
              "description": "Its text; null when it was deleted or its author blocks viewers.",
              "type": [
                "string",
                "null"
              ]
            },
            "createdAt": {
              "description": "When it was posted, ISO 8601; null when unavailable.",
              "type": [
                "string",
                "null"
              ]
            },
            "author": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "did": {
                      "type": "string",
                      "description": "The account's permanent id, e.g. `did:plc:z72i7hdynmk6r22z27h6tvur`."
                    },
                    "handle": {
                      "type": "string",
                      "description": "Handle, e.g. `bsky.app`. It can change; the DID doesn't."
                    },
                    "displayName": {
                      "description": "Display name; null if not set.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "avatar": {
                      "description": "Avatar image URL; null if none.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "did",
                    "handle",
                    "displayName",
                    "avatar"
                  ],
                  "additionalProperties": false,
                  "description": "Who posted it."
                },
                {
                  "type": "null"
                }
              ],
              "description": "Who posted it; null when unavailable."
            }
          },
          "required": [
            "uri",
            "url",
            "text",
            "createdAt",
            "author"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "The post this one quotes; null if none or hidden from logged-out visitors. Embedded lists, feeds and starter packs aren't returned."
    },
    "links": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Full URLs of the links in the text."
    },
    "mentions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Accounts mentioned in the text: the handle as written, without @, or the DID when the mention isn't written as @handle."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Hashtags in the text, without #."
    },
    "replyTo": {
      "description": "`at://` URI of the post this replies to; null for top-level posts.",
      "type": [
        "string",
        "null"
      ]
    },
    "replies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BlueskyReply"
      },
      "description": "Replies to this reply."
    }
  },
  "required": [
    "uri",
    "cid",
    "url",
    "text",
    "createdAt",
    "author",
    "replyCount",
    "repostCount",
    "likeCount",
    "quoteCount",
    "bookmarkCount",
    "langs",
    "images",
    "video",
    "external",
    "quote",
    "links",
    "mentions",
    "tags",
    "replyTo",
    "replies"
  ],
  "additionalProperties": false,
  "$defs": {
    "BlueskyReply": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The post's `at://` URI, its permanent id."
        },
        "cid": {
          "type": "string",
          "description": "Content hash of this version of the post."
        },
        "url": {
          "type": "string",
          "description": "The post on bsky.app."
        },
        "text": {
          "type": "string",
          "description": "Post text, with links the app shortened (`example.com/long-pa...`) written out in full. Empty for media-only posts."
        },
        "createdAt": {
          "type": "string",
          "description": "When it was posted, ISO 8601."
        },
        "author": {
          "type": "object",
          "properties": {
            "did": {
              "type": "string",
              "description": "The account's permanent id, e.g. `did:plc:z72i7hdynmk6r22z27h6tvur`."
            },
            "handle": {
              "type": "string",
              "description": "Handle, e.g. `bsky.app`. It can change; the DID doesn't."
            },
            "displayName": {
              "description": "Display name; null if not set.",
              "type": [
                "string",
                "null"
              ]
            },
            "avatar": {
              "description": "Avatar image URL; null if none.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "did",
            "handle",
            "displayName",
            "avatar"
          ],
          "additionalProperties": false,
          "description": "Who posted it."
        },
        "replyCount": {
          "type": "number",
          "description": "Replies."
        },
        "repostCount": {
          "type": "number",
          "description": "Reposts."
        },
        "likeCount": {
          "type": "number",
          "description": "Likes."
        },
        "quoteCount": {
          "type": "number",
          "description": "Quote posts."
        },
        "bookmarkCount": {
          "type": "number",
          "description": "Times saved to bookmarks."
        },
        "langs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Languages the author tagged, e.g. `en`."
        },
        "images": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "thumbnail": {
                "type": "string",
                "description": "Small image URL."
              },
              "fullsize": {
                "type": "string",
                "description": "Full-size image URL."
              },
              "alt": {
                "type": "string",
                "description": "Alt text; empty if none."
              }
            },
            "required": [
              "thumbnail",
              "fullsize",
              "alt"
            ],
            "additionalProperties": false
          },
          "description": "Attached images, in order. Empty if none."
        },
        "video": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "playlist": {
                  "type": "string",
                  "description": "HLS playlist (.m3u8) URL."
                },
                "thumbnail": {
                  "description": "Poster image URL; null if none.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "alt": {
                  "description": "Alt text; null if none.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "playlist",
                "thumbnail",
                "alt"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Attached video; null if none."
        },
        "external": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "uri": {
                  "type": "string",
                  "description": "The linked page."
                },
                "title": {
                  "type": "string",
                  "description": "Link card title."
                },
                "description": {
                  "type": "string",
                  "description": "Link card description."
                },
                "thumbnail": {
                  "description": "Link card image URL; null if none.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "uri",
                "title",
                "description",
                "thumbnail"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "Link card; null if none."
        },
        "quote": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "uri": {
                  "type": "string",
                  "description": "The quoted post's `at://` URI. Pass it as `url` to the post endpoint."
                },
                "url": {
                  "type": "string",
                  "description": "The quoted post on bsky.app."
                },
                "text": {
                  "description": "Its text; null when it was deleted or its author blocks viewers.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "createdAt": {
                  "description": "When it was posted, ISO 8601; null when unavailable.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "author": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "did": {
                          "type": "string",
                          "description": "The account's permanent id, e.g. `did:plc:z72i7hdynmk6r22z27h6tvur`."
                        },
                        "handle": {
                          "type": "string",
                          "description": "Handle, e.g. `bsky.app`. It can change; the DID doesn't."
                        },
                        "displayName": {
                          "description": "Display name; null if not set.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "avatar": {
                          "description": "Avatar image URL; null if none.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "did",
                        "handle",
                        "displayName",
                        "avatar"
                      ],
                      "additionalProperties": false,
                      "description": "Who posted it."
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Who posted it; null when unavailable."
                }
              },
              "required": [
                "uri",
                "url",
                "text",
                "createdAt",
                "author"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "description": "The post this one quotes; null if none or hidden from logged-out visitors. Embedded lists, feeds and starter packs aren't returned."
        },
        "links": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Full URLs of the links in the text."
        },
        "mentions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Accounts mentioned in the text: the handle as written, without @, or the DID when the mention isn't written as @handle."
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Hashtags in the text, without #."
        },
        "replyTo": {
          "description": "`at://` URI of the post this replies to; null for top-level posts.",
          "type": [
            "string",
            "null"
          ]
        },
        "replies": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BlueskyReply"
          },
          "description": "Replies to this reply."
        }
      },
      "required": [
        "uri",
        "cid",
        "url",
        "text",
        "createdAt",
        "author",
        "replyCount",
        "repostCount",
        "likeCount",
        "quoteCount",
        "bookmarkCount",
        "langs",
        "images",
        "video",
        "external",
        "quote",
        "links",
        "mentions",
        "tags",
        "replyTo",
        "replies"
      ],
      "additionalProperties": false
    }
  }
}