---
title: "Atomically replace an active key with the same name, scopes and expiry duration"
method: POST
path: "/api/member/tokens/{tokenId}/rotate"
---

# Atomically replace an active key with the same name, scopes and expiry duration

`POST /api/member/tokens/{tokenId}/rotate`

## Request

- Base URL: `https://probable.media`
- URL: `https://probable.media/api/member/tokens/{tokenId}/rotate`
- Auth: API key in cookie `probable_session`

## Path parameters

- `tokenId` string, uuid, required

## Response `201`

New secret shown once; old key revoked

## Other responses

- `404`: Active owned key not found
- `409`: Key changed concurrently; refresh and retry

---

[API](https://skmtc.dev/probable/apis/probable-public-api.md) · [All operations](https://skmtc.dev/probable/apis/probable-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/probable/apis/probable-public-api/revisions/28e1acd459f3?raw)
