Skip to main content
PATCH
Rename project API key
This endpoint requires an Admin Key with the org:write scope, and the key owner must still be an organization admin at call time (otherwise 403 owner_not_admin).

Authorizations

Authorization
string
header
required

Send the Admin API secret as a Bearer token in the Authorization header (Bearer sk-admin-***). Create Admin Keys under Console → Organization → Admin API Keys.

Path Parameters

pid
string
required

Project ID.

key
string
required

Business API key ID.

Body

application/json
name
string
required

New name. 1-30 UTF-8 characters.

Example:

"production-main-key"

Response

Renamed API key metadata. Secret is never returned.

key
string
required

Business API key ID.

name
string
required

Key name.

key_preview
string
required

Masked preview (sk-X...yyyy). Secret is never returned.

uid
string
required

User ID of the key owner.

created_at
string<date-time>
required

When the key was created.