Skip to main content
GET
/
v1
/
voice-agents
/
web-tool
/
list
Return a list of Web Tools.
curl --request GET \
  --url https://api.tryhamsa.com/v1/voice-agents/web-tool/list \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.tryhamsa.com/v1/voice-agents/web-tool/list"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.tryhamsa.com/v1/voice-agents/web-tool/list', 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.tryhamsa.com/v1/voice-agents/web-tool/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)

func main() {

url := "https://api.tryhamsa.com/v1/voice-agents/web-tool/list"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v1/voice-agents/web-tool/list")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.tryhamsa.com/v1/voice-agents/web-tool/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "success": false,
  "message": "success",
  "data": {
    "total": 100,
    "filtered": 100,
    "items": [
      {
        "id": "d949f13f-40d2-4e48-ac86-b66633070603",
        "persistentId": "cmjx8qzw0000004kz3jek1ktu",
        "version": 1,
        "name": "Weather API Tool",
        "type": "FUNCTION",
        "userId": "550e8400-e29b-41d4-a716-446655440000",
        "projectId": "d949f13f-40d2-4e48-ac86-b66633070603",
        "isActive": true,
        "async": true,
        "description": "A tool that fetches current weather information for a given location.",
        "collectionId": "550e8400-e29b-41d4-a716-446655440000",
        "toolSettings": {
          "serverUrl": "https://api.example.com/webhook",
          "httpHeaders": {
            "Content-Type": "application/json",
            "Authorization": "Bearer token"
          },
          "pathParameters": {
            "userId": "12345"
          },
          "timeout": 5000,
          "authToken": "bearer_token_12345",
          "methodType": "POST"
        },
        "params": {
          "location": {
            "type": "string",
            "description": "The location to get weather for"
          }
        },
        "messages": [
          {
            "type": "system",
            "content": "You are a helpful weather assistant."
          }
        ]
      }
    ]
  }
}
{
"code": 123,
"message": "<string>"
}
{
"code": 123,
"message": "<string>"
}
{
"code": 123,
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Query Parameters

voiceAgentId
string<uuid>

Optional UUID of the voice agent to filter associated web tools.

Example:

"d949f13f-40d2-4e48-ac86-b66633070603"

isActive
boolean

Optional boolean indicating whether to fetch active web tools or not.

Example:

true

skip
string

Page number for pagination. Defaults to '1'.

Example:

"1"

take
string

Number of items to take for pagination. Defaults to '10'.

Example:

"10"

type
enum<string>

The type of the web tool to filter.

Available options:
MCP,
FUNCTION,
WEB_TOOL
Example:

"MCP"

A search query to filter web tools.

Example:

"Get callee info"

Response

Successful response

success
boolean
default:false
message
string
default:success
data
object