Tools
Update Built-in Tools
Switch built-in tools on or off and set recall, code verification and the hand-over. search_knowledge is not a switch and web search cannot be switched on; both are refused. Changes apply in order and stop at the first refusal, keeping what came before. Needs a full key. — it can arm tools that call or message customers.
PATCH/agents/{id}/tools
Path parameters
- idstringrequired
- The agent's id (
ag_…).
Headers
- Katexs-Workspacestring
- Developers only: the customer workspace this request acts in — its
org_…id fromPOST /customers. Leave it out to act in your own workspace. Refused with404(Workspace not found.) when the id is unknown, is not one of your customers, or is not anorg_…id;410when that customer was deleted (restore it withPOST /customers/{id}/restoreuntil it is erased);403when the key belongs to one customer workspace (it cannot act as another);400when your workspace is not a developer workspace./customers/*andGET /customers/usageare your own workspace's and refuse the header with400: call them without it.
Request body
- toolsobject
- Tool id to
trueorfalse. Switchable:capture_lead,escalate_to_human,schedule_callback,call_them_now,send_whatsapp,send_sms,reply_by_email. - tools.capture_leadboolean
- tools.escalate_to_humanboolean
- tools.schedule_callbackboolean
- tools.call_them_nowboolean
- tools.send_whatsappboolean
- tools.send_smsboolean
- tools.reply_by_emailboolean
- recallstring
- How much of a recognised customer's history the agent may use:
trusted(all of it),two_tier(the default) orverified(only once they are confirmed). One of:trusted,two_tier,verified. - verifyByCodeboolean
- Confirm a customer with a one-time WhatsApp code instead of their email.
- knowledgeOnCallsboolean
- Let the agent search its knowledge during calls (on by default). Off, a call answers from its instructions alone and skips the search; chat is not affected.
- handOverobject
- Fields you leave out keep their saved value.
- handOver.modestring
chatorcall. A call needs aphone(sent now or already saved). One of:chat,call.- handOver.phonestring | null
- The number to put callers through to, with its country code. Null clears it.
- handOver.linestring | null
- What the agent says before putting a caller through. Null clears it.
- handOver.transferModestring
coldorwarm. Warm: the person who answers first hears a short spoken summary of the call, then the caller is connected. One of:cold,warm.- handOver.acceptKeyboolean
- Warm transfers:
truewaits for the person to press 1 before connecting the caller;falseconnects after the summary. Press 1 works on Plivo numbers only for now: savingwarmwithacceptKey: trueon an agent whose number is on Telnyx is refused with a 400. - handOver.agentsobject[] | null
- Other agents in this workspace a call may be handed to mid-call, on phone and web calls (in the console: the agent's Actions page, Hand calls to another agent). Replaces the saved list;
[]or null clears it. Each must answer calls (voice switched on). The call stays on the same line and conversation and runs as that agent from the caller's next words; the voice stays the call's own. At most 3 hand-offs per call, and never back to an agent already on it.
Example request
bash
curl -X PATCH "https://app.katexs.com/api/v1/agents/{id}/tools" \
-H "Authorization: Bearer $KATEXS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tools": {
"capture_lead": true,
"escalate_to_human": true,
"call_them_now": true,
"send_whatsapp": false
},
"recall": "two_tier",
"handOver": {
"mode": "call",
"phone": "+1 415 555 0134",
"line": "Connecting you to our front desk now.",
"transferMode": "warm",
"acceptKey": true,
"agents": [
{
"agent": "ag_7b1d4e90-2c3a-4f6e-8d15-9a0b3c2e4f71",
"when": "The caller has a problem with an order they already placed.",
"mode": "cold"
}
]
}
}'Responses
| Status | Description |
|---|---|
200 | The tools as saved, with any notes. |
400 | A field is wrong. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
403 | The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden. |
404 | The agent is not in this workspace. |
410 | The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date. |
429 | Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit. |
500 | A change could not be saved (for example the list of agents calls may be handed to). Changes applied before it are kept; send the request again. |
Response fields
- agentstringrequired
- The agent (
ag_…). - toolsobject[]required
- webSearchobjectrequired
- Searching the web. Shown, never switchable here.
- recallstringrequired
- How much of a recognised customer's history from other channels the agent may use. One of:
trusted,two_tier,verified. - verifyByCodebooleanrequired
- Whether a customer is confirmed with a one-time WhatsApp code rather than their email.
- knowledgeOnCallsbooleanrequired
- Whether the agent searches its knowledge during phone and web calls. On unless you switch it off; chat is not affected.
- handOverobjectrequired
- How a hand-over to a person happens.
- messagesstring[]required
- Notes from the changes applied, in order; often empty.
200 response
{
"agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
"tools": [
{
"id": "search_knowledge",
"title": "Search your knowledge base",
"summary": "Looks through your knowledge base before answering, and quotes from it rather than guessing.",
"switchable": false,
"enabled": true,
"reachesOtherChannels": false
},
{
"id": "capture_lead",
"title": "Capture leads",
"summary": "Asks how to reach someone who shows real interest, and records their details with a note on what they wanted.",
"switchable": true,
"enabled": true,
"reachesOtherChannels": false
},
{
"id": "escalate_to_human",
"title": "Hand over to a person",
"summary": "Flags the conversation for your team and tells the customer someone will follow up.",
"switchable": true,
"enabled": true,
"reachesOtherChannels": false
},
{
"id": "schedule_callback",
"title": "Book a call back",
"summary": "When somebody asks to be called later — in half an hour, after five — the agent books it and your number rings them at that time.",
"switchable": true,
"enabled": false,
"reachesOtherChannels": false
},
{
"id": "call_them_now",
"title": "Ring the customer now",
"summary": "While the agent is talking to a customer on your website or WhatsApp, it can have your number ring that customer straight away.",
"switchable": true,
"enabled": true,
"reachesOtherChannels": true,
"ready": true,
"needs": "a number that can dial out, and the customer inside your calling hours"
},
{
"id": "send_whatsapp",
"title": "Send the customer a WhatsApp",
"summary": "While the agent is on a call with a customer, or chatting on your website, it can send that customer one of your approved templates on WhatsApp.",
"switchable": true,
"enabled": true,
"reachesOtherChannels": true,
"ready": false,
"needs": "an approved utility template marked \"agents may send this\" — the agent cannot write its own words on WhatsApp"
},
{
"id": "reply_by_email",
"title": "Reply to the customer by email",
"summary": "The agent can answer on that customer's existing email thread in your helpdesk, as you.",
"switchable": true,
"enabled": false,
"reachesOtherChannels": true,
"ready": false,
"needs": "a connected helpdesk that can send — Zendesk today, not Salesforce"
}
],
"webSearch": {
"enabled": false,
"switchable": false
},
"recall": "two_tier",
"verifyByCode": false,
"knowledgeOnCalls": true,
"handOver": {
"mode": "call",
"phone": "+14155550134",
"line": "Connecting you to our front desk now.",
"transferMode": "warm",
"acceptKey": true,
"agents": [
{
"agent": "ag_7b1d4e90-2c3a-4f6e-8d15-9a0b3c2e4f71",
"name": "Support",
"when": "The caller has a problem with an order they already placed.",
"mode": "warm"
}
]
},
"messages": []
}Last updated November 2026 · Found a problem? Email support@katexs.com
