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

# Create Customer Group

> Create a new Customer Group



## OpenAPI

````yaml /openapi.yaml post /customer-groups
openapi: 3.1.1
info:
  title: MijnKlantportaal API
  version: v1
servers:
  - url: https://api.mijnklantportaal.nl/v1
security:
  - APIKey: []
tags:
  - name: Agreements API
  - name: Appointments API
  - name: Customers API
  - name: Customer Groups API
  - name: Customer Invoices API
  - name: Customer Offers API
  - name: Customer Subscriptions API
  - name: Customer Subscription Packages API
  - name: Files API
  - name: File Request API
  - name: File Share API
  - name: Invoices API
  - name: Payment Links API
  - name: Punch Cards API
  - name: Tickets API
  - name: Webhooks API
paths:
  /customer-groups:
    post:
      tags:
        - Customer Groups API
      summary: Create Customer Group
      description: Create a new Customer Group
      operationId: create-customer-group
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  example: Hosting customers
                  description: Name of the Customer Group
                customers:
                  type: array
                  description: >-
                    An array of Customer IDs which needs to be added to the
                    Group. Please note that unknown or wrong Customer IDs are
                    ignored, no error is returned.
                  items:
                    type: string
                    example: cst_abc12345
      responses:
        '201':
          description: Returning the created Customer Group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerGroup'
        '422':
          description: Something is wrong with the posted data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_ApiError'
components:
  schemas:
    CustomerGroup:
      type: object
      description: Customer Group
      properties:
        id:
          type: string
          example: cug_abc12345def678
          description: ID of the customer group, always starting with `cug_`.
        name:
          type: string
          example: Webhosting customers
          description: Name of the customer group
        createdAt:
          type: string
          example: '2025-07-27T14:42:00+02:00'
          description: >-
            Date and time when the customer group was created, written in ATOM
            format.
    Error_ApiError:
      type: object
      properties:
        message:
          type: string
          description: Explanation what went wrong
  securitySchemes:
    APIKey:
      type: http
      scheme: bearer

````