The Allternit Vault provides encrypted, organization-scoped storage for credentials. It supports both a legacy agent/session credential store and a first-class vault resource model for managing collections of secrets.

Authentication and authorization

All vault endpoints require a Clerk JWT or a scoped API credential. The caller must belong to an active organization. Write operations additionally require organization owner or admin role, or a credential context that grants the relevant vault scope.

Encryption

Values are sealed at rest using the same token_crypto::seal primitive used for connector tokens. The encryption key is configurable in self-hosted deployments; in headless mode a runtime key is generated on first use. Decrypted values are never returned by the read/list endpoints.

Legacy credentials

These endpoints store OAuth-style credentials keyed by provider, optional agent_id, and optional session_id. They are retained for existing callers and are not associated with a named vault.

Endpoints

Store a legacy credential

Either agent_id or session_id is required for legacy credentials.
Response 201 Created

Revoke a legacy credential

Response 204 No Content

Vault resources (beta)

Vault resources let you group related credentials under a named container. Credentials inside a vault are stored independently from legacy credentials and are revoked when the vault is deleted.

Endpoints

Create a vault

Response 201 Created

List vaults

Response 200 OK

Retrieve a vault

Delete a vault

Response 204 No Content

Add a credential to a vault

Response 201 Created

List vault credentials

Response 200 OK

Revoke a vault credential

Response 204 No Content

Request/response fields

Vault object

Credential object

The oauth_value is write-only and never returned.

Error codes