Skip to content
Dashboard
Theme
Theme

Decrypt a Vault ciphertext of an organization

POST /v1/vault/decrypt: Decrypt a Vault ciphertext of an organization.

View Markdown

POST /v1/vault/decrypt

Any ciphertext that does not open (another organization, another context, tampered, unknown key) answers vault_decrypt_failed without a reason.

Scope
vault:use
Auth
Secret key (sk_…)
Since
1.0
  • organization string Required

  • ciphertext string Required

    max length 98304

  • context VaultContext

    Additional authenticated data bound to the ciphertext; the same pairs are needed to decrypt.

  • 200 Plaintext VaultDecryptResult
  • 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/vault/decrypt" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"ciphertext": "example_ciphertext"
}'
Response 200
{
"object": "vault_plaintext",
"plaintext": "ZXhhbXBsZQ=="
}