> ## Documentation Index
> Fetch the complete documentation index at: https://vetta.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# vaults

> Write-only credentials — client.vaults and client.vaults.credentials.

A vault holds credentials that are injected at the network boundary and **never revealed**. Seven methods, and no read of a secret anywhere. API detail: [Vaults](/docs/api/vaults).

<Warning>
  **There is no reveal method, and that is the contract, not an omission.** The control plane serves no reveal route and the credential schema has no `value` field, so `credentials.list` could not return one even if a handler tried.
</Warning>

## create

```ts theme={"system"}
client.vaults.create(body: VaultCreate): Promise<Vault>
```

`POST /v1/vaults`. `VaultCreate` is `{ display_name, identity_id? }` — bind the vault to one persona or leave it org-wide.

## list

```ts theme={"system"}
client.vaults.list(query?: ListQuery): Promise<Page<Vault>>
```

`GET /v1/vaults`, cursor-paginated.

## get

```ts theme={"system"}
client.vaults.get(id: string): Promise<Vault>
```

`GET /v1/vaults/{id}`.

## delete

```ts theme={"system"}
client.vaults.delete(id: string): Promise<Deleted>
```

`DELETE /v1/vaults/{id}`. Soft-deletes the vault; its credentials go for real. **Irreversible for the secrets.**

## credentials.create

```ts theme={"system"}
client.vaults.credentials.create(vaultId: string, body: CredentialCreate): Promise<VaultCredential>
```

`POST /v1/vaults/{id}/credentials` — the only call in the system that carries a secret. `value` travels once, on this call, and is sealed server-side; the response is metadata only.

<ResponseField name="kind" type="VaultCredentialKind" required>What kind of secret this is (e.g. `env_var`, the MCP kinds).</ResponseField>
<ResponseField name="key" type="string" required>The name the secret is injected under.</ResponseField>
<ResponseField name="value" type="string" required>The secret. Write-only.</ResponseField>
<ResponseField name="host" type="string">Only meaningful for `env_var` — the egress host it substitutes at.</ResponseField>
<ResponseField name="mcp_server_url" type="string">Required for the two MCP kinds.</ResponseField>
<ResponseField name="expires_at" type="string">Optional expiry.</ResponseField>

## credentials.list

```ts theme={"system"}
client.vaults.credentials.list(vaultId: string, query?: ListQuery): Promise<Page<VaultCredential>>
```

`GET /v1/vaults/{id}/credentials`. Metadata only — `key`, `kind`, `last_injected_at`; never a value.

## credentials.delete

```ts theme={"system"}
client.vaults.credentials.delete(vaultId: string, credentialId: string): Promise<Deleted>
```

`DELETE /v1/vaults/{id}/credentials/{credential_id}`.

**Rotation is create-new + delete-old.** There is no `update`, so `last_injected_at` stays attributable to exactly one secret.
