Creating Conversations
HuskyVoice AI allows you to initiate voice conversations programmatically. You can trigger calls using either our REST API for custom applications or Inbound Webhooks for no-code tools.
Before You Begin
Make sure you have completed these three steps before initiating a call. If any of these are missing, your call will not go through.
Step 1 — Create an Outbound Agent
An Agent is your AI voice assistant — it handles the conversation on your behalf. You need at least one Outbound Agent set up in your HuskyVoice dashboard before making any calls.
Go to Dashboard → Agents → Create Agent and select Outbound as the type.
Step 2 — Assign a Phone Number to the Agent
Your agent needs a phone number to call from. Without an assigned number, calls cannot be placed.
Go to Dashboard → Agents → Select your Agent → Phone Numbers → Assign Number.
Step 3 — Generate an API Key
An API Key is a unique password that lets your application talk to HuskyVoice securely. You need this to authenticate your requests.
Go to Dashboard → Integrations → API Keys → Generate New Key. Copy and store it safely — it will not be shown again.
If you are using a no-code tool like Zapier or HubSpot, you only need Steps 1 and 2. Use the Inbound Webhook tab below instead of the REST API.
- REST API (API Keys)
- Inbound Webhook
1. Using the REST API
Best for developers building custom applications. Authenticate using your API Key.
- cURL
- Python
- JavaScript
- n8n
curl -s -X POST https://api.huskyvoice.ai/v1/calls \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_123",
"contact_number": "+1234567890",
"additional_info": {
"customer_name": "Charlie",
"purpose": "Appointment Confirmation"
}
}'
import requests
url = "https://api.huskyvoice.ai/v1/calls"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"agent_id": "agent_123",
"contact_number": "+1234567890",
"additional_info": {
"customer_name": "Charlie",
"purpose": "Appointment Confirmation"
}
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.huskyvoice.ai/v1/calls", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
agent_id: "agent_123",
contact_number: "+1234567890",
additional_info: {
customer_name: "Charlie",
purpose: "Appointment Confirmation"
}
})
});
const data = await response.json();
console.log(data);
Create an HTTP Header Auth credential in n8n: set Name to Authorization and Value to Bearer YOUR_API_KEY. Select it in the HTTP Request node's Authentication field.
{
"name": "HuskyVoice – Create Call",
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://api.huskyvoice.ai/v1/calls",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"agent_id\": \"agent_123\",\n \"contact_number\": \"+1234567890\",\n \"additional_info\": {\n \"customer_name\": \"Charlie\",\n \"purpose\": \"Appointment Confirmation\"\n }\n}"
},
"id": "1",
"name": "Create Call",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [250, 300]
}
],
"connections": {},
"settings": {},
"meta": { "instanceId": "huskyvoice-docs" }
}
Sample Response:
{
"success": true,
"call_id": "call_abc123",
"status": "queued",
"message": "Call has been queued successfully."
}
2. Using Inbound Webhooks
Ideal for Zapier, HubSpot, or any system that can send a POST request.
- Endpoint:
https://api.huskyvoice.ai/v1/hooks/{YOUR_SECRET_TOKEN} - Method:
POST
- cURL
- Python
- JavaScript
- n8n
curl -X POST https://api.huskyvoice.ai/v1/hooks/YOUR_SECRET_TOKEN \
-H "Content-Type: application/json" \
-d '{
"action": "call.create",
"data": {
"agent_id": "agent_123",
"contact_number": "+1234567890",
"contact_name": "Charlie"
}
}'
import requests
url = "https://api.huskyvoice.ai/v1/hooks/YOUR_SECRET_TOKEN"
payload = {
"action": "call.create",
"data": {
"agent_id": "agent_123",
"contact_number": "+1234567890",
"contact_name": "Charlie"
}
}
response = requests.post(url, json=payload)
print(response.json())
const response = await fetch(
"https://api.huskyvoice.ai/v1/hooks/YOUR_SECRET_TOKEN",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
action: "call.create",
data: {
agent_id: "agent_123",
contact_number: "+1234567890",
contact_name: "Charlie"
}
})
}
);
const data = await response.json();
console.log(data);
Authentication uses the secret token embedded in the URL. No separate credential setup is required in n8n.
{
"name": "HuskyVoice – Trigger Call via Inbound Webhook",
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://api.huskyvoice.ai/v1/hooks/YOUR_SECRET_TOKEN",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"action\": \"call.create\",\n \"data\": {\n \"agent_id\": \"agent_123\",\n \"contact_number\": \"+1234567890\",\n \"contact_name\": \"Charlie\"\n }\n}"
},
"id": "1",
"name": "Trigger Call",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [250, 300]
}
],
"connections": {},
"settings": {},
"meta": { "instanceId": "huskyvoice-docs" }
}
What Happens Next?
Once your call is initiated, HuskyVoice queues it and connects the agent to the contact. You can track the live status and outcome of the call via Call Status.
Save the call_id from the response — you'll need it to fetch status updates or cancel the call later.
Technical Details
| Field | Required | Description |
|---|---|---|
contact_number | Yes | The target phone number with country code (e.g., +91XXXXXXXXXX). |
agent_id | Yes | The unique ID of the AI agent to use for this call. |
additional_info | No | A JSON object containing variables your agent can reference during the call. |
Using additional_info in Your Agent Prompt
The fields you pass in additional_info can be used directly inside your agent's prompt using double curly braces {{ }}. This lets your agent personalise the conversation for each contact.
Example — passing additional info in the API call:
{
"agent_id": "agent_123",
"contact_number": "+1234567890",
"additional_info": {
"customer_name": "Charlie",
"appointment_date": "12th May 2026",
"purpose": "Appointment Confirmation"
}
}
Example — referencing them inside your agent prompt:
Hi {{customer_name}}, this is a reminder that your appointment is scheduled for {{appointment_date}}.
The purpose of your visit is {{purpose}}. Please confirm if you will be attending.
What the agent will say:
"Hi Charlie, this is a reminder that your appointment is scheduled for 12th May 2026. The purpose of your visit is Appointment Confirmation. Please confirm if you will be attending."
You can pass up to 25 key-value pairs in additional_info. Use clear, descriptive key names so your agent prompt stays readable.