> ## Documentation Index
> Fetch the complete documentation index at: https://developers.portao3.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# List groups

> Lists the organization's groups, sorted by name, with each member's details.

Archived groups are not listed; you can still get one by its ID.


## OpenAPI

````yaml /api-reference/identity.openapi.json get /realms/{realmId}/organizations/{organizationId}/groups
openapi: 3.0.3
info:
  title: Identity
  version: 1.0.0
  description: >-
    Portão 3 identity API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). 4 app groups run without
    the identity authorizer; publicPatterns enumerates every route they expose,
    except POST /auth/sign-in, documented with HTTP Basic for the API-client
    credentials flow. Confidence tiers: generated:typed=45 copied:manual=0
    unknown=0.
servers:
  - url: https://api.identity.v2.portao3.com.br/
    description: production
  - url: https://api.identity.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Authentication
  - name: Current User
  - name: Custom Fields
  - name: API Clients
  - name: Users
  - name: Organizations
  - name: Groups
  - name: Realms
paths:
  /realms/{realmId}/organizations/{organizationId}/groups:
    get:
      tags:
        - Groups
      summary: List groups
      description: >-
        Lists the organization's groups, sorted by name, with each member's
        details.
      operationId: getRealmsByRealmIdOrganizationsByOrganizationIdGroups
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of the organization whose groups you want to list.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: name
          in: query
          required: false
          description: Only groups whose name contains this text (case-insensitive).
          schema:
            type: string
            maxLength: 80
          example: finance
        - name: next
          in: query
          required: false
          description: >-
            Cursor returned as `next` by the previous page. Omit for the first
            page.
          schema:
            type: string
          example: NmEzZjljMjFlNGIwN2Q1YThjMTJmM2U5
        - name: limit
          in: query
          required: false
          description: Page size.
          schema:
            default: 15
            type: integer
            minimum: 1
            maximum: 100
          example: 15
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  next:
                    type: string
                    nullable: true
                    description: >-
                      Cursor for the next page: send it as the `next` query
                      parameter. `null` on the last page.
                    example: NmEzZjljMjFlNGIwN2Q1YThjMTJmM2U5
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: ID of the group.
                          example: 8ae5ee60-6ebe-4d85-a056-8c1387763478
                          format: uuid
                        realm:
                          type: string
                          description: ID of the realm the group belongs to.
                          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                          format: uuid
                        organization:
                          type: string
                          description: ID of the organization the group belongs to.
                          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                          format: uuid
                        name:
                          type: string
                          description: >-
                            Name of the group, unique within the organization
                            (archived groups included).
                          example: Finance approvers
                        description:
                          type: string
                          description: >-
                            Description of the group. Omitted, or empty, when
                            the group has none.
                          example: Approves payments above R$ 10,000
                        memberIds:
                          type: array
                          items:
                            type: string
                            example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                          description: >-
                            IDs of the users in the group, in the order they
                            were added.


                            ---


                            Example: `["e3553bc1-5e20-4e17-b22a-a796fda0aa99"]`
                        status:
                          type: string
                          enum:
                            - ACTIVE
                            - ARCHIVED
                          description: >-
                            `ACTIVE` groups can be changed and used as
                            approvers. `ARCHIVED` groups can still be read by
                            ID, but are hidden from the list, can't be changed
                            and can't be used as approvers. Archiving is
                            permanent.
                          example: ACTIVE
                        createdBy:
                          type: string
                          description: >-
                            ID of the user or API client that created the group.
                            May be absent on older groups.
                          example: f1235202-71e0-49ef-a8ba-939b8d3ec945
                        updatedBy:
                          type: string
                          description: >-
                            ID of the user or API client that last changed the
                            group. May be absent on older groups.
                          example: f1235202-71e0-49ef-a8ba-939b8d3ec945
                        createdAt:
                          type: string
                          description: When the group was created.
                          example: '2026-10-02T13:27:41.512Z'
                          format: date-time
                        updatedAt:
                          type: string
                          description: When the group last changed.
                          example: '2026-10-09T17:05:12.034Z'
                          format: date-time
                        memberCount:
                          type: number
                          description: >-
                            Number of IDs in `memberIds`. It can be larger than
                            the number of `members` when a member has left the
                            organization.
                          example: 1
                        members:
                          type: array
                          items:
                            type: object
                            properties:
                              userId:
                                type: string
                                description: ID of the user.
                                example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                                format: uuid
                              firstName:
                                type: string
                                description: First name of the user.
                                example: Mariana
                              lastName:
                                type: string
                                description: Last name of the user.
                                example: Costa
                              email:
                                type: string
                                description: E-mail of the user.
                                example: mariana.costa@acme.com.br
                              status:
                                type: string
                                enum:
                                  - IN_ONBOARDING
                                  - CREATING
                                  - ACTIVE
                                  - DEACTIVATED
                                  - BLOCKED
                                description: >-
                                  Current status of the user. Only `ACTIVE`
                                  users can be added to a group; a member whose
                                  user is later deactivated or blocked stays in
                                  the group with that status.
                                example: ACTIVE
                            required:
                              - userId
                              - firstName
                              - lastName
                              - email
                              - status
                            description: >-
                              A user of the organization who is a member of the
                              group.
                          description: >-
                            Details of each member, in `memberIds` order. A
                            member who has since left the organization is
                            omitted here but stays in `memberIds`.
                      required:
                        - id
                        - memberCount
                        - memberIds
                        - members
                        - name
                        - organization
                        - realm
                        - status
                      description: A group in a page of the group list.
                    description: The groups on this page, sorted by name.
                required:
                  - next
                  - items
                description: A page of groups.
        '422':
          description: >-
            `BAD_REQUEST` — A path or query parameter is invalid; `fields` lists
            each one.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - IDENTITY
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: IDENTITY
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: name
                    message: 'Too big: expected string to have <=80 characters'
                    code: NAME_MAX

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.