Appearance
Deleting
Queues, channels, IVR flows and audio assets are deleted for good. Call history stays: a call keeps its own channel address, customer and times, and its link to the deleted entity becomes null.
A delete is refused with 409 in_use while something depends on it. error.details says what, so you can re-point it and try again:
| Entity | Refused while | details |
|---|---|---|
| Queue | a live call is in it; a channel routes into it; a queue overflows into it; an IVR flow transfers to it | liveCalls, channels, overflowQueues, ivrFlows |
| Channel | a live call is on it | liveCalls |
| IVR flow | a live call is in it or came through it | liveCalls |
| Audio asset | a queue holds with it; an IVR flow plays it | queues, ivrFlows |
liveCalls is true; the others are lists of your refs. A channel's IVR flows are deleted with it. An audio file Calloop stored itself (an upload) is removed from storage; an object you registered by storage_key is left alone.
A tenant is different: deleting it deletes everything it has — agents (their apps are disconnected), queues, lines, IVR flows, audio assets, and every call with its recording and its undelivered events. Nothing is kept. It is refused with 409 tenant_active until the tenant is SUSPENDED (PUT with "status": "SUSPENDED" first), with 409 in_use (details.liveCalls) while it has a call in progress, and with 503 storage_unavailable when a recording file can't be removed yet; retry later. A refused delete can have deleted some ended calls already; a retry finishes it. The ref can be used again afterwards for a new, empty tenant.