Tools
Create API Integration Tool
Create a new API integration tool for your voice agents
POST
/
tools
Create API Tool
curl --request POST \
--url https://api.kallabot.com/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tools": [
{
"type": "function",
"function": {
"name": "check_availability",
"description": "Check appointment availability",
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date"
},
"time": {
"type": "string"
}
},
"required": [
"date"
]
}
}
}
],
"tools_params": {
"check_availability": {
"method": "GET",
"url": "https://api.example.com/availability",
"api_token": "your_token"
}
},
"category": "communication",
"tags": [
"availability",
"booking"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tools: [
{
type: 'function',
function: {
name: 'check_availability',
description: 'Check appointment availability',
parameters: {
type: 'object',
properties: {date: {type: 'string', format: 'date'}, time: {type: 'string'}},
required: ['date']
}
}
}
],
tools_params: {
check_availability: {
method: 'GET',
url: 'https://api.example.com/availability',
api_token: 'your_token'
}
},
category: 'communication',
tags: ['availability', 'booking']
})
};
fetch('https://api.kallabot.com/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kallabot.com/tools"
payload = {
"tools": [
{
"type": "function",
"function": {
"name": "check_availability",
"description": "Check appointment availability",
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date"
},
"time": { "type": "string" }
},
"required": ["date"]
}
}
}
],
"tools_params": { "check_availability": {
"method": "GET",
"url": "https://api.example.com/availability",
"api_token": "your_token"
} },
"category": "communication",
"tags": ["availability", "booking"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"tool_schema": {
"tools": [
{
"type": "function",
"function": {
"name": "get_customer_orders",
"description": "Fetch recent orders for a customer by ID.",
"parameters": {},
"strict": true
}
}
],
"tools_params": {},
"mcp_servers": [
{
"url": "<string>"
}
],
"api_tool_ids": [
"<string>"
],
"call_transfer_config": {},
"call_transfer_description": "<string>"
},
"tags": [
"<string>"
],
"isActive": true,
"lastTested": "2023-11-07T05:31:56Z",
"testStatus": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
⌘I
Create API Tool
curl --request POST \
--url https://api.kallabot.com/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tools": [
{
"type": "function",
"function": {
"name": "check_availability",
"description": "Check appointment availability",
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date"
},
"time": {
"type": "string"
}
},
"required": [
"date"
]
}
}
}
],
"tools_params": {
"check_availability": {
"method": "GET",
"url": "https://api.example.com/availability",
"api_token": "your_token"
}
},
"category": "communication",
"tags": [
"availability",
"booking"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tools: [
{
type: 'function',
function: {
name: 'check_availability',
description: 'Check appointment availability',
parameters: {
type: 'object',
properties: {date: {type: 'string', format: 'date'}, time: {type: 'string'}},
required: ['date']
}
}
}
],
tools_params: {
check_availability: {
method: 'GET',
url: 'https://api.example.com/availability',
api_token: 'your_token'
}
},
category: 'communication',
tags: ['availability', 'booking']
})
};
fetch('https://api.kallabot.com/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kallabot.com/tools"
payload = {
"tools": [
{
"type": "function",
"function": {
"name": "check_availability",
"description": "Check appointment availability",
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date"
},
"time": { "type": "string" }
},
"required": ["date"]
}
}
}
],
"tools_params": { "check_availability": {
"method": "GET",
"url": "https://api.example.com/availability",
"api_token": "your_token"
} },
"category": "communication",
"tags": ["availability", "booking"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"category": "<string>",
"tool_schema": {
"tools": [
{
"type": "function",
"function": {
"name": "get_customer_orders",
"description": "Fetch recent orders for a customer by ID.",
"parameters": {},
"strict": true
}
}
],
"tools_params": {},
"mcp_servers": [
{
"url": "<string>"
}
],
"api_tool_ids": [
"<string>"
],
"call_transfer_config": {},
"call_transfer_description": "<string>"
},
"tags": [
"<string>"
],
"isActive": true,
"lastTested": "2023-11-07T05:31:56Z",
"testStatus": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}
