Getting 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 "Authorization: Bearer YOUR_API_KEY"
import requests
call_id = "call_abc123"
url = f"https://api.huskyvoice.ai/v1/calls/{call_id}"
headers = {"Authorization": "Bearer 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: { "Authorization": "Bearer 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 Authorization and Value to Bearer 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" }
}
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.