{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coppica-com/json-schema/coppica-com-identity-schema.json",
  "title": "Identity",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coppica-com-reference-api-openapi.yml#/components/schemas/Identity",
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string",
      "format": "uuid"
    },
    "display_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "plan": {
      "type": [
        "string",
        "null"
      ]
    },
    "credits": {
      "type": "object",
      "properties": {
        "balance": {
          "type": "number"
        },
        "monthly_remaining": {
          "type": "number"
        },
        "purchased": {
          "type": "number"
        }
      }
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "read",
          "write",
          "execute"
        ]
      }
    },
    "spending_cap": {
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "user_id",
    "scopes"
  ]
}