Retrieve an item
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}/items/{item_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}/items/{item_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}/items/{item_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}/items/{item_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}/items/{item_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}/items/{item_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}/items/{item_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>",
"vault_id": "<string>",
"name": "<string>",
"urls": [
"<string>"
],
"fields": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>"
}Vaults
Retrieve an item
Fetch an H-hosted vault item’s name, sites, and which fields are set, without their values.
GET
/
api
/
v2
/
vaults
/
{vault_id}
/
items
/
{item_id}
Retrieve an item
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}/items/{item_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}/items/{item_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}/items/{item_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}/items/{item_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}/items/{item_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}/items/{item_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id}/items/{item_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>",
"vault_id": "<string>",
"name": "<string>",
"urls": [
"<string>"
],
"fields": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>"
}Read the values with Reveal an item.
Returns the item object.
Path parameters
string
required
The H-hosted vault’s
id (UUID).string
required
The item’s
id (UUID).Response
The item object, also returned by create, list, and update.string
Unique item identifier (UUID).
string
The H-hosted vault holding the item (UUID).
string
Label for the item.
string[]
The sites this item signs in to.
string[]
The fields that have a value: any of
username, password, email, totp, api_key.string
ISO 8601 creation timestamp.
string
ISO 8601 timestamp of the last change.
Examples
curl "https://agp.eu.hcompany.ai/api/v2/vaults/3b8d9c2e-6f1a-4e5b-8c7d-0a9b8c7d6e5f/items/7c1e4b2a-9d3f-4a6b-8e5c-2f1a0b9c8d7e" \
-H "Authorization: Bearer $HAI_API_KEY"
from hai_agents import Client
client = Client()
item = client.vaults.get_vault_item(
vault_id="3b8d9c2e-6f1a-4e5b-8c7d-0a9b8c7d6e5f",
item_id="7c1e4b2a-9d3f-4a6b-8e5c-2f1a0b9c8d7e",
)
print(item.name, item.fields)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const item = await client.vaults.getVaultItem({
vaultId: "3b8d9c2e-6f1a-4e5b-8c7d-0a9b8c7d6e5f",
itemId: "7c1e4b2a-9d3f-4a6b-8e5c-2f1a0b9c8d7e",
});
console.log(item.name, item.fields);
Response
{
"id": "7c1e4b2a-9d3f-4a6b-8e5c-2f1a0b9c8d7e",
"vault_id": "3b8d9c2e-6f1a-4e5b-8c7d-0a9b8c7d6e5f",
"name": "Example admin",
"urls": ["https://example.com/login"],
"fields": ["password", "totp", "username"],
"created_at": "2026-05-08T09:15:00Z",
"updated_at": "2026-05-08T09:15:00Z"
}
Errors
| Status | Cause |
|---|---|
400 | The vault is not H-hosted. |
404 | Vault or item not found, or you don’t have access. |
Was this page helpful?