Creates a new API tool configuration for the application. Use this endpoint to define a custom API endpoint that agents can call during conversations.
Uniqueness: The slug must be unique per application.
Auto-generation: A tool object is automatically generated from the provided parameters, description, and slug.
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
Slug for the API tool (unique)
"create_lead"
Description of the API tool
"When to use, preconditions, what it returns"
API endpoint URL
"https://api.example.com/leads"
HTTP method
GET, POST, PUT, PATCH, DELETE "POST"
Whether to enable basic authentication
true
Name of the API tool
"Create Lead"
Basic auth username (required if enableBasicAuth is true)
"username"
Basic auth password (required if enableBasicAuth is true)
"password"
HTTP headers as a JSON string (e.g., '{"Content-Type": "application/json", "Authorization": "Bearer token"}')
"{\"Content-Type\": \"application/json\", \"Authorization\": \"Bearer token\"}"
Body template for the API request
"{\"name\": \"{{name}}\", \"email\": \"{{email}}\"}"
Whether to allow additional properties
false
Array of parameters for the API tool
Icon for the API Tool
"http://localhost:3001"
API tool created successfully
"myapp_my-api-tool"
"my-app-id"
"my-api-tool"
"My API Tool"
"Calls an external API"
"https://example.com/icon.png"
"https://api.example.com/search"
"GET"
false
"{\"Content-Type\":\"application/json\"}"
"{\"query\":\"{{query}}\"}"
false
1700000000000
1700000000000