{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stashr-me/json-schema/stashr-me-bookmark-schema.json",
  "title": "Bookmark",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stashr-me-openapi.json#/components/schemas/Bookmark",
  "additionalProperties": true,
  "properties": {
    "author": {
      "$ref": "#/$defs/Author"
    },
    "capturedAt": {
      "format": "date-time",
      "type": "string"
    },
    "content": {
      "description": "Portable Text blocks holding the full body",
      "items": {
        "type": "object"
      },
      "type": "array"
    },
    "contentCreatedAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "contentType": {
      "description": "One of: repo, image, post, video, comment, article, page, snippet, event, link, listing",
      "type": "string"
    },
    "deletedAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "format": "uuid",
      "type": "string"
    },
    "isFavorite": {
      "type": "boolean"
    },
    "media": {
      "items": {
        "$ref": "#/$defs/Media"
      },
      "type": "array"
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "platform": {
      "description": "Platform id. X/Twitter is \"twitter\".",
      "enum": [
        "github",
        "instagram",
        "reddit",
        "linkedin",
        "tiktok",
        "twitter",
        "web",
        "youtube",
        "facebook",
        "hackernews"
      ],
      "type": "string"
    },
    "platformId": {
      "type": "string"
    },
    "tags": {
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "type": "array"
    },
    "title": {
      "description": "Present on titled content such as X articles",
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "format": "uri",
      "type": "string"
    }
  },
  "required": [
    "id",
    "platform",
    "contentType",
    "url",
    "tags",
    "content",
    "media",
    "capturedAt"
  ],
  "type": "object",
  "$defs": {
    "Author": {
      "properties": {
        "avatarUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "displayName": {
          "type": [
            "string",
            "null"
          ]
        },
        "profileUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "username": {
          "type": "string"
        }
      },
      "required": [
        "username"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "Media": {
      "properties": {
        "altText": {
          "type": [
            "string",
            "null"
          ]
        },
        "duration": {
          "type": [
            "number",
            "null"
          ]
        },
        "height": {
          "type": [
            "integer",
            "null"
          ]
        },
        "ref": {
          "description": "Stable media ref usable with the media preview",
          "type": "string"
        },
        "storedUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "thumbUrl": {
          "description": "800px webp derivative of storedUrl, when generated. Prefer it for previews/grids; storedUrl is the full-resolution archive.",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "enum": [
            "image",
            "video"
          ],
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "ref",
        "type",
        "url"
      ],
      "type": "object"
    },
    "Tag": {
      "properties": {
        "color": {
          "type": "string"
        },
        "count": {
          "description": "Active bookmarks currently carrying this tag",
          "type": "integer"
        },
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "color",
        "count"
      ],
      "type": "object"
    }
  }
}