{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/putput-io/json-schema/putput-io-presign-request-schema.json",
  "title": "PresignRequest",
  "description": "Request body for getting a presigned upload URL.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/putput-io-openapi.json#/components/schemas/PresignRequest",
  "type": "object",
  "properties": {
    "filename": {
      "type": "string",
      "description": "Original filename. Sanitized server-side (safe chars only, max 200 chars)."
    },
    "content_type": {
      "type": "string",
      "description": "MIME type of the file. Guest tokens cannot upload text/html, text/javascript, text/css, application/xml, application/xhtml+xml, or image/svg+xml."
    },
    "size_bytes": {
      "type": "integer",
      "description": "Exact file size in bytes. Checked against plan limits."
    },
    "visibility": {
      "type": "string",
      "enum": [
        "public",
        "private"
      ],
      "default": "public",
      "description": "File visibility. \"private\" requires a Pro plan."
    },
    "prefix": {
      "type": "string",
      "maxLength": 200,
      "description": "Optional path prefix for organizing files (e.g. \"avatars\", \"documents/2026\")."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "maxLength": 1024
      },
      "maxProperties": 10,
      "description": "Key-value metadata. Max 10 keys, key max 256 chars, value max 1024 chars."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 50
      },
      "maxItems": 10,
      "description": "Tags for categorization. Max 10 tags, 50 chars each."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 datetime when the file should be automatically deleted. Must be in the future."
    }
  },
  "required": [
    "filename",
    "content_type",
    "size_bytes"
  ]
}