@spec update_key(binary(), map()) :: :ok

Updates the configuration of a key.

Takes in a key_id argument and a map whose members are optional but must have at most 1 member present.

To delete a field, set it to nil.

Request

keyId
string
required

The ID of the key you want to revoke.

name
string | nil

Update the name of the key.

ownerId
string | nil

Update the owner id of the key.

meta
JSON | nil

Update the metadata of a key. You will have to provide the full metadata object, not just the fields you want to update.

expires
int | nil

Update the expire time of a key.

The expire time is a unix timestamp in milliseconds.

ratelimit
Object | nil

Unkey comes with per-key ratelimiting out of the box.

remaining
int | nil

Update the expire time of a key.

The expire time is a unix timestamp in milliseconds.

Response

Returns an atom :ok