Skip to content

Agents ​

MethodPathBodyResponse
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 }. role is kept when omitted on an existing agent and defaults to AGENT on a new one.
  • DELETE is a soft delete: the agent goes OFFLINE and 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 later PUT restores them (with their queue memberships).
  • do-not-disturb (personal lines): while enabled, a call to a line the agent owns rings none of their devices and ends at once as NO_ANSWER — a missed call, reported in call.ended like any other. Queue calls are not affected (queues use availability), nor are the agent's outbound calls. It stays set until changed; the PUT of the agent leaves it alone.
  • availability: what an agent reports: ON_CALL while a call holds them, else their shift, AVAILABLE (queues offer them calls) or OFFLINE. The PUT sets the shift; on a live call the response still says ON_CALL and the shift applies once the call ends. AVAILABLE also releases any stale call blocking the agent. ON_CALL is set by Calloop only.
  • Push tokens: token up to 512 characters; one token per device and provider (a new one replaces it). A token registered to another agent moves to this one. DELETE removes 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.

Calloop — the call engine behind your product.