---
title: "Update a consumer"
method: PATCH
path: "/v1/realms/{realmId}/consumers/{consumerId}"
tags: ["Centrally Managed Consumers"]
---

# Update a consumer

`PATCH /v1/realms/{realmId}/consumers/{consumerId}`

Update a Consumer's details. Any consumers already cached in a running Gateway will not be affected body the changes to the Realm until `ttl` minutes have passed.

## Request body

- UpdateConsumerPayload
  - `username` string — The unique username of the Consumer.
  - `custom_id` string, nullable — Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database.
  - `consumer_groups` string[], nullable — A list of consumer groups that the Consumer is in. If `consumer_groups` are provided on the Consumer object _and_ on the Realm, the Consumer will be placed in all defined consumer groups.
  - `type` 'proxy' | 'developer' | 'admin' | 'application' — Type of the consumer.
  - `tags` string[]

## Response `200`

success

- CentralizedConsumer — The Consumer object represents a consumer - or a user - of a Service. You can either rely on Kong as the primary datastore, or you can map the consumer list with your database to keep consistency between Kong and your existing primary datastore.
  - `id` string, uuid, required — The Consumer ID.
  - `username` string, required — The unique username of the Consumer. You must send either this field or `custom_id` with the request.
  - `custom_id` string, nullable, required — 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` 'proxy' | 'developer' | 'admin' | 'application', required — Type of the consumer.
  - `tags` string[], required
  - `consumer_groups` string[], required — A list of consumer groups that the Consumer is in. If `consumer_groups` are provided on the Consumer object _and_ on the Realm, the Consumer will be placed in all defined consumer groups.
  - `created_at` string, date-time, required — An ISO-8601 timestamp representation of entity creation date.
  - `updated_at` string, date-time, required — An ISO-8601 timestamp representation of entity update date.

## Other responses

- `400` — Bad Request
- `404` — Not Found

## Changes

- **2025-10-29** `19e869275e28` — 1 warning
  - added the new `type` enum value to the `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
- **2025-08-22** `96118a9cd7f4` — 5 breaking
  - the response property `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterChoiceItem]/source` became nullable for the status `400`
  - the response property `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterDependentItem]/source` became nullable for the status `400`
  - the response property `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterMaximumLength]/source` became nullable for the status `400`
  - the response property `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterMinimumLength]/source` became nullable for the status `400`
  - …1 more
- **2025-07-15** `dbc2de5f2663` — 2 info
  - the request property `consumer_groups` became nullable
  - the request property `custom_id` became nullable
- **2025-06-27** `9f695af25102` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/kong/apis/konnect-api/changes/v1/realms/:realmId/consumers/:consumerId/patch.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api.md) · [All operations](https://skmtc.dev/kong/apis/konnect-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kong/konnect-api/revisions/72502a676a92/schema)
