Skip to content
Dashboard
Theme
Theme

Create a named Vault key for an organization

POST /v1/vault/keys: Create a named Vault key for an organization.

View Markdown

POST /v1/vault/keys

At most 100 keys per organization (plan_limit_reached). The key material is generated and kept by us, sealed by our KMS and, when present, the organization’s or environment’s customer-managed key.

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

  • name string Required

  • 201 Created VaultKey
  • 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/keys" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"name": "Acme Corp"
}'
Response 201
{
"id": "vkey_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"object": "vault_key",
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"name": "Acme Corp",
"current_version": 1,
"created_at": "2026-01-15T09:30:00Z",
"rotated_at": "2026-01-15T09:30:00Z",
"usage": {
"encrypts": 1,
"decrypts": 1,
"last_used_at": "2026-01-15T09:30:00Z"
}
}