Update an action
PATCH/v2/agents/{agentId}/actions/{actionId}
Rename an action, change its description, switch it on or off, or edit its configuration by sending only the fields that change.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Changes one or more fields of an action. Call it to disable an action while you investigate a problem, to reword the description that tells the agent when to use it, or to point a custom action at a new URL.
Request
PATCH /v2/agents/{agentId}/actions/{actionId}
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
agentId |
string | Yes | The ID of the agent, starting with agt_. |
actionId |
string | Yes | The ID of the action, starting with act_. |
Body fields. Send only the ones you want to change, and at least one:
| Name | Type | Required | Description |
|---|---|---|---|
name |
string | No | New name of the action. |
description |
string | No | Tells the agent when to use the action. |
enabled |
boolean | No | false stops the agent from using the action. true turns it back on. |
config |
object | No | Settings that depend on the action type. The keys you send replace the stored ones, other keys stay. |
The type of an action cannot be changed. To get a different type, create a new action in the dashboard under Actions. See Custom action for what a custom action can hold.
Example request
curl -X PATCH https://api.askocto.co/v2/agents/agt_8f3k2m/actions/act_4d7q1c \
-H "Authorization: Bearer $OCTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Fetch the status of an order by order number. Use it when a customer asks where their order is.",
"config": { "url": "https://shop.example.com/api/v2/orders/{orderNumber}" }
}'
const response = await fetch(
"https://api.askocto.co/v2/agents/agt_8f3k2m/actions/act_4d7q1c",
{
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.OCTO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
description:
"Fetch the status of an order by order number. Use it when a customer asks where their order is.",
config: { url: "https://shop.example.com/api/v2/orders/{orderNumber}" },
}),
},
)
const action = await response.json()
console.log(action.updatedAt)
Example response
A successful call returns 200 OK with the updated action.
{
"id": "act_4d7q1c",
"agentId": "agt_8f3k2m",
"type": "custom_action",
"name": "Look up order",
"description": "Fetch the status of an order by order number. Use it when a customer asks where their order is.",
"enabled": true,
"config": {
"method": "GET",
"url": "https://shop.example.com/api/v2/orders/{orderNumber}"
},
"createdAt": "2026-02-12T09:20:00Z",
"updatedAt": "2026-03-21T10:05:00Z"
}
Response fields
The response is the action as Get an action returns it, with updatedAt set to the time of the change.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request |
The body is empty, a field has the wrong type, type is present, or config does not fit the action type. |
| 401 | unauthorized |
The API key is missing, malformed or deleted. |
| 404 | not_found |
The agent or the action does not exist in your workspace. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |