Update an agent
Partial update of an existing agent. Send only the fields you want to change.
Partial update. Send only the fields you want to change, omitted fields stay unchanged. Honors Idempotency-Key.
Scope: agents:write
Path parameters
| Param | Type | Notes |
|---|---|---|
:id | string | Agent ID (prefixed or bare). |
Request body
Any subset of the create body fields, plus:
| Field | Type | Notes |
|---|---|---|
is_active | boolean | Activation guard: rejected with 422 if any assigned connector is in auth_failed state. Reconnect the connector first. |
deactivated_reason | string | null | Set/cleared by the system on cascade events; settable manually for diagnostics. |
deactivated_at | ISO 8601 | null | See above. |
Side effects of is_active toggle
Flipping is_active isn't just a flag, it cascades:
- Triggers: deactivating the agent deactivates all of its triggers. Activating reactivates them. Zendesk webhooks are soft-toggled in place (status flipped on Zendesk's side) rather than torn down and recreated, so the webhook ID that the customer's own Zendesk Triggers reference is preserved.
- Chatbots: any chatbot bound to this agent is paused/resumed.
Example: deactivate an agent
curl -X PATCH https://dashboard.getmacha.com/api/v1/agents/agent_64f1c0... \
-H "Authorization: Bearer $MACHA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "is_active": false }'
Example: move an agent to a different model
curl -X PATCH https://dashboard.getmacha.com/api/v1/agents/agent_64f1c0... \
-H "Authorization: Bearer $MACHA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "model": "gpt-5.4" }'
Example: replace the tool list entirely
curl -X PATCH https://dashboard.getmacha.com/api/v1/agents/agent_64f1c0... \
-H "Authorization: Bearer $MACHA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tools": [
{ "name": "zendesk_get_ticket", "connector_id": "connector_..." },
{ "name": "zendesk_update_priority", "connector_id": "connector_..." }
]
}'
Passing tools replaces the whole array, there's no PATCH-style "add this tool" or "remove this tool" today. Read the agent first, then send the desired final array.
Errors
| Status | Code | When |
|---|---|---|
404 | agent_not_found | Unknown ID or soft-deleted past trash window. |
409 | agent_handle_taken | Renaming to a handle that already exists. |
422 | validation_failed | Bad handle format, unhealthy-connector activation block, plan limit on custom tools, self-referencing sub-agent, etc. |
Sending "tools": [X] drops every other tool the agent had. To add a tool while keeping the existing ones, read the agent's current tool list, append X, then PATCH the full array back.
© 2026 AGZ Technologies Private Limited