{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craftstory-com/json-schema/craftstory-com-upload-request-schema.json",
  "title": "UploadRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craftstory-com-uploads-api-openapi.yml#/components/schemas/UploadRequest",
  "type": "object",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "kind": {
      "title": "Kind",
      "type": "string",
      "enum": [
        "image",
        "audio",
        "video"
      ],
      "readOnly": true
    },
    "hint": {
      "title": "Hint",
      "type": "string",
      "readOnly": true,
      "minLength": 1
    },
    "status": {
      "title": "Status",
      "type": "string",
      "readOnly": true,
      "minLength": 1
    },
    "expires_at": {
      "title": "Expires at",
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "upload_url": {
      "title": "Upload url",
      "description": "Page where the user drops the file (only in the create response)",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "file_url": {
      "title": "File url",
      "description": "Read URL of the uploaded file, valid for about an hour (images: pass it as image_url to a create endpoint)",
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "original_name": {
      "title": "Original name",
      "type": "string",
      "readOnly": true,
      "minLength": 1
    },
    "content_type": {
      "title": "Content type",
      "type": "string",
      "readOnly": true,
      "minLength": 1
    },
    "size": {
      "title": "Size",
      "type": [
        "integer",
        "null"
      ],
      "readOnly": true
    },
    "uploaded_at": {
      "title": "Uploaded at",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    }
  }
}