API Documentation

Build voice campaigns into your applications with the Voxlancer REST API.

Base URL: https://voxlancer-api.proxy.litevps.dev/api

Quick Reference

Auth Methods
Bearer <jwt> — JWT from login
Bearer vxf_<key> — API key
Response Format
All responses are JSON
Timestamps in ISO 8601 UTC
UUIDs as primary keys
Status Codes
200 OK · 201 Created · 204 No Content
400 Bad Request · 401 Unauthorized
403 Forbidden · 404 Not Found · 500 Error
Errors
{"error": "message"}

Authentication

Voxlancer supports two authentication methods: JWT tokens (from login) and API keys (prefixed vxf_). Pass either in the Authorization header.

Authorization: Bearer <your_token>

MethodPathAuth
POST/api/auth/registerNo
POST/api/auth/loginNo
GET/api/auth/meYes

Register

POST/api/auth/registerRegister a new customer account
Request Body
{
  "email": "user@example.com",
  "password": "yourpassword123",
  "company_name": "My Company"
}
Response
{
  "id": "uuid",
  "email": "user@example.com",
  "balance": "0",
  "status": "pending_review",
  "manual_review_flag": true,
  "created_at": "2026-03-22T10:00:00Z"
}

Login

POST/api/auth/loginAuthenticate and receive a JWT token
Request Body
{
  "email": "user@example.com",
  "password": "yourpassword123"
}
Response
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "customer": {
    "id": "uuid",
    "email": "user@example.com",
    "balance": "10.00",
    "status": "active"
  }
}

API Keys

API keys allow programmatic access to your Voxlancer account without using your login credentials. Keys are prefixed with vxf_ and can be assigned granular permissions.

MethodPathAuth
GET/api/api-keysYes
POST/api/api-keysYes
DELETE/api/api-keys/:idYes

Create API Key

POST/api/api-keysGenerate a new API key
Request Body
{
  "name": "Production Key",
  "permissions": ["campaigns:read", "campaigns:write", "contacts:write"]
}
Response
{
  "id": "uuid",
  "name": "Production Key",
  "key": "vxf_a86655a2b0bbc212acd...",
  "key_prefix": "vxf_vxf_a866",
  "permissions": ["campaigns:read", "campaigns:write"],
  "created_at": "2026-03-22T10:00:00Z"
}

List API Keys

GET/api/api-keysList all API keys (key value only shown on creation)
Response
[
  {
    "id": "uuid",
    "name": "Production Key",
    "key_prefix": "vxf_vxf_a866",
    "permissions": ["campaigns:read"],
    "created_at": "2026-03-22T10:00:00Z"
  }
]

Revoke API Key

DELETE/api/api-keys/:idPermanently revoke an API key
Response
204 No Content

Store your key securely

The full key value is only shown once upon creation. Save it immediately — it cannot be retrieved later.

Billing

MethodPathAuth
GET/api/billing/balanceYes
POST/api/billing/add-creditYes
GET/api/billing/transactionsYes
GET/api/billing/usageYes

Get Balance

GET/api/billing/balanceGet account balance
Response
{ "balance": "10.00" }

Add Credit

POST/api/billing/add-creditAdd credit to your account
Request Body
{
  "amount": 50.00,
  "stripe_token": "tok_..."
}
Response
{
  "id": "uuid",
  "type": "credit_added",
  "amount": "50.00",
  "balance_after": "60.00",
  "description": "Added $50.00 credit",
  "created_at": "2026-03-22T10:00:00Z"
}

Get Transactions

GET/api/billing/transactionsList account transactions
Response
[
  {
    "id": "uuid",
    "type": "credit_added",
    "amount": "50.00",
    "balance_after": "60.00",
    "description": "Added $50.00 credit",
    "created_at": "2026-03-22T10:00:00Z"
  }
]

Get Usage

GET/api/billing/usageGet usage statistics
Response
{
  "total_calls": 150,
  "total_minutes": 45.5,
  "total_spent": "0.91"
}

Campaigns

MethodPathAuth
GET/api/campaignsYes
POST/api/campaignsYes
GET/api/campaigns/:idYes
PUT/api/campaigns/:idYes
DELETE/api/campaigns/:idYes
POST/api/campaigns/:id/startYes
POST/api/campaigns/:id/pauseYes
POST/api/campaigns/:id/resumeYes
POST/api/campaigns/:id/stopYes
GET/api/campaigns/:id/statsYes
POST/api/campaigns/:id/retry-failedYes

Create Campaign

POST/api/campaignsCreate a new voice campaign
Request Body
{
  "name": "My Campaign",
  "tts_message": "Hello, this is an important message from your healthcare provider.",
  "tts_voice": "en-US",
  "caller_id": "uuid-of-verified-number",
  "tcpa_consent": true,
  "schedule_start": "2026-03-22T10:00:00Z",
  "schedule_end": "2026-03-29T10:00:00Z",
  "calling_hours_start": "09:00",
  "calling_hours_end": "21:00",
  "max_concurrent": 5
}
Response
{
  "id": "uuid",
  "name": "My Campaign",
  "status": "draft",
  "tts_message": "...",
  "tts_voice": "en-US",
  "caller_id": "uuid",
  "total_contacts": 0,
  "created_at": "2026-03-22T10:00:00Z"
}

Campaign Stats

GET/api/campaigns/:id/statsGet campaign statistics
Response
{
  "campaign_id": "uuid",
  "total_contacts": 100,
  "pending": 0,
  "queued": 0,
  "called": 95,
  "failed": 3,
  "no_answer": 2,
  "opted_out": 0,
  "total_duration_seconds": 1425,
  "total_cost": "0.47",
  "answered_rate": 0.95
}

Campaign Statuses

draft — Created but not startedrunning — Actively callingpaused — Paused mid-campaigncompleted — All contacts processed

Contacts

MethodPathAuth
GET/api/campaigns/:id/contactsYes
POST/api/campaigns/:id/contacts/uploadYes
POST/api/campaigns/:id/contactsYes
DELETE/api/campaigns/:id/contacts/:contact_idYes

Upload Contacts (CSV)

POST/api/campaigns/:id/contacts/uploadUpload contacts via CSV file
Request Body
Content-Type: multipart/form-data
file: <CSV file>

CSV format:
phone_number
+15551234567
+15559876543
Response
{
  "uploaded": 150,
  "duplicates_skipped": 2,
  "invalid_skipped": 1,
  "contacts": [...]
}

Add Single Contact

POST/api/campaigns/:id/contactsAdd one contact to a campaign
Request Body
{ "phone_number": "+15551234567" }
Response
{
  "id": "uuid",
  "campaign_id": "uuid",
  "phone_number": "+15551234567",
  "status": "pending",
  "attempts": 0,
  "created_at": "2026-03-22T10:00:00Z"
}

Phone Number Format

All phone numbers must be in E.164 format (e.g., +15551234567).

Caller IDs

Manage the phone numbers used as the caller ID for outbound campaigns.

MethodPathAuth
GET/api/caller-idsYes
POST/api/caller-idsYes
DELETE/api/caller-ids/:idYes

Add Caller ID

POST/api/caller-idsRegister a new caller ID number
Request Body
{ "phone_number": "+15551234567" }
Response
{
  "id": "uuid",
  "customer_id": "uuid",
  "phone_number": "+15551234567",
  "verified": false,
  "created_at": "2026-03-22T10:00:00Z"
}

Text-to-Speech

MethodPathAuth
GET/api/tts/voicesYes
POST/api/tts/previewYes

List Voices

GET/api/tts/voicesGet available TTS voices
Response
{ "voices": ["en-US", "en-GB", "en-AU", "en"] }

Preview TTS

POST/api/tts/previewGenerate TTS audio for preview
Request Body
{
  "text": "Hello, this is a test of the Voxlancer text to speech system.",
  "voice": "en-US"
}
Response
Content-Type: audio/wav

<binary WAV audio data>