Skip to main content
POST
/
v1
/
voice-agents
/
web-tool
/
test-api-tool
Test API Tool connectivity and validate configuration.
curl --request POST \
  --url https://api.tryhamsa.com/v1/voice-agents/web-tool/test-api-tool \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "d949f13f-40d2-4e48-ac86-b66633070603",
  "serverUrl": "https://api.example.com/endpoint",
  "method": "POST",
  "apiKey": "d949f13f-40d2-4e48-ac86-b66633070603",
  "userId": "d949f13f-40d2-4e48-ac86-b66633070603",
  "authPrefix": "Bearer",
  "authToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "timeout": 5,
  "httpHeaders": {
    "Content-Type": "application/json",
    "X-Custom-Header": "value"
  },
  "queryParams": {
    "filter": "active",
    "limit": "10"
  },
  "body": {
    "name": "Test",
    "value": 123
  }
}
'
{
  "event": "attempt",
  "data": {
    "message": "Starting API test..."
  }
}

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 '

Body

application/json
projectId
string<uuid>
required

UUID of the project.

Example:

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

serverUrl
string<uri>
required

The API endpoint URL to test. Must be a valid external URL.

Example:

"https://api.example.com/endpoint"

method
enum<string>
required

HTTP method to use for the API call.

Available options:
GET,
POST,
PUT,
PATCH,
DELETE
Example:

"POST"

apiKey
string<uuid>

API key UUID (optional).

Example:

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

userId
string<uuid>

UUID of the user (optional).

Example:

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

authPrefix
string

Authorization header prefix (e.g., 'Bearer', 'Basic').

Example:

"Bearer"

authToken
string

Authentication token to include in the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

timeout
number
default:5

Request timeout in seconds (1-15 seconds).

Required range: 1 <= x <= 15
Example:

5

httpHeaders
object

Custom HTTP headers to include in the request.

Example:
{
"Content-Type": "application/json",
"X-Custom-Header": "value"
}
queryParams
object

Query parameters to append to the URL.

Example:
{ "filter": "active", "limit": "10" }
body

Request body (max 10MB). Can be string, number, boolean, object, array, or null.

Example:
{ "name": "Test", "value": 123 }

Response

Server-Sent Events stream with test results

Server-Sent Events stream containing test results. Events include: 'connected', 'attempt', 'complete', and 'error'.

event
enum<string>

Type of SSE event.

Available options:
connected,
attempt,
complete,
error
Example:

"attempt"

data
object