Update an API key - Spacefast Docs

Update an API key

Updates the key’s name, metadata, activation and expiry instants, IP allowlist, or its scope and permissions, and returns the updated key. scope and permissions change together, and must stay on the key’s existing owning team and collection. A key cannot change its own permissions, validity window, or IP allowlist, and a key minted by device login cannot change any of them. Secrets are fixed at creation; create a new key instead.

PATCH /v1/api-keys/{apiKeyId}

Authorization

Authorization: Bearer <token>
with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).

Scopes: teams:create

Path parameters

Request body

required application/json

Responses

200 Response for status 200