Test Webhook Tool
curl --request POST \
--url https://api.fish.audio/v1/agent/tools/<tool-id>/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"arguments": {"date": "2026-07-03"}
}'import requests
url = "https://api.fish.audio/v1/agent/tools/{tool_id}/test"
payload = { "arguments": {} }
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({arguments: {}})
};
fetch('https://api.fish.audio/v1/agent/tools/{tool_id}/test', 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.fish.audio/v1/agent/tools/{tool_id}/test",
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([
'arguments' => [
]
]),
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.fish.audio/v1/agent/tools/{tool_id}/test"
payload := strings.NewReader("{\n \"arguments\": {}\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.fish.audio/v1/agent/tools/{tool_id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"arguments\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fish.audio/v1/agent/tools/{tool_id}/test")
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 \"arguments\": {}\n}"
response = http.request(request)
puts response.read_body{
"latency_ms": 123,
"status_code": 123,
"status_text": "",
"response_body": "",
"response_headers": {},
"response_truncated": false,
"error": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}Tools
Test Voice Agent Webhook Tool
Send one real request to a webhook tool’s endpoint, the way an agent would during a conversation
POST
/
v1
/
agent
/
tools
/
{tool_id}
/
test
Test Webhook Tool
curl --request POST \
--url https://api.fish.audio/v1/agent/tools/<tool-id>/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"arguments": {"date": "2026-07-03"}
}'import requests
url = "https://api.fish.audio/v1/agent/tools/{tool_id}/test"
payload = { "arguments": {} }
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({arguments: {}})
};
fetch('https://api.fish.audio/v1/agent/tools/{tool_id}/test', 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.fish.audio/v1/agent/tools/{tool_id}/test",
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([
'arguments' => [
]
]),
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.fish.audio/v1/agent/tools/{tool_id}/test"
payload := strings.NewReader("{\n \"arguments\": {}\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.fish.audio/v1/agent/tools/{tool_id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"arguments\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fish.audio/v1/agent/tools/{tool_id}/test")
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 \"arguments\": {}\n}"
response = http.request(request)
puts response.read_body{
"latency_ms": 123,
"status_code": 123,
"status_text": "",
"response_body": "",
"response_headers": {},
"response_truncated": false,
"error": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}This sends a real request to your endpoint and can have side effects, such as
creating a record. Test against an endpoint where that is safe.
arguments you send, and the endpoint’s response comes back in the result. {{name}} placeholders in the URL are filled in from arguments too, as they are during a call, with each value URL-encoded. A placeholder with no value becomes empty.
The request body is optional. Leaving it out is the same as sending {}.
A failure to reach your endpoint is not an HTTP error: the call returns 200 and error says what went wrong. The call returns 400 for a client tool, which has no server-side request, for a URL or host that isn’t allowed, and for a header that doesn’t render to a valid value.
Each team can make 30 calls per minute to this endpoint. The 31st call within the same minute returns 429, and the count starts again in the next minute.
For how webhook tools are built and tested in the console, see Webhook Tools.Authorizations
Body
application/json
Response
Request fulfilled, document follows
Result of one real request to a webhook tool's endpoint. A failure to
reach your endpoint is reported in error, not as an HTTP error.
Was this page helpful?

