Developer documentation and APIs
Build telephony voice applications that speak native Nigerian languages. Integrate via REST endpoints or connect directly to real time streaming WebSockets with under 500 millisecond turnaround.
Developer platform overview
VoiceReach handles the complex telephony and signal processing layers including Asterisk SIP trunking, 8kHz to 16kHz audio resampling, voice activity detection, streaming speech recognition, and low latency voice synthesis. Your code interacts with clean HTTP and WebSocket APIs.
| Component | Protocol | Endpoint Description |
|---|---|---|
| Application Registry | REST HTTP | Register business phone lines, escalation contacts, and language defaults |
| Voice Gateway | WSS WebSockets | Stream raw 8kHz PCM audio frames and receive real time synthesized speech events |
| Session State | REST HTTP | Inspect live active calls, extracted caller slots, and confidence scores |
| Webhook Callback | HTTPS POST | Receive event notifications when calls conclude, escalate, or require database actions |
Authentication
All developer API endpoints require an API key header:
X-API-Key: vr_live_your_secret_key
Quickstart code example
Register a new agricultural advisory hotline programmatically in Python:
import requests
url = "https://api.voicereach.app/v1/applications"
headers = {
"X-API-Key": "vr_live_your_secret_key",
"Content-Type": "application/json"
}
payload = {
"id": "kaduna_health_triage",
"name": "Kaduna Maternal Health Hotline",
"industry": "healthcare",
"phone_number": "+2348031114444",
"escalation_contact": "+2348039995555",
"flow_config_slug": "healthcare",
"language_defaults": ["hausa", "nigerian_english"]
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
WebSocket audio streaming protocol
To connect telephony trunks directly to our low latency pipeline, open a WebSocket connection to the voice gateway:
wss://api.voicereach.app/ws/voice?app_id=your_app_id
Stream raw 8kHz 16 bit linear PCM audio frames. The engine emits structured JSON events detailing caller transcription, conversational intent, and synthesized binary audio packets ready for playback over standard telephony channels.