Call Status
Track the real-time progress of your voice conversations using the HuskyVoice API or by monitoring state changes.
- cURL
- Python
- JavaScript
- n8n
curl -s https://api.huskyvoice.ai/v1/calls/call_abc123 \
-H "x-api-key: YOUR_API_KEY"
import requests
call_id = "call_abc123"
url = f"https://api.huskyvoice.ai/v1/calls/{call_id}"
headers = {"x-api-key": "YOUR_API_KEY"}
response = requests.get(url, headers=headers)
data = response.json()["data"]
print(f"Current State: {data['status']}")
const callId = "call_abc123";
const res = await fetch(`https://api.huskyvoice.ai/v1/calls/${callId}`, {
headers: { "x-api-key": "YOUR_API_KEY" }
});
const { data } = await res.json();
console.log(`Current State: ${data.status}`);
Credential setup
Create an HTTP Header Auth credential in n8n: set Name to x-api-key and Value to YOUR_API_KEY. Select it in the HTTP Request node's Authentication field.
{
"name": "HuskyVoice – Get Call Status",
"nodes": [
{
"parameters": {
"method": "GET",
"url": "https://api.huskyvoice.ai/v1/calls/call_abc123",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"id": "1",
"name": "Get Call Status",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [250, 300]
}
],
"connections": {},
"settings": {},
"meta": { "instanceId": "huskyvoice-docs" }
}
Sample Response:
{
"data": {
"call_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "in_progress",
"agent_id": "agent_123",
"contact_number": "+919876543210",
"contact_name": "Raj Patel",
"contact_email": "raj@company.com",
"additional_info": { "company": "Acme Corp" },
"scheduled_at": "2024-01-27T03:02:00.000Z",
"completed_at": null,
"error": null,
"created_at": "2024-01-27T03:00:00.000Z",
"updated_at": "2024-01-27T03:00:00.000Z"
}
}
Response Fields
| Field | Description |
|---|---|
call_id | Unique identifier for the call. |
status | Current lifecycle state — see Call States below. |
agent_id | The AI agent assigned to this call. |
contact_number | The destination phone number in E.164 format. |
contact_name | Name of the contact, if provided at creation. |
contact_email | Email of the contact, if provided at creation. |
additional_info | Custom key-value pairs passed in at creation. |
scheduled_at | When the call was scheduled to start. |
completed_at | When the call finished, or null if not yet completed. |
error | Error details if the call failed, otherwise null. |
created_at / updated_at | Record creation and last-update timestamps. |
Call States
Every HuskyVoice conversation moves through a defined lifecycle. You can use these states to trigger custom business logic in your application.
| State | Description |
|---|---|
initiated | The request has been received and is waiting for the telephony bridge. |
ringing | The destination phone is currently ringing. |
in_progress | The AI agent and the user are actively talking. |
completed | The conversation has finished successfully. |
failed | The call could not be completed (e.g., busy signal, invalid number). |
cancelled | The call was stopped by your system before it was answered. |
Monitoring Tip
For high-volume integrations, we recommend using Outbound Webhooks to receive state changes automatically instead of polling the API. See the Common Use Cases guide for details on how to set these up.