---
title: "Create a consumer group"
url: "https://nov18-dev.movespot.fyi/apis/konnect-runtime-groups-configuration-0/versions/af18902c-58f1-49d7-8ec2-9987b4e0d1bd/operations/put-runtimeGroupId-core-entities-consumer_groups-group_id"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-runtime-groups-configuration-0/versions/af18902c-58f1-49d7-8ec2-9987b4e0d1bd.md

# Create a consumer group

`PUT` `/runtime-groups/{runtimeGroupId}/core-entities/consumer_groups/{group_id}`

Operation ID: `put-runtimeGroupId-core-entities-consumer_groups-group_id`

Create a consumer group.

## Path parameters

- `runtimeGroupId` (string, required) - The ID of your runtime group. This variable is available in the Konnect manager
- `group_id` (string, required) - The UUID of the consumer group.

## Request body

Content types: `application/json`

## Responses

- `200` - The consumer object response body

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect Runtime Groups Configuration
  version: 0.0.1
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /runtime-groups/{runtimeGroupId}/core-entities/consumer_groups/{group_id}:
    parameters:
      - $ref: "#/components/parameters/runtimeGroupId"
      - $ref: "#/components/parameters/group_id"
    put:
      operationId: put-runtimeGroupId-core-entities-consumer_groups-group_id
      summary: Create a consumer group
      description: Create a consumer group.
      requestBody:
        $ref: "#/components/requestBodies/consumer-request"
      responses:
        "200":
          $ref: "#/components/responses/consumer-response-data"
      tags:
        - consumer-groups
security:
  - konnectAccessToken: []
  - personalAccessToken: []
components:
  parameters:
    runtimeGroupId:
      name: runtimeGroupId
      in: path
      required: true
      schema:
        type: string
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The ID of your runtime group. This variable is available in the
        Konnect manager
    group_id:
      name: group_id
      in: path
      required: true
      schema:
        type: string
        example: be4bcfca-b1df-4fac-83cc-5cf6774bf48e
      description: The UUID of the consumer group.
  requestBodies:
    consumer-request:
      content:
        application/json:
          schema:
            type: object
            properties:
              username:
                description: >
                  The unique username of the Consumer. You must send either this
                  field or custom_id with the request.
                type: string
              custom_id:
                description: >
                  Field for storing an existing unique ID for the Consumer -
                  useful for mapping Kong with users in your existing database.
                  You must send either this field or username with the request.
                type: string
              tags:
                description: >
                  An optional set of strings associated with the Consumer for
                  grouping and filtering.
                type: array
                items:
                  type: string
            required:
              - username
              - custom_id
            x-examples:
              Example 1:
                id: ec1a1f6f-2aa4-4e58-93ff-b56368f19b27
                created_at: 1422386534
                username: my-username
                custom_id: my-custom-id
                tags:
                  - user-level
                  - low-priority
      description: Consumer request body
  responses:
    consumer-response-data:
      description: The consumer object response body
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      description: The unique identifier or the name attribute of the consumer.
                      type: string
                      example: a4407883-c166-43fd-80ca-3ca035b0cdb7
                    created_at:
                      description: Unix epoch when the resource was created.
                      type: integer
                      example: 1422386534
                    username:
                      description: The unique username of the consumer. You must send either this
                        field or` custom_i`d with the request.
                      type: string
                      example: my-username
                    custom_id:
                      description: Field for storing an existing unique ID for the Consumer - useful
                        for mapping Kong with users in your existing database.
                      type: string
                      example: my-custom-id
                    updated_at:
                      description: Unix epoch when the resource was created.
                      type: string
                      example: "1422386534"
                    tags:
                      description: >
                        An optional set of strings associated with the Consumer
                        for grouping and filtering.
                      type: array
                      items:
                        type: string
                        example: admin
              next:
                description: Pagination information
                type: string
                example: http://localhost:8001/consumers?offset=6378122c-a0a1-438d-a5c6-efabae9fb969
            x-examples:
              Example 1:
                data:
                  - id: a4407883-c166-43fd-80ca-3ca035b0cdb7
                    created_at: 1422386534
                    username: my-username
                    custom_id: my-custom-id
                    tags:
                      - user-level
                      - low-priority
                  - id: 01c23299-839c-49a5-a6d5-8864c09184af
                    created_at: 1422386534
                    username: my-username
                    custom_id: my-custom-id
                    tags:
                      - admin
                      - high-priority
                      - critical
                next: http://localhost:8001/consumers?offset=6378122c-a0a1-438d-a5c6-efabae9fb969
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      description: >-
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI to

        authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      description: The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs. You can generate a Personal
        Access Token (PAT) from the personal access token page in the Konnect
        dashboard.
```
