{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/multi-upload-tool-com/json-schema/multi-upload-tool-com-short-link-request-schema.json",
  "title": "ShortLinkRequest",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/multi-upload-tool-com-openapi.json#/components/schemas/ShortLinkRequest",
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Default destination."
    },
    "slug": {
      "type": "string",
      "minLength": 1,
      "maxLength": 150,
      "pattern": "^[a-zA-Z0-9-_.]+$",
      "description": "Custom path. Generated when omitted."
    },
    "domainId": {
      "type": "integer",
      "description": "Custom domain to serve the link from."
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "description": {
      "type": "string",
      "maxLength": 1000
    },
    "imageUrl": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048
    },
    "useDeeplink": {
      "type": "boolean",
      "description": "Open the destination in the target app rather than a browser."
    },
    "botProtection": {
      "type": "boolean",
      "description": "Send detected bots to `safeUrl` instead."
    },
    "safeUrl": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048
    },
    "rules": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "$ref": "#/$defs/ShortLinkRule"
      }
    }
  },
  "$defs": {
    "ShortLinkRule": {
      "type": "object",
      "description": "Sends a subset of visitors to a different destination. Rules are evaluated by descending priority.",
      "required": [
        "type",
        "destination"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "geo",
            "device",
            "language",
            "time",
            "referer"
          ]
        },
        "destination": {
          "type": "string",
          "format": "uri"
        },
        "countryCodes": {
          "type": "string",
          "maxLength": 500,
          "description": "Comma-separated ISO 3166-1 alpha-2 codes."
        },
        "languages": {
          "type": "string",
          "maxLength": 500
        },
        "devices": {
          "type": "string",
          "maxLength": 500
        },
        "referers": {
          "type": "string",
          "maxLength": 1000
        },
        "startTime": {
          "type": "string"
        },
        "endTime": {
          "type": "string"
        },
        "days": {
          "type": "string"
        },
        "timezone": {
          "type": "string",
          "maxLength": 50
        },
        "priority": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000
        },
        "useDeeplink": {
          "type": "boolean"
        },
        "isActive": {
          "type": "boolean"
        }
      }
    }
  }
}