GET /api/v1/agents/{publicId}

/ Fetch an agent's name, role, personality, and greeting.

Request

FieldTypeRequiredDescription
publicIdstring (path param)YesThe 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

StatusMeaning
400publicId missing
401Missing or invalid API key
404Agent not found, or not owned by the key's organization