Developers / Agents

Detach tools from an agent

POST https://api.echonova.ai/v1/agents/{agentId}/tools/detach

Detaches workspace tools from the agent. Ids that are not attached are ignored. The tools stay in the workspace. Free. Needs the agents:write scope on the key, and the key creator also needs Manage tools.

Headers

Authorization string Required

Bearer, a space, then your API key, which starts with ek_. Create keys in the portal under Developers, API Keys.

Path parameters

agentId string Required

The agent id, as GET /v1/agents returned it.

Request body

application/json

toolIds array of string Required

Workspace tool ids, 1 to 20, as GET /v1/agents/{agentId}/tools shows them.

Response

200 application/json Every response uses this envelope.

data object

The result.

success boolean

true for a successful call.

statusCode integer

Repeats the HTTP status.

errorMessage string or null

null on success.

Errors

Same envelope, with success false and data null. All errors

POST /v1/agents/{agentId}/tools/detach

curl -X POST "https://api.echonova.ai/v1/agents/{agentId}/tools/detach" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"toolIds":["6654a1b2c3d4e5f6a7b8c9d0"]}'

{
  "data": {
    "system": [
      {
        "key": "web_search",
        "name": "Web search",
        "enabled": true
      }
    ],
    "attached": [
      {
        "id": "6654a1b2c3d4e5f6a7b8c9d0",
        "name": "CRM lookup",
        "type": "webhook",
        "description": "Looks up a customer by phone number."
      }
    ]
  },
  "success": true,
  "statusCode": 200,
  "errorMessage": null
}