Appearance
Agents
| Method | Path | Body | Response |
|---|---|---|---|
PUT | /v1/tenants/{t}/agents/{agentRef} | { name, role?: AGENT|SUPERVISOR } | { agent } |
GET | /v1/tenants/{t}/agents | — | { agents } |
DELETE | /v1/tenants/{t}/agents/{agentRef} | — | 204 |
PUT | /v1/tenants/{t}/agents/{agentRef}/availability | { availability: AVAILABLE|OFFLINE } | { agent } |
PUT | /v1/tenants/{t}/agents/{agentRef}/do-not-disturb | { enabled: true|false } | { agent } |
PUT | /v1/tenants/{t}/agents/{agentRef}/push-tokens/{deviceId} | { platform: ANDROID|IOS|WEB, provider: FCM|APNS_VOIP|ONESIGNAL, token } | { registered: true } |
DELETE | /v1/tenants/{t}/agents/{agentRef}/push-tokens/{deviceId} | — | 204 |
agent:{ id, ref, name, role, availability, doNotDisturb }.roleis kept when omitted on an existing agent and defaults toAGENTon a new one.DELETEis a soft delete: the agent goesOFFLINEand disappears from lists, and every socket of theirs is disconnected at once (a call they are on loses its agent). Their agent tokens no longer connect, even unexpired ones (Agent was deleted). Only a laterPUTrestores them (with their queue memberships).do-not-disturb(personal lines): whileenabled, a call to a line the agent owns rings none of their devices and ends at once asNO_ANSWER— a missed call, reported incall.endedlike any other. Queue calls are not affected (queues useavailability), nor are the agent's outbound calls. It stays set until changed; thePUTof the agent leaves it alone.availability: what an agent reports:ON_CALLwhile a call holds them, else their shift,AVAILABLE(queues offer them calls) orOFFLINE. ThePUTsets the shift; on a live call the response still saysON_CALLand the shift applies once the call ends.AVAILABLEalso releases any stale call blocking the agent.ON_CALLis set by Calloop only.- Push tokens:
tokenup to 512 characters; one token per device and provider (a new one replaces it). A token registered to another agent moves to this one.DELETEremoves all of that device's tokens.
Agents are also created on their first socket connection (see agent-protocol.md), except a deleted one; PUT is how you set roles and names ahead of time.