GET /api/v1/agents/{publicId}
/ Fetch an agent's name, role, personality, and greeting.
Request
| Field | Type | Required | Description |
|---|---|---|---|
| publicId | string (path param) | Yes | The agent's public ID |
const res = await fetch("https://app.humaner.io/api/v1/agents/AGENT_ID", {
headers: { Authorization: "Bearer hm_live_xxxxxxxx" }
});
const agent = await res.json();Response
200 OK
{
"id": "ag_demo123",
"name": "Atlas",
"role": "Support agent",
"character": "CASUAL",
"greeting": "Hey! I'm Atlas. What can I help you with today?"
}Errors
| Status | Meaning |
|---|---|
| 400 | publicId missing |
| 401 | Missing or invalid API key |
| 404 | Agent not found, or not owned by the key's organization |