Create Tool Call
curl --request POST \
--url https://control-plane.kubiya.ai/api/v1/analytics/tool-calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"execution_id": "<string>",
"tool_name": "<string>",
"started_at": "<string>",
"turn_id": "<string>",
"tool_use_id": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"tool_input": {},
"tool_output": "<string>",
"tool_output_size": 123,
"success": true,
"error_message": "<string>",
"error_type": "<string>",
"metadata": {}
}
'import requests
url = "https://control-plane.kubiya.ai/api/v1/analytics/tool-calls"
payload = {
"execution_id": "<string>",
"tool_name": "<string>",
"started_at": "<string>",
"turn_id": "<string>",
"tool_use_id": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"tool_input": {},
"tool_output": "<string>",
"tool_output_size": 123,
"success": True,
"error_message": "<string>",
"error_type": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
execution_id: '<string>',
tool_name: '<string>',
started_at: '<string>',
turn_id: '<string>',
tool_use_id: '<string>',
completed_at: '<string>',
duration_ms: 123,
tool_input: {},
tool_output: '<string>',
tool_output_size: 123,
success: true,
error_message: '<string>',
error_type: '<string>',
metadata: {}
})
};
fetch('https://control-plane.kubiya.ai/api/v1/analytics/tool-calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://control-plane.kubiya.ai/api/v1/analytics/tool-calls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'execution_id' => '<string>',
'tool_name' => '<string>',
'started_at' => '<string>',
'turn_id' => '<string>',
'tool_use_id' => '<string>',
'completed_at' => '<string>',
'duration_ms' => 123,
'tool_input' => [
],
'tool_output' => '<string>',
'tool_output_size' => 123,
'success' => true,
'error_message' => '<string>',
'error_type' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://control-plane.kubiya.ai/api/v1/analytics/tool-calls"
payload := strings.NewReader("{\n \"execution_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"started_at\": \"<string>\",\n \"turn_id\": \"<string>\",\n \"tool_use_id\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"duration_ms\": 123,\n \"tool_input\": {},\n \"tool_output\": \"<string>\",\n \"tool_output_size\": 123,\n \"success\": true,\n \"error_message\": \"<string>\",\n \"error_type\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://control-plane.kubiya.ai/api/v1/analytics/tool-calls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"execution_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"started_at\": \"<string>\",\n \"turn_id\": \"<string>\",\n \"tool_use_id\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"duration_ms\": 123,\n \"tool_input\": {},\n \"tool_output\": \"<string>\",\n \"tool_output_size\": 123,\n \"success\": true,\n \"error_message\": \"<string>\",\n \"error_type\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control-plane.kubiya.ai/api/v1/analytics/tool-calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"execution_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"started_at\": \"<string>\",\n \"turn_id\": \"<string>\",\n \"tool_use_id\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"duration_ms\": 123,\n \"tool_input\": {},\n \"tool_output\": \"<string>\",\n \"tool_output_size\": 123,\n \"success\": true,\n \"error_message\": \"<string>\",\n \"error_type\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Create Tool Call
Create a tool call record.
This endpoint is called by workers to persist tool execution details including timing, success/failure, and error information.
POST
/
api
/
v1
/
analytics
/
tool-calls
Create Tool Call
curl --request POST \
--url https://control-plane.kubiya.ai/api/v1/analytics/tool-calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"execution_id": "<string>",
"tool_name": "<string>",
"started_at": "<string>",
"turn_id": "<string>",
"tool_use_id": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"tool_input": {},
"tool_output": "<string>",
"tool_output_size": 123,
"success": true,
"error_message": "<string>",
"error_type": "<string>",
"metadata": {}
}
'import requests
url = "https://control-plane.kubiya.ai/api/v1/analytics/tool-calls"
payload = {
"execution_id": "<string>",
"tool_name": "<string>",
"started_at": "<string>",
"turn_id": "<string>",
"tool_use_id": "<string>",
"completed_at": "<string>",
"duration_ms": 123,
"tool_input": {},
"tool_output": "<string>",
"tool_output_size": 123,
"success": True,
"error_message": "<string>",
"error_type": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
execution_id: '<string>',
tool_name: '<string>',
started_at: '<string>',
turn_id: '<string>',
tool_use_id: '<string>',
completed_at: '<string>',
duration_ms: 123,
tool_input: {},
tool_output: '<string>',
tool_output_size: 123,
success: true,
error_message: '<string>',
error_type: '<string>',
metadata: {}
})
};
fetch('https://control-plane.kubiya.ai/api/v1/analytics/tool-calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://control-plane.kubiya.ai/api/v1/analytics/tool-calls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'execution_id' => '<string>',
'tool_name' => '<string>',
'started_at' => '<string>',
'turn_id' => '<string>',
'tool_use_id' => '<string>',
'completed_at' => '<string>',
'duration_ms' => 123,
'tool_input' => [
],
'tool_output' => '<string>',
'tool_output_size' => 123,
'success' => true,
'error_message' => '<string>',
'error_type' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://control-plane.kubiya.ai/api/v1/analytics/tool-calls"
payload := strings.NewReader("{\n \"execution_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"started_at\": \"<string>\",\n \"turn_id\": \"<string>\",\n \"tool_use_id\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"duration_ms\": 123,\n \"tool_input\": {},\n \"tool_output\": \"<string>\",\n \"tool_output_size\": 123,\n \"success\": true,\n \"error_message\": \"<string>\",\n \"error_type\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://control-plane.kubiya.ai/api/v1/analytics/tool-calls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"execution_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"started_at\": \"<string>\",\n \"turn_id\": \"<string>\",\n \"tool_use_id\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"duration_ms\": 123,\n \"tool_input\": {},\n \"tool_output\": \"<string>\",\n \"tool_output_size\": 123,\n \"success\": true,\n \"error_message\": \"<string>\",\n \"error_type\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control-plane.kubiya.ai/api/v1/analytics/tool-calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"execution_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"started_at\": \"<string>\",\n \"turn_id\": \"<string>\",\n \"tool_use_id\": \"<string>\",\n \"completed_at\": \"<string>\",\n \"duration_ms\": 123,\n \"tool_input\": {},\n \"tool_output\": \"<string>\",\n \"tool_output_size\": 123,\n \"success\": true,\n \"error_message\": \"<string>\",\n \"error_type\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Enter your Kubiya API token (format: Bearer )
Body
application/json
Schema for creating a tool call record
Response
Successful Response
Was this page helpful?
⌘I