{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/serp-agent-com/json-schema/serp-agent-com-account-schema.json",
  "title": "Account",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/serp-agent-com-openapi.json#/components/schemas/Account",
  "type": "object",
  "required": [
    "account_id",
    "email",
    "email_verified",
    "mode",
    "plan",
    "sandbox_usage",
    "sandbox_limits",
    "created_at",
    "projects_count"
  ],
  "properties": {
    "account_id": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "email_verified": {
      "type": "boolean"
    },
    "mode": {
      "type": "string",
      "enum": [
        "sandbox",
        "live"
      ],
      "description": "Mode of the key used on this request."
    },
    "plan": {
      "type": "null",
      "description": "Always null for now — populated by the upcoming billing phase."
    },
    "sandbox_usage": {
      "type": [
        "object",
        "null"
      ],
      "description": "Trial units consumed. Null for live keys.",
      "properties": {
        "audits": {
          "type": "integer"
        },
        "articles": {
          "type": "integer"
        }
      }
    },
    "sandbox_limits": {
      "oneOf": [
        {
          "$ref": "#/$defs/SandboxLimits"
        },
        {
          "type": "null"
        }
      ],
      "description": "Null for live keys."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "projects_count": {
      "type": "integer"
    }
  },
  "$defs": {
    "SandboxLimits": {
      "type": "object",
      "description": "Hard caps on a sandbox trial key.",
      "required": [
        "audits",
        "articles",
        "expires_days"
      ],
      "properties": {
        "audits": {
          "type": "integer"
        },
        "articles": {
          "type": "integer"
        },
        "expires_days": {
          "type": "integer"
        }
      }
    }
  }
}