Set or clear a key's tier
PATCH
/v1/admin/tenants/{tenant}/keys/{key}
const url = 'https://example.com/v1/admin/tenants/example/keys/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"tier":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/admin/tenants/example/keys/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "tier": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”tenant
required
string
key
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
tier
Example generated
{ "tier": "example"}Responses
Section titled “Responses”The answer.
Media typeapplication/json
object
id
required
string
tenant
required
string
name
required
string
scopes
required
Array<string>
createdAt
required
string
expiresAt
required
revokedAt
required
null | string
lastUsedAt
required
null | string
rotatedTo
required
null | string
tier
required
Example generated
{ "id": "example", "tenant": "example", "name": "example", "scopes": [ "example" ], "createdAt": "example", "expiresAt": "example", "revokedAt": "example", "lastUsedAt": "example", "rotatedTo": "example", "tier": "example"}The request is malformed (bad-request).
Media typeapplication/json
object
code
required
string
message
required
string
requestId
string
Example
{ "code": "field-unknown"}No key, or not a valid one.
Media typeapplication/json
object
code
required
string
message
required
string
requestId
string
Example
{ "code": "field-unknown"}The key lacks the scope, or its tenant is suspended or deleted.
Media typeapplication/json
object
code
required
string
message
required
string
requestId
string
Example
{ "code": "field-unknown"}Not there, or not the tenant’s.
Media typeapplication/json
object
code
required
string
message
required
string
requestId
string
Example
{ "code": "field-unknown"}