{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elaichi-ai/json-schema/elaichi-ai-user-schema.json",
  "title": "User",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elaichi-ai-openapi.json#/components/schemas/User",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "User id (`usr_…`)."
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "avatar_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "identities": {
      "type": "array",
      "description": "Login identities linked to this account.",
      "items": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "description": "e.g. `google`, `email_code`, `invite`, or an SSO connection."
          },
          "connected_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "is_active": {
      "type": "boolean",
      "description": "Inactive accounts cannot authenticate at all."
    },
    "is_staff": {
      "type": "boolean",
      "description": "True only for Elaichi support accounts. Always false for customer members; unrelated to organization roles."
    },
    "last_login_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}