Skip to main content
PATCH
Update API key

Authorizations

Authorization
string
header
required

First-party Gumnut app session (Clerk session JWT). Only the Gumnut web and mobile apps can obtain one — API keys and OAuth tokens cannot manage credentials, so these operations are not callable with the credentials this API otherwise accepts.

Path Parameters

key_id
string
required

ID of the API key to update

Body

application/json
name
string
required

New name for the API key

Maximum string length: 255

Response

Successful Response

Represents an API key for authentication (without exposing the actual key).

id
string
required

Unique API key identifier with 'apikey_' prefix

created_at
string<date-time>
required

When this API key was created

is_active
boolean
required

Whether this API key is currently valid and can be used

name
string | null

Optional descriptive name for this API key

last_used_at
string<date-time> | null

When this API key was last used for authentication

actions
enum<string>[] | null

Action verbs this key's grant allows; null for legacy keys

Actions a credential may perform.

read views resources; write creates or changes them; delete trashes photos or libraries and destructively removes organizational records and associations such as albums, people, faces, and memberships; delete_permanently irreversibly deletes photos or libraries.

Available options:
read,
write,
delete,
delete_permanently
library_scope_mode
enum<string> | null

'all_libraries' or 'selected_libraries'; null for legacy keys

Available options:
all_libraries,
selected_libraries
selected_library_count
integer | null

Number of libraries a 'selected_libraries' grant covers; null unless library_scope_mode is 'selected_libraries'