SDK + code samples (Node, Python, PHP, curl)

Copy-paste working code for the most common VoxReach API operations.

01

Auth pattern (all languages)

  • Always: Authorization: Bearer
  • Always: Content-Type: application/json
  • Read API key from env var, never hard-code.
02

Trigger a call (Node.js)

  • See /help/trigger-call-via-api for the snippet.
  • Returns call_id within 200ms. Listen for call.ended webhook for the result.
03

Bulk upload leads (Python)

  • import requests
  • r = requests.post('https://app.voxreach.com.au/api/v1/leads',
  • headers={'Authorization': f'Bearer {KEY}', 'Content-Type': 'application/json'},
  • json={'campaign_id': '', 'leads': [{'name':'Jane', 'phone':'+614…', 'email':'jane@…'}]})
04

Send SMS (PHP)

  • $ch = curl_init('https://app.voxreach.com.au/api/v1/sms');
  • curl_setopt_array($ch, [CURLOPT_POST=>true, CURLOPT_POSTFIELDS=>json_encode([
  • 'from_number_id'=>'', 'to'=>'+614…', 'body'=>'Hi from us'
  • ]), CURLOPT_HTTPHEADER=>['Authorization: Bearer '.$KEY, 'Content-Type: application/json'], CURLOPT_RETURNTRANSFER=>true]);
05

Polling for call result (curl)

  • curl -H 'Authorization: Bearer …' https://app.voxreach.com.au/api/v1/calls/
  • Returns full call record once status=ended.
  • Better: subscribe to webhook for push notification.

Still stuck?

Email hello@voxreach.com.au — we reply within 2 business hours during AEST hours.

Open a ticket