{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkbreakers-com/json-schema/linkbreakers-com-page-theme-template-schema.json",
  "title": "PageThemeTemplate",
  "description": "Reusable page styling presets that help teams give every link page a consistent look.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkbreakers-com-page-theme-templates-api-openapi.yml#/components/schemas/PageThemeTemplate",
  "properties": {
    "badgeSignedUrl": {
      "description": "Signed URL for the template's badge image. Empty when the template has no badge.",
      "type": "string"
    },
    "builtIn": {
      "title": "Whether the template is maintained by Linkbreakers (available to every workspace)",
      "type": "boolean"
    },
    "coverSignedUrl": {
      "description": "Signed URL for the template's cover image. Empty when the template has no cover.",
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "title": "When the template was created",
      "type": "string"
    },
    "description": {
      "title": "Short marketing description displayed in the template picker",
      "type": "string"
    },
    "duplicatedFrom": {
      "description": "Reference to the original public template when this template was created via import. Null for original templates.",
      "title": "Reference to the original template if this is a duplicate from import (UUID)",
      "type": "string"
    },
    "faq": {
      "description": "Frequently Asked Questions about this template stored as JSON",
      "title": "FAQ data stored as JSON",
      "type": "string"
    },
    "footerLogoSignedUrl": {
      "description": "Signed URL for the template's footer logo image. Empty when the template has no footer logo.",
      "type": "string"
    },
    "id": {
      "title": "Unique identifier of the template (UUID)",
      "type": "string"
    },
    "learnMore": {
      "description": "Extended markdown-supported content providing detailed information about the template",
      "title": "Extended markdown-supported content for \"learn more\" section",
      "type": "string"
    },
    "name": {
      "title": "Human-readable name shown in the gallery",
      "type": "string"
    },
    "owned": {
      "description": "True when the template belongs to the caller's workspace. False for built-in templates and for community templates published by other workspaces.",
      "type": "boolean"
    },
    "pageTheme": {
      "$ref": "#/$defs/PageTheme"
    },
    "pageThemeId": {
      "title": "Backing page theme that carries the styling (UUID)",
      "type": "string"
    },
    "publishedAt": {
      "description": "When the template was published. Null means private template, only visible to creating workspace.",
      "format": "date-time",
      "title": "When the template was published and made available to all workspaces\nIf null, template is private and only visible to the creating workspace\nBuilt-in templates are always considered published regardless of this field",
      "type": "string"
    },
    "slug": {
      "title": "Slug used in public template selection URLs",
      "type": "string"
    },
    "tags": {
      "title": "Tags for categorizing and filtering templates (comma-separated)",
      "type": "string"
    },
    "thumbnailPendingUpdateSince": {
      "format": "date-time",
      "title": "When the template thumbnail entered the regeneration queue",
      "type": "string"
    },
    "thumbnailSignedUrl": {
      "title": "Signed thumbnail preview of the template styling",
      "type": "string"
    },
    "updatedAt": {
      "format": "date-time",
      "title": "When the template metadata was last updated",
      "type": "string"
    },
    "usageCount": {
      "description": "Number of links in the caller's workspace whose theme was applied from this template. Drives the 'most used' ordering in the template picker.",
      "format": "int64",
      "type": "integer"
    },
    "workspaceId": {
      "title": "Workspace that owns the template; empty for built-in templates (UUID when present)",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "ContainerConfig": {
      "properties": {
        "backgroundColor": {
          "$ref": "#/$defs/ThemeColor",
          "title": "Background color"
        },
        "borderColor": {
          "$ref": "#/$defs/ThemeColor",
          "title": "Border color"
        },
        "borderSize": {
          "format": "int32",
          "title": "Border size in pixels (0 or more)",
          "type": "integer"
        },
        "borderStyle": {
          "enum": [
            "PAGE_THEME_BORDER_STYLE_UNSPECIFIED",
            "PAGE_THEME_BORDER_STYLE_SOLID",
            "PAGE_THEME_BORDER_STYLE_DASHED",
            "PAGE_THEME_BORDER_STYLE_DOTTED",
            "PAGE_THEME_BORDER_STYLE_DOUBLE",
            "PAGE_THEME_BORDER_STYLE_GROOVE",
            "PAGE_THEME_BORDER_STYLE_RIDGE"
          ],
          "title": "Border style"
        },
        "opacity": {
          "format": "int32",
          "title": "Opacity (0-100%)",
          "type": "integer"
        },
        "variant": {
          "enum": [
            "PAGE_THEME_CONTAINER_VARIANT_UNSPECIFIED",
            "PAGE_THEME_CONTAINER_VARIANT_ROUNDED",
            "PAGE_THEME_CONTAINER_VARIANT_SQUARE"
          ],
          "title": "Container variant (required when container_config is set)"
        }
      },
      "title": "Container styling configuration",
      "type": "object"
    },
    "FontConfig": {
      "properties": {
        "bold": {
          "title": "Bold styling",
          "type": "boolean"
        },
        "color": {
          "$ref": "#/$defs/ThemeColor",
          "title": "Text color (ThemeColor)"
        },
        "family": {
          "description": " - PAGE_THEME_FONT_FAMILY_UNSPECIFIED: Maps to the default system sans-serif stack.",
          "enum": [
            "PAGE_THEME_FONT_FAMILY_UNSPECIFIED",
            "PAGE_THEME_FONT_FAMILY_DEFAULT",
            "PAGE_THEME_FONT_FAMILY_ARIAL",
            "PAGE_THEME_FONT_FAMILY_HELVETICA",
            "PAGE_THEME_FONT_FAMILY_VERDANA",
            "PAGE_THEME_FONT_FAMILY_GEORGIA",
            "PAGE_THEME_FONT_FAMILY_TIMES_NEW_ROMAN",
            "PAGE_THEME_FONT_FAMILY_COURIER_NEW"
          ]
        },
        "familyStack": {
          "description": "Exact CSS font stack. Takes precedence over family when writing.",
          "type": "string"
        },
        "fontSize": {
          "format": "int32",
          "title": "Font size in pixels",
          "type": "integer"
        },
        "italic": {
          "title": "Italic styling",
          "type": "boolean"
        }
      },
      "title": "Font configuration with family, styling, and color",
      "type": "object"
    },
    "PageTheme": {
      "properties": {
        "badgeEnabled": {
          "title": "--- Badge Section ---\nWhether badge is enabled",
          "type": "boolean"
        },
        "badgeIconColor": {
          "$ref": "#/$defs/ThemeColor",
          "title": "Badge icon background color (used when badge is not selected)"
        },
        "badgeId": {
          "title": "Badge image ID (references media table)",
          "type": "string"
        },
        "badgeShape": {
          "enum": [
            "PAGE_THEME_BADGE_SHAPE_UNSPECIFIED",
            "PAGE_THEME_BADGE_SHAPE_CIRCLE",
            "PAGE_THEME_BADGE_SHAPE_SQUARE",
            "PAGE_THEME_BADGE_SHAPE_ROUNDED"
          ],
          "title": "Badge shape"
        },
        "bodyFont": {
          "$ref": "#/$defs/FontConfig",
          "title": "Body font configuration"
        },
        "canvasColor": {
          "$ref": "#/$defs/ThemeColor",
          "title": "--- Background Section ---\nCanvas color configuration"
        },
        "canvasCoverId": {
          "title": "Optional cover media ID (references media table)",
          "type": "string"
        },
        "canvasCoverMode": {
          "enum": [
            "PAGE_THEME_BACKGROUND_COVER_MODE_UNSPECIFIED",
            "PAGE_THEME_BACKGROUND_COVER_MODE_FULL",
            "PAGE_THEME_BACKGROUND_COVER_MODE_PROGRESSIVE_TOP",
            "PAGE_THEME_BACKGROUND_COVER_MODE_PROGRESSIVE_BOTTOM"
          ],
          "title": "Cover display mode"
        },
        "containerConfig": {
          "$ref": "#/$defs/ContainerConfig",
          "title": "Container styling configuration"
        },
        "containerEnabled": {
          "title": "Whether container is enabled",
          "type": "boolean"
        },
        "createdAt": {
          "format": "date-time",
          "readOnly": true,
          "title": "When the page theme was created",
          "type": "string"
        },
        "elementColor": {
          "$ref": "#/$defs/ThemeColor",
          "title": "Interactive element background color configuration"
        },
        "elementFont": {
          "$ref": "#/$defs/FontConfig",
          "title": "Interactive element text font configuration"
        },
        "footerLogoEnabled": {
          "description": "Whether the footer logo (a small company or brand logo centered at the bottom of every page using this theme) is shown.\n\nTurning it off keeps footer_logo_id, so turning it back on restores the\nsame image.",
          "type": "boolean"
        },
        "footerLogoId": {
          "title": "Footer logo image ID (a media library image)",
          "type": "string"
        },
        "id": {
          "readOnly": true,
          "title": "Page theme ID",
          "type": "string"
        },
        "titleFont": {
          "$ref": "#/$defs/FontConfig",
          "title": "--- Typography Section ---\nTitle font configuration"
        },
        "updatedAt": {
          "format": "date-time",
          "readOnly": true,
          "title": "When the page theme was last updated",
          "type": "string"
        },
        "workspaceId": {
          "readOnly": true,
          "title": "Workspace ID this page theme belongs to",
          "type": "string"
        }
      },
      "title": "Page theme configuration",
      "type": "object"
    },
    "ThemeColor": {
      "description": "Reusable color payload used across design-oriented APIs (page themes, QR code designs, etc.).\nIt supports solid colors and gradients with optional direction and per-stop offsets.",
      "properties": {
        "colors": {
          "description": "Color values in render order (hex, rgb/rgba, hsl/hsla).",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "direction": {
          "description": "Optional direction for linear gradients (e.g. \"135deg\", \"to right\").",
          "type": "string"
        },
        "stops": {
          "description": "Optional stop offsets aligned with `colors` (e.g. \"0%\", \"50%\", \"100%\").",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": {
          "enum": [
            "THEME_COLOR_TYPE_UNSPECIFIED",
            "THEME_COLOR_TYPE_SOLID",
            "THEME_COLOR_TYPE_LINEAR",
            "THEME_COLOR_TYPE_RADIAL"
          ],
          "title": "Color type"
        }
      },
      "required": [
        "type",
        "colors"
      ],
      "title": "ThemeColor",
      "type": "object"
    }
  }
}