Skip to content
Dashboard
Theme
Theme

Deprecate a non-active version

POST /v1/encryption_keys/{key}/deprecate: Deprecate a non-active version.

View Markdown

POST /v1/encryption_keys/{key}/deprecate

A deprecated version still decrypts what it wrapped until the re-seal moves that data; it can never become active again. The active version cannot be deprecated (409).

Scope
encryption_keys:write
Auth
Secret key (sk_…)
Since
1.0
  • key string Required

  • 200 Deprecated EncryptionKey
  • default Any other error, including internal_error. Every code is in the error catalogue. Error

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/encryption_keys/ekey_01J9ZQ4M7K2X8V3N5B6C1D0E9F/deprecate" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY"
Response 200
{
"id": "ekey_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"object": "encryption_key",
"scope": "environment",
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"version": 1,
"provider": "aws_kms",
"key_arn": "arn:aws:kms:ap-south-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
"state": "active",
"last_error": "saml_signature_invalid",
"created_at": "2026-01-15T09:30:00Z",
"validated_at": "2026-01-15T09:30:00Z",
"deprecated_at": "2026-01-15T09:30:00Z",
"revoked_at": "2026-01-15T09:30:00Z"
}