{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/boardwalkai-com/json-schema/boardwalkai-com-credit-balance-response-schema.json",
  "title": "CreditBalanceResponse",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/boardwalkai-com-openapi.yml#/components/schemas/CreditBalanceResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "plan": {
          "type": "string",
          "description": "Internal plan name (e.g. `single_state`)."
        },
        "planDisplayName": {
          "type": "string",
          "description": "Human-friendly plan label (e.g. `1 State`)."
        },
        "creditsLimit": {
          "type": "integer"
        },
        "creditsUsed": {
          "type": "integer"
        },
        "creditsRemaining": {
          "type": "integer"
        },
        "periodStart": {
          "type": "string",
          "format": "date"
        },
        "periodEnd": {
          "type": "string",
          "format": "date"
        },
        "resetsAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Next reset instant. Null for a one-off trial allowance."
        },
        "rateLimit": {
          "type": "integer"
        },
        "rateLimitPer": {
          "type": "string"
        },
        "isTeamPool": {
          "type": "boolean",
          "description": "Whether this balance is shared by a team."
        },
        "poolUserId": {
          "type": "integer",
          "description": "Owner of the credit pool used by this key."
        },
        "enrichment": {
          "type": [
            "object",
            "null"
          ],
          "description": "The monthly enrichment allowance: the same meter `POST /enrichments` reports as `EnrichmentAllowance`, spelled with longer key names here. Null when enrichment is not wired for this environment.",
          "properties": {
            "monthlyAttemptsLimit": {
              "type": [
                "integer",
                "null"
              ],
              "description": "Null means the plan carries no explicit cap."
            },
            "attemptsUsed": {
              "type": "integer"
            },
            "attemptsRemaining": {
              "type": [
                "integer",
                "null"
              ]
            },
            "resetsAt": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      }
    },
    "meta": {
      "type": "object",
      "required": [
        "requestId"
      ],
      "properties": {
        "requestId": {
          "type": "string",
          "description": "Matches X-Request-Id."
        }
      }
    }
  }
}