{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cogram-com/json-schema/cogram-com-user-v1-schema.json",
  "title": "UserV1",
  "description": "User response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cogram-com-users-api-openapi.yml#/components/schemas/UserV1",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "email": {
      "type": "string",
      "title": "Email"
    },
    "first_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "First Name"
    },
    "last_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Name"
    },
    "roles": {
      "items": {
        "$ref": "#/$defs/UserRoleV1"
      },
      "type": "array",
      "title": "Roles",
      "description": "Organization-level roles, not project roles."
    },
    "is_sso_user": {
      "type": "boolean",
      "title": "Is Sso User"
    }
  },
  "type": "object",
  "required": [
    "id",
    "email",
    "first_name",
    "last_name",
    "roles",
    "is_sso_user"
  ],
  "$defs": {
    "UserRoleV1": {
      "type": "string",
      "enum": [
        "MEMBER",
        "ADMIN",
        "GROUP_ADMIN",
        "OWNER",
        "INTERNAL_ADMIN"
      ],
      "title": "UserRoleV1",
      "description": "All user roles (used in responses)."
    }
  }
}