{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recruitmcp-com/json-schema/recruitmcp-com-balance-schema.json",
  "title": "Balance",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recruitmcp-com-billing-api-openapi.yml#/components/schemas/Balance",
  "type": "object",
  "properties": {
    "balance_credits": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Account balance. A customer-bound key gets that customer's remaining daily cap, or null when the customer has no cap."
    },
    "by_source": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      },
      "description": "plan, topup, free, promo (launch bonus), admin, refund, legacy. Empty for a customer-bound key."
    },
    "buckets": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {}
      }
    },
    "upcoming_expiries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "credits": {
            "type": "integer"
          },
          "source": {
            "type": "string"
          },
          "bucket_id": {
            "type": "string"
          }
        }
      }
    },
    "next_expiry": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "credits": {
          "type": "integer"
        }
      }
    },
    "rules": {
      "type": "object",
      "additionalProperties": {}
    },
    "subscription": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {}
    }
  },
  "required": [
    "balance_credits"
  ]
}