{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/picsee-io/json-schema/picsee-io-links-schema.json",
  "title": "Links",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/picsee-io-openapi.yml#/components/schemas/Links",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "mapId": {
        "type": "string",
        "description": "The ID of the short link."
      },
      "domain": {
        "type": "string",
        "description": "The domain of the short link."
      },
      "encodeId": {
        "type": "string",
        "description": "The slug (short link code) for the short link."
      },
      "ssl": {
        "type": "boolean",
        "description": "Indicates if the link uses HTTPS. Set to `true` for HTTPS and `false` for HTTP."
      },
      "url": {
        "type": "string",
        "format": "uri",
        "description": "The destination URL."
      },
      "title": {
        "type": "string",
        "description": "The preview title of the short link."
      },
      "description": {
        "type": "string",
        "description": "The preview description of the short link."
      },
      "gtm": {
        "type": "string",
        "description": "The ID of Google Tag Manager (GTM)."
      },
      "fbPixel": {
        "type": "string",
        "description": "The ID of Facebook Pixel."
      },
      "utm": {
        "type": [
          "object",
          "null"
        ],
        "description": "UTM parameters, containing source and campaign details. Set to null if not applicable.",
        "properties": {
          "source": {
            "type": "string",
            "description": "utm_source"
          },
          "medium": {
            "type": "string",
            "description": "utm_medium"
          },
          "campaign": {
            "type": "string",
            "description": "utm_campaign"
          },
          "term": {
            "type": "string",
            "description": "utm_term"
          },
          "content": {
            "type": "string",
            "description": "utm_content"
          }
        }
      },
      "createTime": {
        "type": "string",
        "format": "date-time",
        "description": "The creation time of the short link (UTC+8)."
      },
      "author": {
        "type": "object",
        "description": "The creator of the short link.",
        "properties": {
          "id": {
            "type": "number",
            "description": "PicSee ID of creator"
          },
          "email": {
            "type": "string",
            "description": "Login e-mail of creator"
          },
          "groupId": {
            "type": "number",
            "description": "PicSee group ID of creator"
          }
        }
      },
      "tags": {
        "type": "array",
        "description": "Tags associated with the short link.",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number",
              "description": "Tag ID."
            },
            "value": {
              "type": "string",
              "description": "Tag Value"
            }
          }
        }
      },
      "targets": {
        "type": "array",
        "description": "Device detection settings that redirect different devices to different destination URLs if applicable.",
        "items": {
          "type": "object",
          "properties": {
            "target": {
              "type": "string",
              "description": "Target device type."
            },
            "url": {
              "type": "string",
              "description": "Device-specific destination URL."
            }
          }
        }
      },
      "isAPILink": {
        "type": "boolean",
        "description": "Specifies whether the short link was generated through an API."
      },
      "isAPI": {
        "type": "boolean",
        "description": "Specifies whether the short link was generated through an API."
      },
      "isStar": {
        "type": "boolean",
        "description": "Indicates whether the short link is marked as a favorite."
      },
      "totalClicks": {
        "type": [
          "number",
          "null"
        ],
        "description": "The total number of clicks. If the user is on a free plan and reaches the plan’s limit, it will return `null`. If there are no clicks, it will return `0`."
      },
      "uniqueClicks": {
        "type": [
          "number",
          "null"
        ],
        "description": "The total number of unique clicks. If the user is on a free plan and reaches the plan’s limit, it will return `null`. If there are no unique clicks, it will return `0`."
      },
      "qrcodeUrl": {
        "type": "string",
        "format": "uri",
        "description": "<font class=\"plan\">Advanced Plan</font>\nThe URL for the QR code associated with the short link."
      }
    }
  }
}