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

# Create Product Group

> Create an empty product group. Names are unique per account, ignoring case.

[Subtotal Connector tool: create\_product\_group](/docs/connector/tools#create_product_group)

Creates an empty group. Names are unique on your account, ignoring case: a name already in use returns `409`. Add products with [Update group products](/docs/api-reference/product-groups/update-product-group-products).

Call it with your API key, or with a [Subtotal Connector](/docs/connector/introduction) OAuth token that includes `product_groups:write`. A token without it receives `403 insufficient_scope`. [Partner app](/docs/partner-apps/introduction#fixed-permissions) tokens don't include it.


## OpenAPI

````yaml post /product-groups
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /product-groups:
    post:
      tags:
        - product groups
      summary: Create Product Group
      description: >-
        Create an empty product group. Names are unique per account, ignoring
        case.
      operationId: create_product_group_product_groups_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductGroupNameRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductGroupSummary'
        '409':
          description: You already have a group with this name (names are case-insensitive)
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ProductGroupNameRequest:
      properties:
        name:
          type: string
          maxLength: 60
          minLength: 1
          title: Name
      type: object
      required:
        - name
      title: ProductGroupNameRequest
      description: >-
        Create / rename body (ENG-3282). Stripped first so a whitespace-only
        name cannot satisfy min_length.
    ProductGroupSummary:
      properties:
        product_group_id:
          type: string
          title: Product Group Id
        name:
          type: string
          title: Name
        product_count:
          type: integer
          title: Product Count
        creation_date:
          type: string
          format: date-time
          title: Creation Date
      type: object
      required:
        - product_group_id
        - name
        - product_count
        - creation_date
      title: ProductGroupSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.