---
title: "Create a group"
url: "https://earlyaccess.developers.bynder.com/apis/groups-1/versions/8b5e3751-b1f6-4df8-9f5d-f494f76062f0/operations/createGroup"
---

> Full API specification: https://earlyaccess.developers.bynder.com/apis/groups-1/versions/8b5e3751-b1f6-4df8-9f5d-f494f76062f0.md

# Create a group

`POST` `/api/1/groups`

Operation ID: `createGroup`

Creates a new group. Requires the **GROUPMANAGEMENT** security role.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Group created successfully.
- `401` - Missing or invalid authentication. The response body is empty.
- `403` - The authenticated user does not have the **GROUPMANAGEMENT** security role.
- `409` - A group with this name already exists.
- `422` - Validation error (e.g. `name` is missing or not a string).

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Groups
  version: 1.0.0
servers:
  - url: https://{your-bynder-domain}/
paths:
  /api/1/groups:
    post:
      description: |
        Creates a new group.

        Requires the **GROUPMANAGEMENT** security role.
      operationId: createGroup
      requestBody:
        content:
          application/json:
            schema:
              properties:
                description:
                  description: Optional description of the group.
                  type:
                    - string
                    - "null"
                name:
                  description: Name of the group. Must be unique within the account. Must be a
                    string (numbers are not coerced).
                  type: string
              required:
                - name
              type: object
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Group"
          description: Group created successfully.
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: A group with this name already exists.
        "422":
          description: Validation error (e.g. `name` is missing or not a string).
      security:
        - permanentToken:
            - GROUPMANAGEMENT
        - OAuth2:
            - GROUPMANAGEMENT
      summary: Create a group
      tags:
        - Groups (Preferred)
security:
  - permanentToken:
      - GROUPMANAGEMENT
  - OAuth2:
      - GROUPMANAGEMENT
components:
  schemas:
    Group:
      example:
        description: Everyone in the marketing department
        id: 0397e4bd-33fe-4b8f-a51d-4c2f1d9b6c1a
        name: Marketing
        user_count: 12
      properties:
        description:
          type:
            - string
            - "null"
        id:
          format: uuid
          type: string
        name:
          type: string
        user_count:
          description: Number of members in the group.
          type: integer
      type: object
    ErrorResponse:
      properties:
        detail:
          properties:
            error:
              description: Human-readable description of the error.
              type: string
          type: object
      type: object
  responses:
    Unauthorized:
      description: Missing or invalid authentication. The response body is empty.
    Forbidden:
      description: The authenticated user does not have the **GROUPMANAGEMENT**
        security role.
  securitySchemes:
    permanentToken:
      in: header
      name: Authorization
      type: apiKey
    OAuth2:
      flows:
        authorizationCode:
          authorizationUrl: https://{your-auth-url}
          scopes:
            GROUPMANAGEMENT: Grants permission to manage groups`
          tokenUrl: https://{your-bynder-domain}/v6/authentication/oauth2/token
        clientCredentials:
          scopes:
            GROUPMANAGEMENT: Grants permission to manage groups
          tokenUrl: https://{your-bynder-domain}/v6/authentication/oauth2/token
      type: oauth2
```
