> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mentionlab.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List entity groups

> Returns a paginated list of entity groups matching the supplied filters.



## OpenAPI

````yaml https://api.mentionlab.io/api/docs-json post /api/entity-groups/list
openapi: 3.0.0
info:
  title: MentionLab Public API v0.3.4-rc
  description: ''
  version: 0.3.4-rc
  contact: {}
servers:
  - url: https://api.mentionlab.io
security: []
tags: []
paths:
  /api/entity-groups/list:
    post:
      tags:
        - Entity Groups
      summary: List entity groups
      description: Returns a paginated list of entity groups matching the supplied filters.
      operationId: EntityGroupsController_list
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: page
          required: false
          in: query
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: x-project-id
          in: header
          description: Project ID to specify the project context
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListEntityGroupsDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PagingResponse'
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/EntityGroupResponse'
                  page:
                    $ref: '#/components/schemas/Paging'
        '400':
          description: >-
            The request failed validation — the body, query or path parameters
            are malformed or out of range.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: The request is missing valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The authenticated principal lacks the required permission, or access
            to the requested organisation/project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ListEntityGroupsDto:
      type: object
      properties:
        name:
          type: string
          description: Filter entity groups by name using a case-insensitive partial match.
          example: Competitors
        kind:
          type: string
          description: >-
            Filter by container kind: "group" for top-level groups, "division"
            for divisions. Omit to list both.
          enum:
            - group
            - division
        parentId:
          type: string
          description: Filter to the divisions of a given group, by group ID.
          example: 018f3a2b-7c4d-7e91-b3f5-2a6c8d0e1f42
        sort:
          description: >-
            Sorting criteria for the returned entity groups. Supports sorting by
            "name" and "createdAt". Defaults to sorting by name in ascending
            order.
          example:
            - field: name
              direction: ASC
          type: array
          items:
            $ref: '#/components/schemas/SortOptions'
    PagingResponse:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Paging'
      required:
        - page
    EntityGroupResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - group
            - division
          description: >-
            What this container is: a top-level "group" or a "division".
            Immutable.
        parent:
          type: string
          description: >-
            Parent group ID. Set only on divisions that belong to a group; null
            on top-level groups and standalone divisions.
          format: uuid
          nullable: true
        name:
          type: string
        slug:
          type: string
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - kind
        - name
        - slug
        - createdAt
        - updatedAt
    Paging:
      type: object
      properties:
        totalRecords:
          type: number
        limit:
          type: number
        currentPage:
          type: number
        totalPages:
          type: number
        nextPage:
          type: number
        prevPage:
          type: number
      required:
        - totalRecords
        - limit
        - currentPage
        - totalPages
        - nextPage
        - prevPage
    ApiErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code of the error.
          example: 400
        message:
          type: string
          description: >-
            Human-readable description of the error. Validation failures return
            an array of per-field validation errors instead of a single string.
          example: Validation failed
        error:
          type: string
          description: Short name of the HTTP error.
          example: Bad Request
      required:
        - statusCode
    SortOptions:
      type: object
      properties:
        field:
          type: string
          description: Field name to sort by
        direction:
          type: string
          enum:
            - ASC
            - DESC
          description: Sort direction
      required:
        - field
        - direction

````