New Ory Agent Security is now live! Claim your complimentary test drive. Get Started!

Skip to main content

Update Imported API Key

PATCH 

/v2alpha1/admin/importedApiKeys/:key_id

Updates metadata, scopes, or rate limits of an imported key. Supports partial updates via the update_mask query parameter (AIP-134). Omitting update_mask is equivalent to a mask of every populated field in the body. To clear a field to its zero value, list it explicitly in update_mask and leave it unset (or empty) in the body.

PATCH /v2alpha1/admin/importedApiKeys/{key_id}?update_mask=name
{
"imported_api_key": {
"key_id": "{key_id}",
"name": "New name"
}
}
SDK ReferenceTypeScript
adminUpdateImportedApiKey(adminUpdateImportedApiKeyRequest)
ParametersTypeRequiredDescription
adminUpdateImportedApiKeyRequestAdminUpdateImportedApiKeyRequestrequired
keyIdstringrequiredSHA-512/256 hash of credential
updateMaskstringoptionalThe list of fields to update. See AIP-134.
VariableType
dataImportedApiKey