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

# Retrieve a vault

> Fetch a vault config by id.

Fetches a single vault config. The stored service account token is write-only and is never included in the response.

Returns the vault object.

***

## Path parameters

<ParamField path="vault_id" type="string" required>
  The vault config's `id` (UUID).
</ParamField>

***

## The vault object

<ResponseField name="id" type="string">
  Unique vault config identifier (UUID).
</ResponseField>

<ResponseField name="org_id" type="string">
  Organization that owns the config (UUID).
</ResponseField>

<ResponseField name="name" type="string">
  Human-readable label.
</ResponseField>

<ResponseField name="provider_config" type="object">
  Provider settings.

  * `provider` (string): Secrets provider. Currently always `onepassword`.
  * `op_vault_id` (string): Identifier of the 1Password vault credentials are read from.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 creation timestamp.
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 timestamp of the last change.
</ResponseField>

***

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://agp.eu.hcompany.ai/api/v2/vaults/f47ac10b-58cc-4372-a567-0e02b2c3d479" \
    -H "Authorization: Bearer $HAI_API_KEY"
  ```

  ```python Python theme={null}
  from hai_agents import Client

  client = Client()

  vault = client.vaults.get_vault(vault_id="f47ac10b-58cc-4372-a567-0e02b2c3d479")
  print(vault.name, vault.provider_config.op_vault_id)
  ```

  ```typescript TypeScript theme={null}
  import { HaiAgentsClient } from "hai-agents";

  const client = new HaiAgentsClient();

  const vault = await client.vaults.getVault({ vaultId: "f47ac10b-58cc-4372-a567-0e02b2c3d479" });
  console.log(vault.name, vault.providerConfig.opVaultId);
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "org_id": "1c9a2f6e-4b3d-4a8c-9e5f-7d6b8a0c1e2f",
  "name": "prod-1password",
  "provider_config": {"provider": "onepassword", "op_vault_id": "abcd1234efgh5678"},
  "created_at": "2026-05-07T14:30:00Z",
  "updated_at": "2026-05-07T14:30:00Z"
}
```

***

## Errors

| Status | Cause                                     |
| ------ | ----------------------------------------- |
| `404`  | Vault not found or you don't have access. |
