Update a key
Updates the configuration of an existing key. Omit fields to leave unchanged.
Changelog
Date | Changes |
---|---|
Dec 06 2023 | Introduced endpoint |
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The id of the key you want to modify
The name of the key
Deprecated, use externalId
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.
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 back to you, so you know who is accessing your API.
Under the hood this upserts and connects an ìdentity
for you.
To disconnect the key from an identity, set externalId: null
.
Any additional metadata you want to store with the key
The unix timestamp in milliseconds when the key will expire. If this field is null or undefined, the key is not expiring.
Unkey comes with per-key ratelimiting out of the box. Set null
to disable.
The number of requests that can be made with this key before it becomes invalid. Set null
to disable.
Unkey enables you to refill verifications for each key at regular intervals.
Set if key is enabled or disabled. If disabled, the key cannot be used to verify.
The roles you want to set for this key. This overwrites all existing roles.
Setting roles requires the rbac.*.add_role_to_key
permission.
The permissions you want to set for this key. This overwrites all existing permissions.
Setting permissions requires the rbac.*.add_permission_to_key
permission.
Response
The response is of type object
.
Was this page helpful?