POST https://api.usecommune.com/publishable-keys/{publishable_key}/rotate Production. There is no separate sandbox host.

Rotate a publishable key

Mints a replacement carrying the same name, origins, rate limit and quota as the key you named. Needs settings: write, and is a write.

The old key keeps working. That is the whole point of rotating rather than revoking: a publishable key lives in deployed HTML, so the order has to be mint, deploy, then revoke. Two live keys in between is the normal case rather than a violation, and last_used_at on each is how you tell when the old one has stopped being called.

Revoke a publishable key is the third step, and nothing here does it for you: Commune cannot know when your pages have gone out.

Rotating a revoked key is allowed and is the ordinary way to replace one you have lost: it copies the settings and mints a new secret, and the revoked key stays revoked.

As with minting, the secret is in this response and nowhere else.

Publishes no event.

Path parameters

  • string(uuid) Required

Request Headers

  • string Required
  • string
POST /publishable-keys/{publishable_key}/rotate
Loading...

Share your request

Use this link to easily share a pre-filled request of this operation. Everything you filled will be shared apart from the authentication fields.

Request URL

https://api-reference.usecommune.dev/explorer/operation/operation-rotatepublishablekey

Send a delete request

It looks like you’re about to send a DELETE request to this API. This type of request carries a risk of permanent and irreversible data loss.

Are you sure you want to continue?
Response
Waiting for a request to be sent.