> ## 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.

# Update group

> Update a group by ID. Requires a partner API token. Note that `max_pageviews_per_month` cannot be changed after creation.



## OpenAPI

````yaml put /groups/{id}
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/{id}:
    put:
      tags:
        - Groups
      summary: Update group
      description: >-
        Update a group by ID. Requires a partner API token. Note that
        `max_pageviews_per_month` cannot be changed after creation.
      operationId: updateGroup
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        description: Group to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupUpdate'
      responses:
        '200':
          description: Updated group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
components:
  parameters:
    id:
      name: id
      in: path
      description: ID of the resource
      required: true
      schema:
        type: string
  schemas:
    GroupUpdate:
      type: object
      properties:
        name:
          type: string
          description: Name of the group
        external_id:
          type: string
          description: External ID set by the partner
      required:
        - name
        - external_id
    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
    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

````