Removes the agent from an ongoing call and returns a token that lets a person speak to the caller. The call's disconnection_reason is set to call_take_over (kept when the call later ends), metadata gets taken_over_by and taken_over_at, and a transfer item with event: "transfer_bridged" and reason: "take_over" is added to transcript_with_tool_calls. The action is audited.
Requires the admin or developer role.
Request#
Path parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
call_id |
string | Yes | An ongoing call. |
Example request#
curl -X POST "https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/take-over" \
-H "Authorization: Bearer $TRIED_API_KEY"const res = await fetch("https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/take-over", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.tried.com.au/v2/calls/call_8d1e0f2a3b4c5d6e7f8a9b0c/take-over",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
data = res.json()Response#
200 OK
{
"mode": "audio",
"livekit_url": "wss://livekit.tried.com.au",
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"call": { "call_id": "call_8d1e0f2a3b4c5d6e7f8a9b0c", "call_status": "ongoing", "disconnection_reason": "call_take_over" }
}| Field | Type | Description |
|---|---|---|
mode |
string | audio: join with the token and publish your microphone. text: LiveKit is in mock mode or the call has no room; speak by typing with Supervisor say. |
livekit_url |
string or null | LiveKit URL in audio mode. |
access_token |
string or null | Token that may publish a microphone track, valid 1 hour. |
call |
object | The updated call object (shortened above). |
Audio take-over needs LiveKit credentials on the server. Needs keys
Errors#
| Status | When |
|---|---|
400 |
The call is not ongoing. |
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request. This route needs the calls scope. The member role cannot take over calls. |
404 |
No call with this ID in the workspace. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.