Update Action

Actions

Update Action

Change any field, or switch it on or off with enabled. The action is validated as it will be saved, so a new url is checked against the parameters already there. Leaving headers out keeps the saved credential; sending any replaces the whole set. enabled: true makes it callable from every conversation at once. A build key may do this.

PATCH/agents/{id}/actions/{actionId}

Path parameters

idstringrequired
The agent's id (ag_…).
actionIdstringrequired
The action's id (act_…).

Headers

Katexs-Workspacestring
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.

Request body

namestring
The tool name the agent sees; same rules as on create.
descriptionstring
When the agent should call it (at least 10 characters).
urlstring (uri)
An https:// address with {{placeholders}}.
methodstring
The HTTP method. One of: GET, POST, PUT, PATCH, DELETE.
parametersobject[]
Replaces the whole list.
parameters[].namestringrequired
The placeholder's name, used as {{name}} in url and bodyTemplate: lower case letters, numbers and underscores, starting with a letter (3 to 40 characters).
parameters[].descriptionstringrequired
What the value is. The model fills it from the conversation using this alone — never leave it vague.
parameters[].requiredboolean
Whether the agent must have this value before it may call. Default: false.
bodyTemplatestring | null
The JSON body; null removes it.
headersobject
Leave it out (or send {}) to keep the saved headers. Sending any replaces the whole set, so include every header the call needs. There is no way to remove all headers short of deleting the action.
speakBeforestring | null
What the agent says while your API is called; null clears it.
speakAfterstring | null
What the agent says afterwards; null clears it.
enabledboolean
true puts the action within reach of every conversation the agent has; false takes it away.

Example request

bash
curl -X PATCH "https://app.katexs.com/api/v1/agents/{id}/actions/{actionId}" \
  -H "Authorization: Bearer $KATEXS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true
}'

Responses

StatusDescription
200The action as saved.
400A rule is broken, or nothing was sent.
401The key is missing, wrong or revoked. The answer is always the same, whichever it is.
403The 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.
404No such action on this agent.
409Another action on this agent has that name.
410The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date.
429Over 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.
503Headers were sent and this deployment cannot store credentials.

Response fields

idstringrequired
The action's id (act_…).
agentstringrequired
The agent it belongs to (ag_…).
namestringrequired
The tool name the agent sees.
descriptionstringrequired
When the agent should call it.
methodstringrequired
The HTTP method used. One of: GET, POST, PUT, PATCH, DELETE.
urlstringrequired
The https:// address, with {{placeholders}} — declared parameters, or the platform's dotted ones such as {{call.id}}. The host must be written out: no placeholder before the path.
parametersobject[]required
What the agent fills in.
bodyTemplatestring | nullrequired
The JSON body sent, with quoted placeholders; null for none.
headerNamesstring[]required
The names of the headers sent. Their values are write-only and never returned.
speakBeforestring | nullrequired
On calls, what the agent says while your API is being called.
speakAfterstring | nullrequired
On calls, what the agent says while it turns your answer into a reply.
enabledbooleanrequired
Whether the agent may call it. A new action is always false.
createdAtstring (date-time)required
When it was made.
updatedAtstring (date-time)required
When it last changed.
200 response
{
  "id": "act_9b2f4e17-6c3a-4d81-b5e2-7a0c9d3f1e46",
  "agent": "ag_3f6a9c21-7d4e-4b58-9a1f-0c2e8b7d5a34",
  "name": "get_appointment",
  "description": "Look up a patient's next appointment by their phone number before answering anything about timings.",
  "method": "GET",
  "url": "https://api.sunrisedental.in/appointments?phone={{phone}}",
  "parameters": [
    {
      "name": "phone",
      "description": "The patient's mobile number with country code, e.g. +14155550134",
      "required": true
    }
  ],
  "bodyTemplate": null,
  "headerNames": [
    "Authorization"
  ],
  "speakBefore": "One moment, let me check the diary.",
  "speakAfter": null,
  "enabled": true,
  "createdAt": "2026-10-05T09:41:00.210Z",
  "updatedAt": "2026-10-05T10:02:44.517Z"
}

Last updated November 2026 · Found a problem? Email support@katexs.com