ElevenLabs tool: check human agent availability
curl --request POST \
--url https://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01",
"agent_id": "agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01",
"caller_id": "+14165550100",
"called_id": "+12362320246",
"called_number": "+12362320246"
}
'import requests
url = "https://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability"
payload = {
"conversation_id": "conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01",
"agent_id": "agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01",
"caller_id": "+14165550100",
"called_id": "+12362320246",
"called_number": "+12362320246"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
conversation_id: 'conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01',
agent_id: 'agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01',
caller_id: '+14165550100',
called_id: '+12362320246',
called_number: '+12362320246'
})
};
fetch('https://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability', 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://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability",
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([
'conversation_id' => 'conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01',
'agent_id' => 'agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01',
'caller_id' => '+14165550100',
'called_id' => '+12362320246',
'called_number' => '+12362320246'
]),
CURLOPT_HTTPHEADER => [
"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://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability"
payload := strings.NewReader("{\n \"conversation_id\": \"conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01\",\n \"agent_id\": \"agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01\",\n \"caller_id\": \"+14165550100\",\n \"called_id\": \"+12362320246\",\n \"called_number\": \"+12362320246\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability")
.header("Content-Type", "application/json")
.body("{\n \"conversation_id\": \"conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01\",\n \"agent_id\": \"agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01\",\n \"caller_id\": \"+14165550100\",\n \"called_id\": \"+12362320246\",\n \"called_number\": \"+12362320246\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"conversation_id\": \"conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01\",\n \"agent_id\": \"agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01\",\n \"caller_id\": \"+14165550100\",\n \"called_id\": \"+12362320246\",\n \"called_number\": \"+12362320246\"\n}"
response = http.request(request)
puts response.read_body{
"agents_available": true,
"available_count": 2,
"online_count": 4
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}Webhooks
ElevenLabs tool: check human agent availability
Server tool webhook called by the ElevenLabs voice agent mid-call to check whether any human agents in the organization are currently online and chat-available. Authenticated via Bearer token (per-org elevenlabsToolSecret).
POST
/
api
/
webhook
/
elevenlabs
/
tools
/
check-availability
ElevenLabs tool: check human agent availability
curl --request POST \
--url https://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01",
"agent_id": "agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01",
"caller_id": "+14165550100",
"called_id": "+12362320246",
"called_number": "+12362320246"
}
'import requests
url = "https://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability"
payload = {
"conversation_id": "conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01",
"agent_id": "agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01",
"caller_id": "+14165550100",
"called_id": "+12362320246",
"called_number": "+12362320246"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
conversation_id: 'conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01',
agent_id: 'agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01',
caller_id: '+14165550100',
called_id: '+12362320246',
called_number: '+12362320246'
})
};
fetch('https://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability', 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://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability",
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([
'conversation_id' => 'conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01',
'agent_id' => 'agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01',
'caller_id' => '+14165550100',
'called_id' => '+12362320246',
'called_number' => '+12362320246'
]),
CURLOPT_HTTPHEADER => [
"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://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability"
payload := strings.NewReader("{\n \"conversation_id\": \"conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01\",\n \"agent_id\": \"agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01\",\n \"caller_id\": \"+14165550100\",\n \"called_id\": \"+12362320246\",\n \"called_number\": \"+12362320246\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability")
.header("Content-Type", "application/json")
.body("{\n \"conversation_id\": \"conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01\",\n \"agent_id\": \"agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01\",\n \"caller_id\": \"+14165550100\",\n \"called_id\": \"+12362320246\",\n \"called_number\": \"+12362320246\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/webhook/elevenlabs/tools/check-availability")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"conversation_id\": \"conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01\",\n \"agent_id\": \"agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01\",\n \"caller_id\": \"+14165550100\",\n \"called_id\": \"+12362320246\",\n \"called_number\": \"+12362320246\"\n}"
response = http.request(request)
puts response.read_body{
"agents_available": true,
"available_count": 2,
"online_count": 4
}{
"error": "Webhook processing failed"
}{
"error": "Webhook processing failed"
}Body
application/json
Common shape ElevenLabs uses to invoke a server tool mid-call. called_id/called_number lets the handler resolve the user inside the calling org.
ElevenLabs conversation id; used to correlate with the cached personalization context.
ElevenLabs agent id that is invoking the tool.
External caller phone number.
Tether AI-enabled number that was called; used to resolve owning org/user.
Alternate key for called_id (older ElevenLabs payloads use this name).
⌘I