---
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** `76b0fefddb0d` — 1 breaking, 1 info
  - the response property `tags` became nullable for the status `200`
  - the request property `tags` became nullable
- **2025-06-27** `0aead68de7b0` — 1 info
  - request body became optional

[Change history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v2/control-planes/:controlPlaneId/core-entities/key-sets/:KeySetId/put.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) · [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kong/konnect-api-go-sdk/revisions/7d3c634668f8/schema)
