API Authentication
Authenticate with the VNS API to initiate outbound calls, retrieve recordings, send SMS messages, and more — all secured with a simple token-based header.
Overview
The VNS API at https://vnsapi.voiceelements.com provides programmatic access to Voice Nexus features beyond the webhook-driven call flow.
Through the API you can:
- • Initiate outbound calls — programmatically place calls to connect a recipient with your AI voice agent.
- • Retrieve recordings — list, download, and delete call recordings.
- • Send SMS messages — send text messages to your customers (coming soon).
All API requests are authenticated using a token-based scheme. You include your API key in an HTTP header with every request — no OAuth flows, no session cookies.
Getting Your API Key
Your API key is available from the Voice Nexus Service web portal.
- 1 Log in to the Voice Nexus Service portal.
- 2 Navigate to your Account Settings or API Keys page.
- 3 Copy the API key displayed on the page. This is the token you will use in every API request.
Using the Token
Pass your API key in the Token HTTP header on every request to the VNS API.
Token: YOUR_API_KEY_HERE
That's it — a single header is all that's required. No Bearer prefix, no authorization scheme. Just the header name Token and your key as the value.
| Header | Value | Required |
|---|---|---|
| Token | Your API key from the VNS portal | Yes — on every request |
Available Endpoints
The following is a summary of the key API endpoints. All requests go to https://vnsapi.voiceelements.com.
| Action | Method | Endpoint |
|---|---|---|
| Initiate outbound call | POST | /api/customer/makecall |
| List recordings | GET | /api/customer/recordings |
| Download a recording | GET | /api/customer/recordings/{sessionGuid} |
| Delete a recording | DELETE | /api/customer/recordings/{sessionGuid} |
| Send SMS coming soon | POST | /api/customer/sms |
For the complete list of endpoints, parameters, and response schemas, see the Swagger documentation.
Code Examples
cURL
curl -X GET "https://vnsapi.voiceelements.com/api/customer/recordings" \
-H "Token: YOUR_API_KEY_HERE"
C# / HttpClient
using var client = new HttpClient();
client.BaseAddress = new Uri("https://vnsapi.voiceelements.com");
client.DefaultRequestHeaders.Add("Token", "YOUR_API_KEY_HERE");
// List recordings
var response = await client.GetAsync("/api/customer/recordings");
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);
JavaScript / fetch
const response = await fetch(
"https://vnsapi.voiceelements.com/api/customer/recordings",
{
headers: { "Token": "YOUR_API_KEY_HERE" }
}
);
const data = await response.json();
console.log(data);
Swagger & Interactive Testing
The VNS API includes a full Swagger UI where you can browse every endpoint, view request/response schemas, and send live test requests directly from your browser.
Open Swagger UIHow to authenticate in Swagger
- 1 Open the Swagger UI.
- 2 Click the Authorize button (lock icon) at the top of the page.
- 3 Enter your API key in the Token field and click Authorize.
- 4 Expand any endpoint, click Try it out, fill in the parameters, and click Execute to send a live request.
GET /api/customer/recordings endpoint first — it requires no request body and will confirm your authentication is set up correctly.
Troubleshooting
401 Unauthorized
The API key is missing or invalid. Verify the header name is exactly Token (case-sensitive) and that the key value matches what is shown in your VNS portal. Make sure there are no extra spaces or line breaks.
403 Forbidden
Your API key is valid but does not have permission for the requested action. Contact Voice Elements support to verify your account permissions.
Connection refused or timeout
Ensure you are using HTTPS and connecting to https://vnsapi.voiceelements.com. Check that your network or firewall is not blocking outbound HTTPS traffic to this host.