Skip to content

Rename an API key

PATCH
/me/api-tokens/{id}

Name-only — never touches the secret, scope, or expiry. Audited as api_token.renamed.

Authorizations

bearer
Type
HTTP (bearer)

Parameters

Path Parameters

id*
Type
string
Required

Request Body

application/json
JSON
{
  
"name": "CI deploy (staging)"
}

Responses

The renamed key.

application/json
JSON
{
  
"id": "018f0a5e-1c2b-7e3a-9b4c-0000000f0001",
  
"name": "CLI · device login",
  
"kind": "string",
  
"prefix": "ptl_u_0727c24e…",
  
"read_only": true,
  
"created_at": "string",
  
"last_used_at": "string"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

One vocabulary, every door.