Esta página ainda não foi traduzida. Você está lendo a versão em inglês.
Get an agent TypeScript REST API
SDK platic.agents.get ()
Check an agent’s details and read hasUnpublishedChanges to see whether changes are waiting to be published. The response includes its name, photo, status, owners, draft version and published version.
Example TypeScript REST API
curl https://api.platic.ai/v1/agents/ $AGENT_ID \
-H " Authorization : Bearer $PLATIC_API_KEY "
await platic.agents. get ( "agent_123" );
Path parameters Parameter Type Description Required agentIdstring Agent id ✓
Response {
"status" : "success" ,
"data" : {
"id" : "Xq8mTe2LwP4kZ1aB9cDf" ,
"name" : "Sales" ,
"imageUrl" : "/images/agents/avatars/p12.jpg" ,
"status" : "active" ,
"owners" : [ "ana@acme.com" ],
"draft" : { "versionId" : "v4" , "number" : 4 },
"publication" : { "versionId" : "v3" , "number" : 3 },
"hasUnpublishedChanges" : true ,
"createdAt" : "2026-10-28T12:00:00.000Z"
}
}
Response fields Field Description idAgent id nameAgent name. It isn't part of the versions: it is the same in all of them imageUrlURL or path of the agent’s photo. Platica assigns one when the agent is created if no photo is provided statusactive or inactiveownersOwners' emails draft.versionIdVersion the draft is on, for example v4 draft.numberNumber of that version publication.versionIdPublished version, the one that answers your contacts publication.numberNumber of that version hasUnpublishedChangestrue when the draft has changes that aren't publishedcreatedAtCreation date in ISO 8601 format
Errors Status details.codeWhen 404AGENT_NOT_FOUNDThe agent doesn't exist in the workspace or was deleted
{
"code" : 404 ,
"error" : "Not Found - The resource doesn't exist" ,
"details" : {
"code" : "AGENT_NOT_FOUND" ,
"message" : "Agent Xq8mTe2LwP4kZ1aB9cDf not found"
}
}
Notes