{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zindex-ai/json-schema/zindex-ai-share-link-schema.json",
  "title": "ShareLink",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zindex-ai-openapi.json#/components/schemas/ShareLink",
  "type": "object",
  "required": [
    "linkId",
    "url",
    "svg",
    "png",
    "shows",
    "revision",
    "name",
    "ends",
    "fingerprint",
    "createdAt",
    "state"
  ],
  "properties": {
    "linkId": {
      "type": "string",
      "description": "lnk_ plus 12 characters; names the link for revoking it"
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "https://zindex.ai/d/{token}, the link's page; null once it isn't live. An every-version link takes @{revision} for one version; a version or latest link takes none"
    },
    "svg": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "The picture the link shows, as SVG; null once it isn't live"
    },
    "png": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "The same picture as PNG; null once it isn't live"
    },
    "shows": {
      "type": "string",
      "enum": [
        "version",
        "latest",
        "every"
      ],
      "description": "What the link shows: one version, the newest version, or every version"
    },
    "revision": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The version a version link shows; null for the others"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Who the link is for; null when it has no name"
    },
    "ends": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "The link's last day, YYYY-MM-DD: it stops at 23:59:59 UTC that day. null for no end date"
    },
    "fingerprint": {
      "type": [
        "string",
        "null"
      ],
      "description": "The content hash of the version a version link shows, sha256:<hex>, as its kept image names it; null for latest and every-version links"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "state": {
      "type": "string",
      "enum": [
        "live",
        "ended",
        "revoked"
      ],
      "description": "live while the link opens; ended once its end date passed; revoked once someone revoked it"
    },
    "createdBy": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "userId",
        "name"
      ],
      "properties": {
        "userId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "description": "Listed links only: who made the link; null when no person is recorded, or the account has closed"
    },
    "revokedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Listed links only: when it was revoked"
    },
    "revokedBy": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "userId",
        "name"
      ],
      "properties": {
        "userId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "description": "Listed links only: who revoked it; null for Zindex and for an account that has closed"
    },
    "revokedReason": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "owner",
        "workspace_private",
        "report",
        "takedown",
        null
      ],
      "description": "Listed links only: owner (someone in the workspace revoked it), workspace_private (an owner made the whole workspace private), report or takedown (Zindex revoked it under the content policy)"
    }
  }
}