Centrally Managed Consumers

Update a consumer

Changed on

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.

patch/v1/realms/{realmId}/consumers/{consumerId}

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

realmId, string uuid required

ID of the realm

consumerId, string required

ID of the of the consumer

Request body

UpdateConsumerPayload required
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

success

CentralizedConsumer required

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.

Example response

{
  "custom_id": "4200",
  "id": "8a388226-80e8-4027-a486-25e4f7db5d21",
  "type": "proxy",
  "consumer_groups": [
    "gold"
  ],
  "tags": [
    "partner"
  ],
  "username": "bob-the-builder",
  "created_at": "2025-06-17T16:55:58.569399532Z",
  "updated_at": "2025-06-17T16:55:58.569399532Z"
}

Changes

    • breaking

      added to the invalid_parameters/items response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status

    • warning

      added the new unique enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status