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

# List groups

> List all groups belonging to the authenticated partner. Requires a partner API token.



## OpenAPI

````yaml get /groups
openapi: 3.1.0
info:
  title: CookieChimp API
  description: API for CookieChimp.com
  version: 1.0.1
servers:
  - url: https://cookiechimp.com/api/v1
security:
  - authorization: []
paths:
  /groups:
    get:
      tags:
        - Groups
      summary: List groups
      description: >-
        List all groups belonging to the authenticated partner. Requires a
        partner API token.
      operationId: listGroups
      parameters:
        - $ref: '#/components/parameters/per_page'
        - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: List of groups
          content:
            application/json:
              schema:
                type: object
                properties:
                  pagination:
                    $ref: '#/components/schemas/GroupPagination'
                    type: object
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Group'
components:
  parameters:
    per_page:
      name: per_page
      in: query
      description: Number of records to return per page
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 50
        default: 20
    page:
      name: page
      in: query
      description: Page number
      required: false
      schema:
        type: integer
        default: 1
  schemas:
    GroupPagination:
      allOf:
        - $ref: '#/components/schemas/BasePagination'
      example:
        prev_url: /api/v1/groups?page=
        next_url: /api/v1/groups?page=2
        count: 4
        page: 1
        prev: null
        next: 2
    Group:
      type: object
      properties:
        id:
          type: string
          readOnly: true
          description: Unique identifier for the group
      allOf:
        - $ref: '#/components/schemas/GroupCreate'
      example:
        id: abc123
        name: Example Ltd
        external_id: ABC_123
        partner: partner_one
        max_pageviews_per_month: 500000
    BasePagination:
      type: object
      properties:
        prev_url:
          type: string
          description: Path to get previous page
        next_url:
          type: string
          description: Path to get next page
        count:
          type: integer
          description: Total number of pages
        page:
          type: integer
          description: Current page
        prev:
          type: integer
          description: Previous page number
        next:
          type: integer
          description: Next page number
    GroupCreate:
      type: object
      properties:
        name:
          type: string
          description: Name of the group
        external_id:
          type: string
          description: External ID set by the partner
        max_pageviews_per_month:
          type: integer
          description: Maximum number of pageviews per month
      required:
        - name
        - external_id
        - max_pageviews_per_month
  securitySchemes:
    authorization:
      type: http
      scheme: bearer
      description: API token obtained from the login endpoint or the dashboard

````