{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cogram-com/json-schema/cogram-com-user-list-v1-schema.json",
  "title": "UserListV1",
  "description": "Paginated user list 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/UserListV1",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/UserV1"
      },
      "type": "array",
      "title": "Data"
    },
    "total": {
      "type": "integer",
      "title": "Total",
      "description": "Total matches across all pages, not just this page."
    },
    "page": {
      "type": "integer",
      "title": "Page"
    },
    "page_size": {
      "type": "integer",
      "title": "Page Size"
    }
  },
  "type": "object",
  "required": [
    "data",
    "total",
    "page",
    "page_size"
  ],
  "$defs": {
    "UserRoleV1": {
      "type": "string",
      "enum": [
        "MEMBER",
        "ADMIN",
        "GROUP_ADMIN",
        "OWNER",
        "INTERNAL_ADMIN"
      ],
      "title": "UserRoleV1",
      "description": "All user roles (used in responses)."
    },
    "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"
      ],
      "title": "UserV1",
      "description": "User response."
    }
  }
}