Update Tool
curl --request POST \
--url https://api.bland.ai/v2/tools/{tool_id} \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"description": "<string>",
"integration": "<string>",
"action": "<string>",
"input_schema": {},
"body": {},
"speech": "<string>",
"timeout": 123,
"cache": true,
"response_data": [
{
"name": "<string>",
"data": "<string>",
"context": "<string>"
}
],
"max_retries": 123,
"cooldown": 123,
"resource_id": "<string>",
"public": true,
"label": "<string>"
}
'import requests
url = "https://api.bland.ai/v2/tools/{tool_id}"
payload = {
"name": "<string>",
"description": "<string>",
"integration": "<string>",
"action": "<string>",
"input_schema": {},
"body": {},
"speech": "<string>",
"timeout": 123,
"cache": True,
"response_data": [
{
"name": "<string>",
"data": "<string>",
"context": "<string>"
}
],
"max_retries": 123,
"cooldown": 123,
"resource_id": "<string>",
"public": True,
"label": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
integration: '<string>',
action: '<string>',
input_schema: {},
body: JSON.stringify({}),
speech: '<string>',
timeout: 123,
cache: true,
response_data: [{name: '<string>', data: '<string>', context: '<string>'}],
max_retries: 123,
cooldown: 123,
resource_id: '<string>',
public: true,
label: '<string>'
})
};
fetch('https://api.bland.ai/v2/tools/{tool_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.bland.ai/v2/tools/{tool_id}",
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([
'name' => '<string>',
'description' => '<string>',
'integration' => '<string>',
'action' => '<string>',
'input_schema' => [
],
'body' => [
],
'speech' => '<string>',
'timeout' => 123,
'cache' => true,
'response_data' => [
[
'name' => '<string>',
'data' => '<string>',
'context' => '<string>'
]
],
'max_retries' => 123,
'cooldown' => 123,
'resource_id' => '<string>',
'public' => true,
'label' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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.bland.ai/v2/tools/{tool_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"integration\": \"<string>\",\n \"action\": \"<string>\",\n \"input_schema\": {},\n \"body\": {},\n \"speech\": \"<string>\",\n \"timeout\": 123,\n \"cache\": true,\n \"response_data\": [\n {\n \"name\": \"<string>\",\n \"data\": \"<string>\",\n \"context\": \"<string>\"\n }\n ],\n \"max_retries\": 123,\n \"cooldown\": 123,\n \"resource_id\": \"<string>\",\n \"public\": true,\n \"label\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v2/tools/{tool_id}")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"integration\": \"<string>\",\n \"action\": \"<string>\",\n \"input_schema\": {},\n \"body\": {},\n \"speech\": \"<string>\",\n \"timeout\": 123,\n \"cache\": true,\n \"response_data\": [\n {\n \"name\": \"<string>\",\n \"data\": \"<string>\",\n \"context\": \"<string>\"\n }\n ],\n \"max_retries\": 123,\n \"cooldown\": 123,\n \"resource_id\": \"<string>\",\n \"public\": true,\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/tools/{tool_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"integration\": \"<string>\",\n \"action\": \"<string>\",\n \"input_schema\": {},\n \"body\": {},\n \"speech\": \"<string>\",\n \"timeout\": 123,\n \"cache\": true,\n \"response_data\": [\n {\n \"name\": \"<string>\",\n \"data\": \"<string>\",\n \"context\": \"<string>\"\n }\n ],\n \"max_retries\": 123,\n \"cooldown\": 123,\n \"resource_id\": \"<string>\",\n \"public\": true,\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"description": "Sends an urgent message to a Slack channel",
"timeout": 15000
}
{
"status": "success",
"data": {
"id": "abc123def456"
},
"errors": null
}
{
"data": null,
"errors": [
{
"code": "TOOL_NOT_FOUND",
"message": "Tool not found"
}
]
}
{
"data": null,
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "timeout must be between 1000 and 60000"
}
]
}
{
"data": null,
"errors": [
{
"code": "TOOL_V2_UPDATE_VALIDATION_ERROR",
"message": "Validation failed for the provided tool configuration"
}
]
}
{
"data": null,
"errors": [
{
"code": "INVALID_TOOL_TYPE",
"message": "The specified tool type is not supported"
}
]
}
{
"data": null,
"errors": [
{
"code": "INTEGRATION_NOT_FOUND",
"message": "Integration 'my_integration' is not available. Available integrations: bland-sms, custom-code, slack, salesforce, rest_api, hubspot, calendly, cal-com-v2, notion"
}
]
}
{
"data": null,
"errors": [
{
"code": "ACTION_NOT_FOUND",
"message": "Action 'my_action' not found for integration 'slack'"
}
]
}
{
"data": null,
"errors": [
{
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found or is inactive"
}
]
}
Tools
Update Tool
Update an existing tool. All fields are optional. Only the fields you provide will be updated.
POST
/
v2
/
tools
/
{tool_id}
Update Tool
curl --request POST \
--url https://api.bland.ai/v2/tools/{tool_id} \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"description": "<string>",
"integration": "<string>",
"action": "<string>",
"input_schema": {},
"body": {},
"speech": "<string>",
"timeout": 123,
"cache": true,
"response_data": [
{
"name": "<string>",
"data": "<string>",
"context": "<string>"
}
],
"max_retries": 123,
"cooldown": 123,
"resource_id": "<string>",
"public": true,
"label": "<string>"
}
'import requests
url = "https://api.bland.ai/v2/tools/{tool_id}"
payload = {
"name": "<string>",
"description": "<string>",
"integration": "<string>",
"action": "<string>",
"input_schema": {},
"body": {},
"speech": "<string>",
"timeout": 123,
"cache": True,
"response_data": [
{
"name": "<string>",
"data": "<string>",
"context": "<string>"
}
],
"max_retries": 123,
"cooldown": 123,
"resource_id": "<string>",
"public": True,
"label": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
integration: '<string>',
action: '<string>',
input_schema: {},
body: JSON.stringify({}),
speech: '<string>',
timeout: 123,
cache: true,
response_data: [{name: '<string>', data: '<string>', context: '<string>'}],
max_retries: 123,
cooldown: 123,
resource_id: '<string>',
public: true,
label: '<string>'
})
};
fetch('https://api.bland.ai/v2/tools/{tool_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.bland.ai/v2/tools/{tool_id}",
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([
'name' => '<string>',
'description' => '<string>',
'integration' => '<string>',
'action' => '<string>',
'input_schema' => [
],
'body' => [
],
'speech' => '<string>',
'timeout' => 123,
'cache' => true,
'response_data' => [
[
'name' => '<string>',
'data' => '<string>',
'context' => '<string>'
]
],
'max_retries' => 123,
'cooldown' => 123,
'resource_id' => '<string>',
'public' => true,
'label' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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.bland.ai/v2/tools/{tool_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"integration\": \"<string>\",\n \"action\": \"<string>\",\n \"input_schema\": {},\n \"body\": {},\n \"speech\": \"<string>\",\n \"timeout\": 123,\n \"cache\": true,\n \"response_data\": [\n {\n \"name\": \"<string>\",\n \"data\": \"<string>\",\n \"context\": \"<string>\"\n }\n ],\n \"max_retries\": 123,\n \"cooldown\": 123,\n \"resource_id\": \"<string>\",\n \"public\": true,\n \"label\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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.bland.ai/v2/tools/{tool_id}")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"integration\": \"<string>\",\n \"action\": \"<string>\",\n \"input_schema\": {},\n \"body\": {},\n \"speech\": \"<string>\",\n \"timeout\": 123,\n \"cache\": true,\n \"response_data\": [\n {\n \"name\": \"<string>\",\n \"data\": \"<string>\",\n \"context\": \"<string>\"\n }\n ],\n \"max_retries\": 123,\n \"cooldown\": 123,\n \"resource_id\": \"<string>\",\n \"public\": true,\n \"label\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/tools/{tool_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"integration\": \"<string>\",\n \"action\": \"<string>\",\n \"input_schema\": {},\n \"body\": {},\n \"speech\": \"<string>\",\n \"timeout\": 123,\n \"cache\": true,\n \"response_data\": [\n {\n \"name\": \"<string>\",\n \"data\": \"<string>\",\n \"context\": \"<string>\"\n }\n ],\n \"max_retries\": 123,\n \"cooldown\": 123,\n \"resource_id\": \"<string>\",\n \"public\": true,\n \"label\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"description": "Sends an urgent message to a Slack channel",
"timeout": 15000
}
{
"status": "success",
"data": {
"id": "abc123def456"
},
"errors": null
}
{
"data": null,
"errors": [
{
"code": "TOOL_NOT_FOUND",
"message": "Tool not found"
}
]
}
{
"data": null,
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "timeout must be between 1000 and 60000"
}
]
}
{
"data": null,
"errors": [
{
"code": "TOOL_V2_UPDATE_VALIDATION_ERROR",
"message": "Validation failed for the provided tool configuration"
}
]
}
{
"data": null,
"errors": [
{
"code": "INVALID_TOOL_TYPE",
"message": "The specified tool type is not supported"
}
]
}
{
"data": null,
"errors": [
{
"code": "INTEGRATION_NOT_FOUND",
"message": "Integration 'my_integration' is not available. Available integrations: bland-sms, custom-code, slack, salesforce, rest_api, hubspot, calendly, cal-com-v2, notion"
}
]
}
{
"data": null,
"errors": [
{
"code": "ACTION_NOT_FOUND",
"message": "Action 'my_action' not found for integration 'slack'"
}
]
}
{
"data": null,
"errors": [
{
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found or is inactive"
}
]
}
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The unique identifier of the tool to update.
Body Parameters
All fields are optional. Only fields included in the request body will be updated.string
The name the AI will see when deciding to use this tool.
string
Description of what the tool does.
string
The integration key to update. Must be one of:
bland-sms, custom-code, slack, salesforce, rest_api, hubspot, calendly, cal-com-v2, notion.string
The action key to invoke within the integration. To discover available action keys, call
GET /v1/integrations/{integration}/actions. Returns 400 ACTION_NOT_FOUND with the list of valid actions if the key is invalid.object
Must be a valid OpenAI function calling parameter schema. Defines the parameters the AI will fill in when invoking this tool.
string | object
Request body template sent to the integration.
string
Text the AI says aloud while executing this tool.
number
Maximum time in milliseconds to wait for the integration. Minimum
1000, maximum 60000.boolean
Whether to cache the tool’s response.
array
number
Number of times to retry the tool on failure. Minimum
0, maximum 4.number
Seconds to wait between retries. Minimum
1, maximum 30.string
UUID of a connected resource (e.g. a Slack workspace or Salesforce org) to scope this tool to. The resource must be active and belong to your account. Returns
404 if the ID is invalid or inactive. To list available resource IDs for an integration, call GET /v1/integrations/{integration}/resources.boolean
Whether this tool is publicly visible.
string
Human-readable label for this tool.
Response
string
"success" on success, "error" on failure.string
The ID of the updated tool.
null|array
null on success, or a list of error objects if the request failed.{
"description": "Sends an urgent message to a Slack channel",
"timeout": 15000
}
{
"status": "success",
"data": {
"id": "abc123def456"
},
"errors": null
}
{
"data": null,
"errors": [
{
"code": "TOOL_NOT_FOUND",
"message": "Tool not found"
}
]
}
{
"data": null,
"errors": [
{
"code": "INVALID_PARAMETER",
"message": "timeout must be between 1000 and 60000"
}
]
}
{
"data": null,
"errors": [
{
"code": "TOOL_V2_UPDATE_VALIDATION_ERROR",
"message": "Validation failed for the provided tool configuration"
}
]
}
{
"data": null,
"errors": [
{
"code": "INVALID_TOOL_TYPE",
"message": "The specified tool type is not supported"
}
]
}
{
"data": null,
"errors": [
{
"code": "INTEGRATION_NOT_FOUND",
"message": "Integration 'my_integration' is not available. Available integrations: bland-sms, custom-code, slack, salesforce, rest_api, hubspot, calendly, cal-com-v2, notion"
}
]
}
{
"data": null,
"errors": [
{
"code": "ACTION_NOT_FOUND",
"message": "Action 'my_action' not found for integration 'slack'"
}
]
}
{
"data": null,
"errors": [
{
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found or is inactive"
}
]
}
Docs for agents: llms.txt
Was this page helpful?
⌘I