Attach Tools To PAL
curl --request POST \
--url https://tavusapi.com/v2/pals/{pal_id}/tools \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tool_ids": [
"tabc123def456",
"tdef456abc789"
]
}
'import requests
url = "https://tavusapi.com/v2/pals/{pal_id}/tools"
payload = { "tool_ids": ["tabc123def456", "tdef456abc789"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tool_ids: ['tabc123def456', 'tdef456abc789']})
};
fetch('https://tavusapi.com/v2/pals/{pal_id}/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://tavusapi.com/v2/pals/{pal_id}/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([
'tool_ids' => [
'tabc123def456',
'tdef456abc789'
]
]),
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://tavusapi.com/v2/pals/{pal_id}/tools"
payload := strings.NewReader("{\n \"tool_ids\": [\n \"tabc123def456\",\n \"tdef456abc789\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://tavusapi.com/v2/pals/{pal_id}/tools")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tool_ids\": [\n \"tabc123def456\",\n \"tdef456abc789\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/pals/{pal_id}/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tool_ids\": [\n \"tabc123def456\",\n \"tdef456abc789\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"tool_id": "tabc123def456",
"owner_id": 3675,
"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name"
}
},
"required": [
"city"
]
},
"delivery": {
"app_message": true,
"api": {
"url": "https://api.example.com/v1/weather/{city}",
"method": "POST",
"timeout": 10,
"headers": {
"X-Service": "weather-bot"
},
"auth": {
"token": "<string>",
"username": "<string>",
"password": "<string>",
"name": "X-API-Key",
"value": "<string>",
"location": "header",
"secret": "<string>",
"token_url": "https://auth.example.com/oauth/token",
"client_id": "<string>",
"client_secret": "<string>",
"scope": "<string>"
},
"body_template": {},
"query_params": {
"units": "metric"
},
"content_type": "application/json"
}
},
"is_system_tool": false,
"trigger_type": "in_call",
"origin": "llm",
"on_call": "generate_filler",
"on_resolve": "generate_response",
"static_filler": "Sure, let me grab that for you.",
"created_at": "2026-05-15T10:30:00",
"updated_at": "2026-05-15T10:30:00"
}
]
}{
"error": "Bad Request. One or more tool_ids not found"
}{
"message": "Invalid access token"
}Tools
Attach Tools To PAL
Attach one or more tools (by tool_id) to a PAL. A PAL can have at most 50 attached tools.
Attaching a tool that is already attached is idempotent - it is reported in the response alongside any newly-attached tools.
POST
/
v2
/
pals
/
{pal_id}
/
tools
Attach Tools To PAL
curl --request POST \
--url https://tavusapi.com/v2/pals/{pal_id}/tools \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tool_ids": [
"tabc123def456",
"tdef456abc789"
]
}
'import requests
url = "https://tavusapi.com/v2/pals/{pal_id}/tools"
payload = { "tool_ids": ["tabc123def456", "tdef456abc789"] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tool_ids: ['tabc123def456', 'tdef456abc789']})
};
fetch('https://tavusapi.com/v2/pals/{pal_id}/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://tavusapi.com/v2/pals/{pal_id}/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([
'tool_ids' => [
'tabc123def456',
'tdef456abc789'
]
]),
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://tavusapi.com/v2/pals/{pal_id}/tools"
payload := strings.NewReader("{\n \"tool_ids\": [\n \"tabc123def456\",\n \"tdef456abc789\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://tavusapi.com/v2/pals/{pal_id}/tools")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tool_ids\": [\n \"tabc123def456\",\n \"tdef456abc789\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/pals/{pal_id}/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tool_ids\": [\n \"tabc123def456\",\n \"tdef456abc789\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"tool_id": "tabc123def456",
"owner_id": 3675,
"name": "get_weather",
"description": "Get the current weather for a city",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name"
}
},
"required": [
"city"
]
},
"delivery": {
"app_message": true,
"api": {
"url": "https://api.example.com/v1/weather/{city}",
"method": "POST",
"timeout": 10,
"headers": {
"X-Service": "weather-bot"
},
"auth": {
"token": "<string>",
"username": "<string>",
"password": "<string>",
"name": "X-API-Key",
"value": "<string>",
"location": "header",
"secret": "<string>",
"token_url": "https://auth.example.com/oauth/token",
"client_id": "<string>",
"client_secret": "<string>",
"scope": "<string>"
},
"body_template": {},
"query_params": {
"units": "metric"
},
"content_type": "application/json"
}
},
"is_system_tool": false,
"trigger_type": "in_call",
"origin": "llm",
"on_call": "generate_filler",
"on_resolve": "generate_response",
"static_filler": "Sure, let me grab that for you.",
"created_at": "2026-05-15T10:30:00",
"updated_at": "2026-05-15T10:30:00"
}
]
}{
"error": "Bad Request. One or more tool_ids not found"
}{
"message": "Invalid access token"
}Authorizations
Path Parameters
The unique identifier of the PAL.
Example:
"p12345"
Body
application/json
List of tool_id values to attach. Must not be empty; at most 50 per request.
Example:
["tabc123def456", "tdef456abc789"]
Response
Tools attached
All tools that are now attached to the PAL, including ones that were already attached before this request.
Show child attributes
Show child attributes
⌘I

