---
title: "GET /api/user/groupBy"
method: GET
path: "/api/user/groupBy"
tags: ["user"]
---

# GET /api/user/groupBy

`GET /api/user/groupBy`

Group Users by fields

## Response `200`

Successful operation

- object
  - `data` UserGroupByOutputType[], required — The Prisma response data serialized with superjson
    - `id` string, required
    - `name` string, nullable
    - `email` string, nullable
    - `pictureUrl` string, nullable
    - `tokenInvitation` string, nullable
    - `stripeCustomerId` string, nullable
    - `status` 'INVITED' | 'VERIFIED', required
    - `globalRole` string, required
    - `password` string, nullable
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `_count` UserCountAggregateOutputType
      - `id` integer, required
      - `name` integer, required
      - `email` integer, required
      - `pictureUrl` integer, required
      - `tokenInvitation` integer, required
      - `stripeCustomerId` integer, required
      - `status` integer, required
      - `globalRole` integer, required
      - `password` integer, required
      - `createdAt` integer, required
      - `updatedAt` integer, required
      - `_all` integer, required
    - `_min` UserMinAggregateOutputType
      - `id` string, nullable
      - `name` string, nullable
      - `email` string, nullable
      - `pictureUrl` string, nullable
      - `tokenInvitation` string, nullable
      - `stripeCustomerId` string, nullable
      - `status` 'INVITED' | 'VERIFIED'
      - `globalRole` string, nullable
      - `password` string, nullable
      - `createdAt` string, date-time, nullable
      - `updatedAt` string, date-time, nullable
    - `_max` UserMaxAggregateOutputType
      - `id` string, nullable
      - `name` string, nullable
      - `email` string, nullable
      - `pictureUrl` string, nullable
      - `tokenInvitation` string, nullable
      - `stripeCustomerId` string, nullable
      - `status` 'INVITED' | 'VERIFIED'
      - `globalRole` string, nullable
      - `password` string, nullable
      - `createdAt` string, date-time, nullable
      - `updatedAt` string, date-time, nullable
  - `meta` Meta — Meta information about the request or response
    - `serialization` unknown

## Other responses

- `400` — Invalid request
- `403` — Request is forbidden
- `422` — Request is unprocessable due to validation errors

---

[API](https://skmtc.dev/iris-networks/apis/my-awesome-api.md) · [All operations](https://skmtc.dev/iris-networks/apis/my-awesome-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/iris-networks/my-awesome-api/revisions/4cea49731f1e/schema)
