{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/my-tv-channel-com/json-schema/my-tv-channel-com-create-channel-request-schema.json",
  "title": "CreateChannelRequest",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/my-tv-channel-com-openapi.yaml#/components/schemas/CreateChannelRequest",
  "type": "object",
  "required": [
    "handle",
    "name",
    "channel_type"
  ],
  "properties": {
    "handle": {
      "$ref": "#/$defs/Handle"
    },
    "name": {
      "type": "string"
    },
    "channel_type": {
      "type": "string",
      "enum": [
        "location",
        "thematic"
      ],
      "description": "`location` requires a `location` object. `thematic` is the usual choice."
    },
    "description": {
      "type": "string"
    },
    "primary_language": {
      "type": "string",
      "description": "ISO 639-1 code, e.g. `en`."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "category": {
      "type": "string"
    },
    "orientation": {
      "type": "string",
      "description": "Portrait or landscape presentation."
    },
    "is_public": {
      "type": "boolean",
      "default": false,
      "description": "List the channel in Discover. **Available on every tier**, including Starter."
    },
    "location": {
      "type": "object",
      "description": "Required when `channel_type` is `location`.",
      "properties": {
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        },
        "radius_km": {
          "type": "number"
        },
        "name": {
          "type": "string"
        }
      }
    }
  },
  "$defs": {
    "Handle": {
      "type": "string",
      "pattern": "^[a-z0-9-]{3,63}$",
      "description": "3–63 characters, lowercase letters, digits and hyphens. Becomes the channel's subdomain — `https://{handle}.my-tv-channel.com` — so treat it as permanent."
    }
  }
}