---
source_url: https://www.pubnub.com/docs/admin-api/secret-keys-introduction
title: Secret Keys Introduction
---

# Secret Keys Introduction

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

This group of endpoints allows you to manage and rotate secret keys. Use it especially if your secret key security has been compromised or for regular security rotation. You will have exactly one, main, secret key with no expiry date and up to five time-limited keys.

You can either replace the main secret key or rotate with additional time-limited secret keys for gradual switch without downtime. If the migration takes longer than usual, you can update the expiration time, or delete the already unused secret key.

**Note**: You must be on a paid plan to use secret key rotation with the overlap period.

## [GET List secret keys for a keyset](https://www.pubnub.com/docs/admin-api/list-secret-keys-for-a-keyset.md)

Retrieves all secret keys associated with a keyset.

## [POST Rotate secret key](https://www.pubnub.com/docs/admin-api/rotate-secret-key.md)

Rotates the keyset's secret key.

## [DELETE Delete a rotated secret key](https://www.pubnub.com/docs/admin-api/delete-a-rotated-secret-key.md)

Deletes a rotated secret key.

## [PATCH Update secret key expiration time](https://www.pubnub.com/docs/admin-api/update-secret-key-expiration-time.md)

Updates the expiration time of a rotated secret key.
