{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/c1k-me/json-schema/c1k-me-link-create-schema.json",
  "title": "LinkCreate",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/c1k-me-openapi.yml#/components/schemas/LinkCreate",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "destination_url"
  ],
  "properties": {
    "destination_url": {
      "type": "string",
      "maxLength": 2048,
      "description": "Absolute http or https URL."
    },
    "slug": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{3,48}$",
      "description": "Case-sensitive; omitted means seven random base62 characters."
    },
    "title": {
      "type": "string",
      "maxLength": 120
    },
    "tags": {
      "type": "array",
      "maxItems": 5,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 24
      }
    },
    "campaign": {
      "type": "string",
      "maxLength": 64
    },
    "utm": {
      "$ref": "#/$defs/Utm"
    },
    "starts_at": {
      "type": "string",
      "format": "date-time",
      "description": "Inclusive."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Exclusive; later than starts_at."
    },
    "password": {
      "type": "string",
      "minLength": 12,
      "maxLength": 64,
      "description": "12 to 64 UTF-8 bytes. Visitors must enter it before the redirect."
    },
    "domain_id": {
      "type": "string"
    },
    "forward_query_keys": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "string",
        "maxLength": 64
      },
      "description": "Query keys of the short URL request that are passed on to the destination."
    }
  },
  "$defs": {
    "Utm": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "source": {
          "type": "string",
          "maxLength": 128
        },
        "medium": {
          "type": "string",
          "maxLength": 128
        },
        "campaign": {
          "type": "string",
          "maxLength": 128
        },
        "term": {
          "type": "string",
          "maxLength": 128
        },
        "content": {
          "type": "string",
          "maxLength": 128
        }
      }
    }
  }
}