{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmattered/json-schema/getmattered-switch-subscription-request-schema.json",
  "title": "SwitchSubscriptionRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getmattered-billing-api-openapi.yml#/components/schemas/SwitchSubscriptionRequest",
  "type": "object",
  "properties": {
    "interval": {
      "type": "string",
      "enum": [
        "week",
        "month",
        "year"
      ],
      "description": "Intended billing interval. When supplied, the server re-resolves `newPriceId` to the plan's price for this interval, so the cadence actually billed always matches the cadence the user was quoted."
    },
    "newPriceId": {
      "type": "string",
      "minLength": 1,
      "description": "New Stripe price ID to switch to (handles both upgrades and downgrades automatically). Prefer sending `interval` alongside it — this id may be the plan's ambiguous weekly primary."
    }
  },
  "required": [
    "newPriceId"
  ],
  "additionalProperties": false
}