Create a tool
curl --request POST \
--url https://api.vonative.com/v1/tools/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"function": {
"description": "Get weather",
"name": "get_weather",
"parameters": {
"properties": {},
"type": "object"
}
},
"name": "My Tool",
"type": "function"
}
'import requests
url = "https://api.vonative.com/v1/tools/"
payload = {
"function": {
"description": "Get weather",
"name": "get_weather",
"parameters": {
"properties": {},
"type": "object"
}
},
"name": "My Tool",
"type": "function"
}
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({
function: {
description: 'Get weather',
name: 'get_weather',
parameters: {properties: {}, type: 'object'}
},
name: 'My Tool',
type: 'function'
})
};
fetch('https://api.vonative.com/v1/tools/', 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://api.vonative.com/v1/tools/",
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([
'function' => [
'description' => 'Get weather',
'name' => 'get_weather',
'parameters' => [
'properties' => [
],
'type' => 'object'
]
],
'name' => 'My Tool',
'type' => 'function'
]),
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://api.vonative.com/v1/tools/"
payload := strings.NewReader("{\n \"function\": {\n \"description\": \"Get weather\",\n \"name\": \"get_weather\",\n \"parameters\": {\n \"properties\": {},\n \"type\": \"object\"\n }\n },\n \"name\": \"My Tool\",\n \"type\": \"function\"\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://api.vonative.com/v1/tools/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"function\": {\n \"description\": \"Get weather\",\n \"name\": \"get_weather\",\n \"parameters\": {\n \"properties\": {},\n \"type\": \"object\"\n }\n },\n \"name\": \"My Tool\",\n \"type\": \"function\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vonative.com/v1/tools/")
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 \"function\": {\n \"description\": \"Get weather\",\n \"name\": \"get_weather\",\n \"parameters\": {\n \"properties\": {},\n \"type\": \"object\"\n }\n },\n \"name\": \"My Tool\",\n \"type\": \"function\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "success",
"data": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "<string>",
"organization_id": "<string>",
"created_by": "<string>",
"name": "",
"description": "",
"status": "active",
"async_": false,
"messages": [],
"function": {},
"server": {},
"server_credential_id": "<string>",
"vapi_id": "<string>",
"vapi_config": {},
"last_synced_at": "2023-11-07T05:31:56Z",
"sync_status": "draft",
"sync_error": "<string>",
"metadata_json": {},
"config": {},
"total_calls": 0,
"success_count": 0,
"error_count": 0,
"avg_latency_ms": "0"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Tools
Create a tool
Required permission: tools:write
POST
/
v1
/
tools
/
Create a tool
curl --request POST \
--url https://api.vonative.com/v1/tools/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"function": {
"description": "Get weather",
"name": "get_weather",
"parameters": {
"properties": {},
"type": "object"
}
},
"name": "My Tool",
"type": "function"
}
'import requests
url = "https://api.vonative.com/v1/tools/"
payload = {
"function": {
"description": "Get weather",
"name": "get_weather",
"parameters": {
"properties": {},
"type": "object"
}
},
"name": "My Tool",
"type": "function"
}
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({
function: {
description: 'Get weather',
name: 'get_weather',
parameters: {properties: {}, type: 'object'}
},
name: 'My Tool',
type: 'function'
})
};
fetch('https://api.vonative.com/v1/tools/', 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://api.vonative.com/v1/tools/",
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([
'function' => [
'description' => 'Get weather',
'name' => 'get_weather',
'parameters' => [
'properties' => [
],
'type' => 'object'
]
],
'name' => 'My Tool',
'type' => 'function'
]),
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://api.vonative.com/v1/tools/"
payload := strings.NewReader("{\n \"function\": {\n \"description\": \"Get weather\",\n \"name\": \"get_weather\",\n \"parameters\": {\n \"properties\": {},\n \"type\": \"object\"\n }\n },\n \"name\": \"My Tool\",\n \"type\": \"function\"\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://api.vonative.com/v1/tools/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"function\": {\n \"description\": \"Get weather\",\n \"name\": \"get_weather\",\n \"parameters\": {\n \"properties\": {},\n \"type\": \"object\"\n }\n },\n \"name\": \"My Tool\",\n \"type\": \"function\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vonative.com/v1/tools/")
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 \"function\": {\n \"description\": \"Get weather\",\n \"name\": \"get_weather\",\n \"parameters\": {\n \"properties\": {},\n \"type\": \"object\"\n }\n },\n \"name\": \"My Tool\",\n \"type\": \"function\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "success",
"data": {
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "<string>",
"organization_id": "<string>",
"created_by": "<string>",
"name": "",
"description": "",
"status": "active",
"async_": false,
"messages": [],
"function": {},
"server": {},
"server_credential_id": "<string>",
"vapi_id": "<string>",
"vapi_config": {},
"last_synced_at": "2023-11-07T05:31:56Z",
"sync_status": "draft",
"sync_error": "<string>",
"metadata_json": {},
"config": {},
"total_calls": 0,
"success_count": 0,
"error_count": 0,
"avg_latency_ms": "0"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
An API key from Dashboard → Developers → API keys.
Body
application/json
Schema for creating a tool
Tool name
Required string length:
1 - 255Tool type (matching ToolType enum)
Tool description
Maximum string length:
1000Whether tool executes asynchronously
Messages to play
Function definition
Server configuration
Local server credential reference
Maximum string length:
255Additional configuration
Response
Successful Response
Tool response schema with UUID-based identification.
Inherits from UUIDResponseBase which maps uuid → id and excludes integer PK. Integer FK fields (organization_id, created_by) are resolved to UUIDs from loaded relationships.
Show child attributes
Show child attributes
⌘I

