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

# Update a custom group

> Add or remove products/brands and optionally rename the group. Provide at least one of addProducts, removeProducts, addBrands, removeBrands, or groupName. Cannot mix product and brand operations in the same request.



## OpenAPI

````yaml /api-reference/openapi.json patch /customGroups/{id}
openapi: 3.0.1
info:
  title: MerchantSpring Public API
  version: 1.0.0
servers:
  - url: https://mm-api.merchantspring.io
    description: Production
  - url: https://mm-api-staging.merchantspring.io
    description: Staging
security: []
tags:
  - name: channel
    x-group: Channel
  - name: content-change
    x-group: Content Change
  - name: custom-group
    x-group: Custom Group
  - name: order
    x-group: Order
  - name: report
    x-group: Report
  - name: tag
    x-group: Tag
  - name: profitability
    x-group: Profitability
paths:
  /customGroups/{id}:
    patch:
      tags:
        - custom-group
      summary: Update a custom group
      description: >-
        Add or remove products/brands and optionally rename the group. Provide
        at least one of addProducts, removeProducts, addBrands, removeBrands, or
        groupName. Cannot mix product and brand operations in the same request.
      operationId: editCustomGroup
      parameters:
        - name: id
          in: path
          description: Group ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchGroupRequest'
      responses:
        '200':
          description: Successful operation
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
          content: {}
        '400':
          description: Invalid input
          content: {}
      security:
        - api_key: []
components:
  schemas:
    PatchGroupRequest:
      type: object
      required:
        - channelId
        - merchantId
      description: >-
        At least one of groupName, addProducts, removeProducts, addBrands,
        removeBrands must be provided. Cannot mix product and brand operations
        in the same request.
      properties:
        channelId:
          type: string
        merchantId:
          type: string
        groupName:
          type: string
        addProducts:
          type: array
          items:
            type: object
            properties:
              sellerSku:
                type: string
                description: The seller SKU of the product
        removeProducts:
          type: array
          items:
            type: object
            properties:
              sellerSku:
                type: string
                description: The seller SKU of the product
        addBrands:
          type: array
          items:
            type: string
        removeBrands:
          type: array
          items:
            type: string
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````