Create a consumer
Changed onCreate a new consumer in this Realm. It will be available to use for authentication within a few seconds, unless the consumer's username is blocked in the Gateway. If this is the case, the new consumer will be available in negative_ttl (see the Realm definition) seconds.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Path parameters
ID of the realm
Request body
The unique username of the Consumer.
Field for storing an existing unique ID for the Consumer - useful for mapping Kong with users in your existing database.
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 of the consumer.
Response
success
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.
The Consumer ID.
The unique username of the Consumer. You must send either this field or custom_id with the request.
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 of the consumer.
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.
An ISO-8601 timestamp representation of entity creation date.
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/itemsresponse propertyoneOflist for the response status - warning
added the new
key_invalidenum value to theinvalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/ruleresponse property for the response status - warning
added the new
uniqueenum value to theinvalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/ruleresponse property for the response status
- breaking