Update a scoped API key's scopes/name (project ADMIN)
Invalidates the KV cache entry so scope changes take effect immediately. Revoked keys cannot be modified.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”projectId
required
string
id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
scopes
Array<string>
name
string
Responses
Section titled “Responses”Updated
Media typeapplication/json
object
key
object
id
string
projectId
string
name
string | null
scopes
Array<string>
revoked
boolean
createdAt
string
revokedAt
string | null
keyMasked
string
Missing projectId
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Not authorized
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Needs project ADMIN
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Key not found
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Key already revoked
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Validation failed
Media typeapplication/json
object
error
required
string
issues
Array<object>
object
path
string
message
string
details
Array<object>
object
key
additional properties
any
key
additional properties
any
Example
{ "error": "参数校验失败"}