{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/plainrouter/json-schema/plainrouter-creative-intake-read-schema.json",
  "title": "CreativeIntakeRead",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/plainrouter-creative-api-openapi.yml#/components/schemas/CreativeIntakeRead",
  "type": "object",
  "properties": {
    "creative": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[0-7][0-9a-hjkmnp-tv-z]{25}$"
        },
        "fingerprint": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "image",
            "video"
          ]
        },
        "mime_type": {
          "type": "string"
        },
        "byte_size": {
          "type": "integer"
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        },
        "height": {
          "type": [
            "integer",
            "null"
          ]
        },
        "aspect_ratio": {
          "type": [
            "number",
            "null"
          ]
        },
        "duration_ms": {
          "type": [
            "integer",
            "null"
          ]
        },
        "original_filename": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_ref": {
          "type": [
            "string",
            "null"
          ]
        },
        "tags": {
          "description": "Stored tags, including provenance when supplied. An empty map is returned as an empty array. Existing creatives keep their original tags.",
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 0
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "approved",
            "retired"
          ]
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "fingerprint",
        "type",
        "mime_type",
        "byte_size",
        "width",
        "height",
        "aspect_ratio",
        "duration_ms",
        "source_ref",
        "tags",
        "status",
        "created_at",
        "updated_at"
      ]
    }
  },
  "required": [
    "creative"
  ]
}