---
title: "Upsert a KeySet"
method: PUT
path: "/v2/control-planes/{controlPlaneId}/core-entities/key-sets/{KeySetId}"
tags: ["KeySets"]
---

# Upsert a KeySet

`PUT /v2/control-planes/{controlPlaneId}/core-entities/key-sets/{KeySetId}`

Create or Update KeySet using ID or name.

## Request body

- KeySet
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `name` string, nullable — The name to associate with the given key-set.
  - `tags` string[], nullable — A set of strings representing tags.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.

## Response `200`

Successfully upserted KeySet

- KeySet
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `name` string, nullable — The name to associate with the given key-set.
  - `tags` string[], nullable — A set of strings representing tags.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.

## Other responses

- `401` — Unauthorized

## Changes

- **2025-07-22** `2c77aeaee5fb` — 1 breaking, 1 info
  - the response property `tags` became nullable for the status `200`
  - the request property `tags` became nullable
- **2025-06-27** `9f695af25102` — 1 info
  - request body became optional
- **2025-04-15** `fc6abbc537f3` — 2 breaking, 6 info
  - the response property `created_at` became nullable for the status `200`
  - the response property `updated_at` became nullable for the status `200`
  - the request optional property `created_at` became not read-only
  - the request optional property `updated_at` became not read-only
  - …4 more
- **2024-12-06** `426663331655` — 1 breaking
  - the request property `tags` became not nullable
- **2024-11-11** `08ead66e9ebb` — 3 breaking, 5 info
  - the response property `id` became nullable for the status `200`
  - the response property `name` became nullable for the status `200`
  - the response property `tags` became nullable for the status `200`
  - the request optional property `id` became not read-only
  - …4 more

[Change history](https://skmtc.dev/kong/apis/konnect-api/changes/v2/control-planes/:controlPlaneId/core-entities/key-sets/:KeySetId/put.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)
