v11

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-07-065662751.8 MB
Consumers

Create a new Consumer

Create a new Consumer

post/{workspace}/consumers

Path parameters

workspacestring required
Example:team-payments

The name of the workspace

Request body

created_atinteger nullable

Unix epoch when the resource was created.

custom_idstring 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.

idstring nullable

A string representing a UUID (universally unique identifier).

tagsstring[] nullable

An optional set of strings associated with the Consumer for grouping and filtering.

updated_atinteger nullable

Unix epoch when the resource was last updated.

usernamestring nullable

The unique username of the Consumer. You must send either this field or custom_id with the request.

Example request

{
  "custom_id": "4200",
  "id": "8a388226-80e8-4027-a486-25e4f7db5d21",
  "tags": [
    "silver-tier"
  ],
  "username": "bob-the-builder"
}

Response

Successfully created Consumer

created_atinteger nullable

Unix epoch when the resource was created.

custom_idstring 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.

idstring nullable

A string representing a UUID (universally unique identifier).

tagsstring[] nullable

An optional set of strings associated with the Consumer for grouping and filtering.

updated_atinteger nullable

Unix epoch when the resource was last updated.

usernamestring nullable

The unique username of the Consumer. You must send either this field or custom_id with the request.

Example response

{
  "custom_id": "4200",
  "id": "8a388226-80e8-4027-a486-25e4f7db5d21",
  "tags": [
    "silver-tier"
  ],
  "username": "bob-the-builder"
}