Create a named Vault key for an organization
POST /v1/vault/keys: Create a named Vault key for an organization.
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
Request body
Section titled “Request body”organizationstring Requirednamestring Required
Responses
Section titled “Responses”- 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"}'const response = await fetch("https://api.ohauthcat.com/v1/vault/keys", { method: "POST", headers: { Authorization: `Bearer ${process.env.OHAUTHCAT_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "name": "Acme Corp" }),});const data = await response.json();import osimport requests
response = requests.post( "https://api.ohauthcat.com/v1/vault/keys", headers={"Authorization": f"Bearer {os.environ['OHAUTHCAT_API_KEY']}"}, json={ "organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "name": "Acme Corp", },)data = response.json(){ "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" }}