Skip to content
TriedDocs
Calls

Update live call

Change variables or metadata of an ongoing call, or steer the agent mid-call.

PATCHhttps://api.tried.com.au/update-live-call/{call_id}

Changes a call while it is running. New dynamic variables reach the agent on its next turn. call_control adds context to the conversation and can make the agent reply at once, for example when your system learns something the caller should hear.

Request#

Path parameters#

Parameter Type Required Description
call_id string Yes An ongoing or registered call.

Body#

Field Type Required Description
override_dynamic_variables object No Merged over the call's dynamic variables. Non-string values are stored as JSON strings. These values rank above variables collected during the call.
metadata object No Merged over the call's metadata.
data_storage_setting string No everything, everything_except_pii or basic_attributes_only. Applied when the call ends.
call_control object No Steer the conversation. See below.

call_control#

Field Type Description
additional_context string Up to 5000 characters added to the agent's context. It is also recorded in transcript_with_tool_calls as an injected item.
trigger_response boolean When true, the agent responds right away instead of waiting for the caller.

Example request#

curl -X PATCH "https://api.tried.com.au/update-live-call/call_8d1e0f2a3b4c5d6e7f8a9b0c" \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "override_dynamic_variables": {
    "order_status": "shipped"
  },
  "call_control": {
    "additional_context": "The order shipped today. Tracking number TRK123.",
    "trigger_response": true
  }
}'
const res = await fetch("https://api.tried.com.au/update-live-call/call_8d1e0f2a3b4c5d6e7f8a9b0c", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "override_dynamic_variables": {
      "order_status": "shipped"
    },
    "call_control": {
      "additional_context": "The order shipped today. Tracking number TRK123.",
      "trigger_response": true
    }
  }),
});
const data = await res.json();
import os, requests

res = requests.patch(
    "https://api.tried.com.au/update-live-call/call_8d1e0f2a3b4c5d6e7f8a9b0c",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "override_dynamic_variables": {
            "order_status": "shipped",
        },
        "call_control": {
            "additional_context": "The order shipped today. Tracking number TRK123.",
            "trigger_response": True,
        },
    },
)
data = res.json()

Response#

200 OK with the updated call object.

The change is sent to the running agent as a data message on the call's room. If that message fails, the stored call is still updated.

Errors#

Status When
400 Validation failed, or the call has already ended (ended, error or not_connected).
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the admin scope.
404 No call with this ID in the workspace.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.

Compatibility notes#

The route has no /v2 prefix.