Developer Docs Logo
API RequestsAPI SchemaBots

Update an existing API tool

PUT/v1/bots/{bot_id}/api-tools/{tool_id}

Updates an existing API-type chatbot tool configuration. Tools updated here will share the same prefix as the normally created tools, therefore it is recommended to use a unique name for the tool updated here to prevent conflicts. Requires bot:write scope.

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

bot_id*string

The unique identifier (UUID) of the bot.

Formatuuid
tool_id*string

The unique identifier (UUID) of the API tool.

Formatuuid

Request Body

application/json

Payload describing the updated API tool configuration.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/bots/d1c6a7f3-0e2b-494c-87f9-94a7a6f9e9cf/api-tools/a2b3c4d5-6e7f-8a9b-0c1d-2e3f4a5b6c7d" \  -H "Content-Type: application/json" \  -d '{    "name": "Get User Info (Updated)",    "description": "Fetches user information from the API with enhanced features",    "needs_confirmation": true,    "confirmation_expiry_minutes": 120,    "is_hidden": false,    "parameters": {      "properties": {        "api_config": {          "method": "POST",          "url": "https://api.example.com/v2/users",          "headers": {            "Authorization": "Bearer new-token",            "Content-Type": "application/json"          },          "additional_payload": {            "source": "chatbot",            "version": "2"          }        },        "llm_response_prompt": "Parse the user data and provide a detailed summary",        "payload": {          "properties": {            "user_id": {              "type": "string",              "description": "The ID of the user to fetch",              "required": true            },            "include_details": {              "type": "boolean",              "description": "Whether to include detailed information",              "required": true            },            "filters": {              "type": "object",              "description": "Optional filters for the query",              "required": false            }          }        },        "human_assistance_config": {          "is_active": true,          "status_codes": [            "5XX"          ]        }      }    }  }'
Empty