POST
/v1/organizations/{organizationId}/projects/{projectId}/environments/{environmentId}/service-principals/{principalId}/api-keys/{apiKeyId}/revokeRevoke an API Key for an Environment-scoped ServicePrincipal
Permanently revoke one credential while preserving its safe metadata.
Authentication
Send an API key as a Bearer token in the Authorization header.
Parameters
Responses
200ApiKeyMetadataapplication/json401Unauthorizedapplication/json403Forbiddenapplication/json404NotFoundapplication/jsonReusable schemas
ApiKeyMetadataEncoded
object- unknown properties allowed
false
apiKeyIdrequiredstringThe identifier of the issued API key.- maximum length
64 - pattern
^apikey_[\s\S]+$
- maximum length
principalIdrequiredstringThe Principal identifier.- maximum length
64 - pattern
^principal_[\s\S]+$
- maximum length
creationIdempotencyKeyrequired- The caller-chosen issuance key that identifies this committed credential.Any of
null namerequiredstringThe human-readable resource name.displayPrefixrequiredstringThe non-secret leading characters used to distinguish this credential.createdByPrincipalIdrequiredstringThe Principal that created this immutable record.- maximum length
64 - pattern
^principal_[\s\S]+$
- maximum length
createdAtrequiredstringWhen the resource was created, in UTC.- format
date-time
- format
expiresAtrequiredstringWhen the resource expires, in UTC, or null when it does not expire.- format
date-time
- format
lastUsedAtrequired- Approximately when this credential was last presented, in UTC, or null before its first use.
- format
date-time
Any ofstringnull - format
revokedAtrequired- When the resource was revoked, in UTC, or null while it remains active.
- format
date-time
Any ofstringnull - format
revokedByPrincipalIdrequired- The Principal that revoked this resource, or null while it remains active.Any of
stringA Cantora Principal identifier, prefixed with `principal_`.- maximum length
64 - pattern
^principal_[\s\S]+$
null - maximum length
UnauthorizedEncoded
object- unknown properties allowed
false
_tagrequiredstringThe stable machine-readable error type.- allowed values
"Unauthorized"
- allowed values
reasonrequiredstringA safe explanation of why the credential was rejected.
ForbiddenEncoded
object- unknown properties allowed
false
_tagrequiredstringThe stable machine-readable error type.- allowed values
"Forbidden"
- allowed values
permissionrequiredstringThe permission required by the refused operation.
NotFoundEncoded
object- unknown properties allowed
false
_tagrequiredstringThe stable machine-readable error type.- allowed values
"NotFound"
- allowed values
resourcerequiredstringThe resource type relevant to the error.idrequiredstringThe identifier supplied for the resource that was not found.
IdempotencyKey
stringA caller-chosen key of 1–200 visible ASCII characters that makes an identical request safe to retry.- maximum length
200 - minimum length
1 - pattern
^[!-~]+$