POST
/
v1
/
keys.updateKey
curl --request POST \
  --url https://api.unkey.dev/v1/keys.updateKey \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json'
{}

Changelog

DateChanges
Dec 06 2023Introduced endpoint

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
keyId
string
required

The id of the key you want to modify

name
string | null

The name of the key

ownerId
string | null

The id of the tenant associated with this key. Use whatever reference you have in your system to identify the tenant. When verifying the key, we will send this field back to you, so you know who is accessing your API.

meta
object | null

Any additional metadata you want to store with the key

expires
number | null

The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring.

ratelimit
object | null

Unkey comes with per-key ratelimiting out of the box. Set null to disable.

remaining
number | null

The number of requests that can be made with this key before it becomes invalid. Set null to disable.

refill
object | null

Unkey enables you to refill verifications for each key at regular intervals.

enabled
boolean

Set if key is enabled or disabled. If disabled, the key cannot be used to verify.

Response

200 - application/json

The response is of type object.