{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dexi-net/json-schema/dexi-net-bookmark-save-result-schema.json",
  "title": "BookmarkSaveResult",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dexi-net-openapi.json#/components/schemas/BookmarkSaveResult",
  "type": "object",
  "required": [
    "bookmark",
    "note_id",
    "is_new_bookmark",
    "selection_appended"
  ],
  "properties": {
    "bookmark": {
      "$ref": "#/$defs/Bookmark"
    },
    "note_id": {
      "type": "string",
      "format": "uuid",
      "description": "The note created for (or already backing) this URL"
    },
    "is_new_bookmark": {
      "type": "boolean",
      "description": "false when the URL was already saved and was reused"
    },
    "selection_appended": {
      "type": "boolean",
      "description": "true when the selection was appended to an existing note as a quoted highlight"
    }
  },
  "$defs": {
    "Bookmark": {
      "type": "object",
      "required": [
        "id",
        "url",
        "created",
        "updated"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "note_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "The note that backs this bookmark"
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "icon": {
          "type": [
            "string",
            "null"
          ],
          "description": "Site favicon path, served relative to https://api.dexi.net"
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "updated": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}