Vaults
Retrieve a vault
Retrieve a vault config by ID, without its write-only token.
GET
/
api
/
v2
/
vaults
/
{vault_id}
from hai_agents import Client
client = Client()
vault = client.vaults.get_vault(vault_id=vault_id)
print(vault.name, vault.provider_config.provider)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const vault = await client.vaults.getVault({ vaultId });
console.log(vault.name, vault.providerConfig.provider);
curl "https://agp.eu.hcompany.ai/api/v2/vaults/$VAULT_ID" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"org_id": "1c9a2f6e-4b3d-4a8c-9e5f-7d6b8a0c1e2f",
"created_by": "8d3e5a71-2c4b-4f6e-9a0d-1b2c3d4e5f60",
"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"
}
Path parameters
string
required
The vault config’s
id (UUID).Response
200 with the vault object, also returned by create, list, and update.
string
Unique vault config identifier (UUID).
string
Organization that owns the config (UUID).
string | null
User who created the config (UUID).
null for vaults created before this field existed.string
Human-readable label.
object
string
ISO 8601 creation timestamp.
string
ISO 8601 timestamp of the last change.
from hai_agents import Client
client = Client()
vault = client.vaults.get_vault(vault_id=vault_id)
print(vault.name, vault.provider_config.provider)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const vault = await client.vaults.getVault({ vaultId });
console.log(vault.name, vault.providerConfig.provider);
curl "https://agp.eu.hcompany.ai/api/v2/vaults/$VAULT_ID" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"org_id": "1c9a2f6e-4b3d-4a8c-9e5f-7d6b8a0c1e2f",
"created_by": "8d3e5a71-2c4b-4f6e-9a0d-1b2c3d4e5f60",
"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 | Not found, or not in your organization. |
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
vault = client.vaults.get_vault(vault_id=vault_id)
print(vault.name, vault.provider_config.provider)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const vault = await client.vaults.getVault({ vaultId });
console.log(vault.name, vault.providerConfig.provider);
curl "https://agp.eu.hcompany.ai/api/v2/vaults/$VAULT_ID" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"org_id": "1c9a2f6e-4b3d-4a8c-9e5f-7d6b8a0c1e2f",
"created_by": "8d3e5a71-2c4b-4f6e-9a0d-1b2c3d4e5f60",
"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"
}