---
title: "Update a Consumer"
method: PATCH
path: "/consumers/{ConsumerIdOrUsername}"
tags: ["Consumers"]
---

# Update a Consumer

`PATCH /consumers/{ConsumerIdOrUsername}`

Update a Consumer

## Request body

- Consumer
  - `created_at` integer — Unix epoch when the resource was created.
  - `custom_id` string — 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
  - `tags` string[] — An optional set of strings associated with the Consumer for grouping and filtering.
  - `updated_at` integer — Unix epoch when the resource was last updated.
  - `username` string — The unique username of the Consumer. You must send either this field or `custom_id` with the request.

## Response `200`

Successfully updated Consumer

- Consumer
  - `created_at` integer — Unix epoch when the resource was created.
  - `custom_id` string — 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
  - `tags` string[] — An optional set of strings associated with the Consumer for grouping and filtering.
  - `updated_at` integer — Unix epoch when the resource was last updated.
  - `username` string — The unique username of the Consumer. You must send either this field or `custom_id` with the request.

## Other responses

- `401` — Unauthorized
- `404` — Resource does not exist

## Changes

> 3 revisions in range; 1 not diffed.

- **2024-09-11** `5bd52189d290` — 1 warning
  - deleted the `path` request parameter `ConsumerIdOrUsername`

[Change history](https://skmtc.dev/kong/apis/kong-enterprise-admin-api/changes/consumers/:ConsumerIdOrUsername/patch.md)

---

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