{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audivo-dev/json-schema/audivo-dev-session-response-schema.json",
  "title": "SessionResponse",
  "description": "What one session carries. Deliberately no balance and no credit figure: a number frozen into a session outlives itself, and `GET /v1/usage` reads the live one.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audivo-dev-session-api-openapi.yml#/components/schemas/SessionResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "account_id",
    "tier",
    "status"
  ],
  "properties": {
    "account_id": {
      "$ref": "#/$defs/AccountId"
    },
    "tier": {
      "$ref": "#/$defs/Tier"
    },
    "status": {
      "$ref": "#/$defs/AccountStatus"
    }
  },
  "$defs": {
    "AccountId": {
      "type": "string",
      "pattern": "^acct_[A-Za-z0-9_-]{1,150}$",
      "maxLength": 155,
      "description": "The calling account's opaque identifier. Self-serve accounts derive it from the Cognito subject, so it is stable for the life of the account and identical however the account was created; operator-provisioned accounts predate that and carry arbitrary names within the same shape. Callers must not parse it or infer anything from its body."
    },
    "AccountStatus": {
      "type": "string",
      "enum": [
        "active",
        "suspended",
        "deleting",
        "deleted"
      ],
      "description": "The account's own state. `active` is the only one that may spend: `suspended` is a billing or abuse hold, and `deleting`/`deleted` are a deletion in progress or complete. Reads stay open in every state until the account's API keys are revoked, which is when access actually ends — so a non-`active` status is a reason to show the customer their billing page, not a reason to sign them out."
    },
    "Tier": {
      "type": "string",
      "enum": [
        "free",
        "hobby",
        "startup",
        "growth",
        "scale"
      ]
    }
  }
}