{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zoomin/json-schema/zoomin-user-schema.json",
  "title": "User",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zoomin-openapi.yml#/components/schemas/User",
  "required": [
    "active",
    "email",
    "id",
    "role_name"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "The user's User ID. This number is assigned to the user when the account is created. To get this ID, use `GET /api/user` which returns your User ID."
    },
    "email": {
      "type": "string",
      "description": "The user's email address",
      "format": "email"
    },
    "name": {
      "type": "string",
      "description": "The user's full name"
    },
    "auth_source": {
      "type": "string",
      "description": "The login method last used by this user. Possible values:\n- localStorage - Password login directly to Zoomin\n- sso - SAML2 SSO login\n- jwt - Zoomin JWT authentication\n- oidc - OpenID Connect authentication\n- httpHeaders - Zoomin HTTP headers authentication",
      "enum": [
        "localStorage",
        "sso",
        "jwt",
        "oidc",
        "httpHeaders"
      ]
    },
    "active": {
      "type": "boolean",
      "description": "Whether the user is active"
    },
    "has_api_key": {
      "type": "boolean",
      "description": "Whether the user has an active API key",
      "default": false
    },
    "permissions_overridden": {
      "type": "boolean",
      "description": "Whether the user's permissions have been manually changed on the Zoomin Admin panel",
      "default": false
    },
    "registered_at": {
      "type": "string",
      "description": "When the user was first registered",
      "format": "date-time"
    },
    "verified_at": {
      "type": "string",
      "description": "For users enabled for password login, the date when the password was verified. A password is verified by the user clicking on a link in a verification email sent by Zoomin, or via the Zoomin Admin panel. The password becomes available when it is verified.",
      "format": "date-time"
    },
    "last_login_at": {
      "type": "string",
      "description": "When the user last logged in",
      "format": "date-time"
    },
    "role_name": {
      "type": "string",
      "description": "The user's User Role"
    },
    "content_role_names": {
      "type": "array",
      "description": "The user's Content Role Groups",
      "items": {
        "type": "string"
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true,
      "description": "Key-value pairs of user metadata"
    }
  }
}