{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/customdomain-ai/json-schema/customdomain-ai-plan-schema.json",
  "title": "Plan",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/customdomain-ai-billing-api-openapi.yml#/components/schemas/Plan",
  "type": "object",
  "properties": {
    "id": {
      "$ref": "#/$defs/PlanId"
    },
    "name": {
      "type": "string"
    },
    "price_cents": {
      "type": "integer",
      "description": "Monthly price in US cents; 0 when not public."
    },
    "public_price": {
      "type": "boolean"
    },
    "domains_per_year": {
      "type": "integer",
      "description": "The marketed annual allowance."
    },
    "domains_per_month": {
      "type": "integer",
      "description": "The enforced monthly allowance (`domains_per_year` ceiling-divided by 12; 0 = unlimited)."
    },
    "metered": {
      "type": "boolean"
    },
    "overage_increment": {
      "type": "integer"
    },
    "motion": {
      "type": "string",
      "enum": [
        "self_serve",
        "contact_sales"
      ]
    },
    "entitlements": {
      "type": "object"
    },
    "hard_cap": {
      "type": "boolean",
      "description": "Connections past the monthly allowance are refused (`starter`) rather than recorded as overage."
    },
    "trial_days": {
      "type": "integer",
      "description": "The trial a new workspace's first subscription to this plan starts with (0 for contact sales)."
    },
    "default": {
      "type": "boolean",
      "description": "The plan preselected for a new workspace (`starter`)."
    }
  },
  "$defs": {
    "PlanId": {
      "type": "string",
      "description": "`free` is retired: legacy workspaces still carry it until they subscribe, and it cannot be bought or assigned.",
      "enum": [
        "starter",
        "startup",
        "growth",
        "premium",
        "enterprise",
        "free"
      ]
    }
  }
}