Getting Started
Use a VoiceAgent API key to call the public v1 API from your backend service.
Base URL
The public API uses URL major versioning. Use this base URL for examples until the production domain is confirmed:
https://api.voiceagent.example/api/v1/
Quick Start
- Open the Dashboard and go to
/api-keys. -
Create a key and copy the secret value. VoiceAgent API keys start with
vak_. - Call
GET /api/v1/agentsfrom your backend.
cURL
export VOICEAGENT_API_KEY="vak_replace_with_your_key"
curl -sS "https://api.voiceagent.example/api/v1/agents" \
-H "Authorization: Bearer ${VOICEAGENT_API_KEY}"
Node.js
const apiKey = process.env.VOICEAGENT_API_KEY;
if (!apiKey) {
throw new Error("Set VOICEAGENT_API_KEY to your vak_ API key");
}
const response = await fetch("https://api.voiceagent.example/api/v1/agents", {
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const body = await response.json();
if (!response.ok) {
throw new Error(`${response.status} ${body.error?.code}: ${body.error?.message}`);
}
console.log(body);
Python
import os
import requests
api_key = os.environ["VOICEAGENT_API_KEY"]
response = requests.get(
"https://api.voiceagent.example/api/v1/agents",
headers={"X-API-Key": api_key},
timeout=30,
)
response.raise_for_status()
print(response.json())
Authentication Headers
VoiceAgent accepts either of these headers for API key authentication:
Authorization: Bearer vak_...
X-API-Key: vak_...
Prefer Authorization: Bearer for new integrations. X-API-Key
is supported for environments where bearer auth is hard to configure.
Next Steps
Read Authentication for key handling, Error handling for the canonical error envelope, and Pagination before building list views.