Update Agent Tool
curl --request PATCH \
--url https://api.ravan.ai/api/v1/tools/{id}/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"type": "<string>",
"definition": {}
}
'import requests
url = "https://api.ravan.ai/api/v1/tools/{id}/"
payload = {
"name": "<string>",
"description": "<string>",
"type": "<string>",
"definition": {}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', type: '<string>', definition: {}})
};
fetch('https://api.ravan.ai/api/v1/tools/{id}/', 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.ravan.ai/api/v1/tools/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'type' => '<string>',
'definition' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.ravan.ai/api/v1/tools/{id}/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"definition\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.patch("https://api.ravan.ai/api/v1/tools/{id}/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"definition\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravan.ai/api/v1/tools/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"definition\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Request completed successfully",
"data": {
"id": "id_123",
"organizationId": "organization_123",
"name": "Support Bot",
"description": "Example description",
"type": "twilio",
"definition": {},
"isActive": true
}
}
Agent Tool API
Update Agent Tool
Update Agent Tool.
PATCH
/
api
/
v1
/
tools
/
{id}
/
Update Agent Tool
curl --request PATCH \
--url https://api.ravan.ai/api/v1/tools/{id}/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"type": "<string>",
"definition": {}
}
'import requests
url = "https://api.ravan.ai/api/v1/tools/{id}/"
payload = {
"name": "<string>",
"description": "<string>",
"type": "<string>",
"definition": {}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>', type: '<string>', definition: {}})
};
fetch('https://api.ravan.ai/api/v1/tools/{id}/', 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.ravan.ai/api/v1/tools/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'type' => '<string>',
'definition' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.ravan.ai/api/v1/tools/{id}/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"definition\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.patch("https://api.ravan.ai/api/v1/tools/{id}/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"definition\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravan.ai/api/v1/tools/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"definition\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Request completed successfully",
"data": {
"id": "id_123",
"organizationId": "organization_123",
"name": "Support Bot",
"description": "Example description",
"type": "twilio",
"definition": {},
"isActive": true
}
}
Authorizations
string
required
Your Agni API key used to authenticate the request. Pass it in the
X-Api-Key header. Find or rotate it from your Ravan AI account settings.Path Parameters
string
required
The unique ID of the resource in the path. Use the ID returned by the related create or list endpoint.
Body
string
The internal name of the resource. Use a clear name that your team can recognize in the dashboard and API responses.
string
A short description of the resource. Use it to explain the purpose, behavior, or usage context.
string
The tool type. Use the value that matches how the agent should execute the tool, such as an API or integration tool.
object
The tool definition object. Include the schema, parameters, and execution details required by the tool type.
Response
boolean
Whether the request succeeded.
string
Human-readable status message.
object
{
"success": true,
"message": "Request completed successfully",
"data": {
"id": "id_123",
"organizationId": "organization_123",
"name": "Support Bot",
"description": "Example description",
"type": "twilio",
"definition": {},
"isActive": true
}
}

