Create one
201 with the agent in data. Keep data.id, the agent id.
Find device ids with
GET /v1/devices. See Phones.
Give it a phone, or move it
An agent uses at most one phone. To attach one, or to move the agent to another phone, send the new phone:"devices": [] to detach the phone.
The same call changes name, description, model, color or avatar. Send only the fields you want to change.
Manage agents
GET /v1/agents returns every active agent. Add limit (1 to 100) or cursor to read one page at a time, most recently active first. The response then carries nextCursor and hasMore.
GET /v1/agents/{id} returns the agent’s newest 20 turns in turns, oldest first. Pass turnsCursor as cursor to GET /v1/agents/{id}/turns to walk back through older history.
Archive and restore
Archiving hides the agent. Its sessions and recordings stay. You can restore it for 30 days:purgeAfter says until when. After that, restore returns 410.
