Retrieve a vault
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"org_id": "<string>",
"name": "<string>",
"provider_config": {},
"created_at": "<string>",
"updated_at": "<string>"
}Vaults
Retrieve a vault
Fetch a vault config by id.
GET
/
api
/
v2
/
vaults
/
{vault_id}
Retrieve a vault
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"org_id": "<string>",
"name": "<string>",
"provider_config": {},
"created_at": "<string>",
"updated_at": "<string>"
}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
The vault config’s
id (UUID).The vault object
Unique vault config identifier (UUID).
Organization that owns the config (UUID).
Human-readable label.
Provider settings.
provider(string): Secrets provider. Currently alwaysonepassword.op_vault_id(string): Identifier of the 1Password vault credentials are read from.
ISO 8601 creation timestamp.
ISO 8601 timestamp of the last change.
Examples
curl "https://agp.eu.hcompany.ai/api/v2/vaults/f47ac10b-58cc-4372-a567-0e02b2c3d479" \
-H "Authorization: Bearer $HAI_API_KEY"
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)
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);
Response
{
"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. |
Was this page helpful?
⌘I