---
title: "Add consumer to consumer group"
method: POST
path: "/{workspace}/consumer_groups/{ConsumerGroupId}/consumers"
tags: ["Consumer Groups"]
---

# Add consumer to consumer group

`POST /{workspace}/consumer_groups/{ConsumerGroupId}/consumers`

Add a consumer to a consumer group

## Path parameters

- `workspace` string, required

## Request body

- object
  - `consumer` string

## Response `201`

Consumer added to group

- object
  - `consumer_group` ConsumerGroup
    - `created_at` integer, nullable — Unix epoch when the resource was created.
    - `id` string, nullable — A string representing a UUID (universally unique identifier).
    - `name` string, required — The name of the consumer group.
    - `tags` string[], nullable — A set of strings representing tags.
    - `updated_at` integer, nullable — Unix epoch when the resource was last updated.
  - `consumers` Consumer[]
    - `created_at` integer, nullable — Unix epoch when the resource was created.
    - `custom_id` string, nullable — 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.
    - `id` string, nullable — A string representing a UUID (universally unique identifier).
    - `tags` string[], nullable — An optional set of strings associated with the Consumer for grouping and filtering.
    - `updated_at` integer, nullable — Unix epoch when the resource was last updated.
    - `username` string, nullable — The unique username of the Consumer. You must send either this field or `custom_id` with the request.

---

[API](https://skmtc.net/kong/apis/kong-enterprise-admin-api.md) · [All operations](https://skmtc.net/kong/apis/kong-enterprise-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/kong-enterprise-admin-api/revisions/28b1f8a59cdc/schema)
