Skip to main content

ZeroVoice API Reference

Base URL: https://your-instance.up.railway.app

All endpoints require authentication via Authorization: Bearer <JWT> or X-API-Key: <key> header.


Calls

Place outbound call

POST /api/v1/calls/outbound
FieldTypeRequiredDescription
from_numberstringYesE.164 caller ID or Number ID
to_numberstringYesE.164 destination number
recordbooleanNoRecord the call (default: false)
queue_idUUIDNoRoute through a specific queue
status_callback_urlstringNoWebhook URL for status updates

Get live calls

GET /api/v1/calls/live?queue_id=<uuid>&agent_id=<uuid>

Search call logs

GET /api/v1/calls/logs?from=<number>&to=<number>&direction=<inbound|outbound>&disposition=<value>&date_start=<iso>&date_end=<iso>&page=1&limit=25

Get call by ID

GET /api/v1/calls/{call_id}

Transfer call

POST /api/v1/calls/{call_id}/transfer

Body: {"target_number": "+15551234567", "transfer_type": "warm"}

Hang up call

POST /api/v1/calls/{call_id}/hangup

Get call recordings

GET /api/v1/calls/{call_id}/recordings

Get call notes

GET /api/v1/calls/{call_id}/notes

SMS

Send SMS

POST /api/v1/sms/send
FieldTypeRequiredDescription
from_numberstringYesE.164 sender number
to_numberstringYesE.164 recipient
bodystringYesMessage text (max 1600 chars)
media_urlsstring[]NoMedia URLs for MMS
status_callback_urlstringNoWebhook URL for delivery status

DNC enforcement: Outbound SMS to numbers on the org's Do-Not-Call list returns HTTP 451.


Contacts

Create contact

POST /api/v1/contacts
FieldTypeRequiredDescription
namestringYesFull name
phonestringYesE.164 phone number
emailstringNoEmail address
companystringNoCompany name
tagsstring[]NoCategorization tags

List contacts

GET /api/v1/contacts?search=<term>&page=1&limit=25

Get contact call history

GET /api/v1/contacts/{contact_id}/calls

Phone Numbers

List numbers

GET /api/v1/numbers?page=1&limit=25

Search available numbers

POST /api/v1/numbers/search
FieldTypeRequiredDescription
countrystringYesISO country code (US, CA, GB)
number_typestringYeslocal, toll_free, or mobile
area_codestringNoDesired area code
containsstringNoPattern to match
limitintegerNoMax results (1-50, default 20)

Purchase number

POST /api/v1/numbers/purchase

Body: {"phone_number": "+18005551234", "friendly_name": "Support Line"}

Configure number routing

PUT /api/v1/numbers/{number_id}/config

Body: {"friendly_name": "Main", "routing": {"type": "ivr", "target_id": "..."}}

Release number

DELETE /api/v1/numbers/{number_id}

Transcripts

Get transcript by call

GET /api/v1/transcripts/call/{call_id}

Search transcripts

GET /api/v1/transcripts/search?q=<query>&page=1&limit=25

List transcripts

GET /api/v1/transcripts?page=1&limit=25

Voicemails

List voicemails

GET /api/v1/voicemails?status=<new|read|archived>&page=1&limit=25

Get voicemail

GET /api/v1/voicemails/{voicemail_id}

Compliance

Check DNC status

GET /api/v1/compliance/dnc?phone=<e164_number>

List DNC numbers

GET /api/v1/compliance/dnc?page=1&limit=25

GDPR export request

POST /api/v1/compliance/gdpr/export

GDPR delete request

POST /api/v1/compliance/gdpr/delete

Analytics

Call volume

GET /api/v1/analytics/call-volume?interval=<hour|day|week|month>&date_start=<iso>&date_end=<iso>

Agent performance

GET /api/v1/analytics/agent-performance?date_start=<iso>&date_end=<iso>

Queue reports

GET /api/v1/analytics/queue-reports

Disposition distribution

GET /api/v1/analytics/dispositions

Sentiment analysis

GET /api/v1/analytics/sentiment/{call_id}

Health

Liveness (no auth)

GET /health

Readiness (no auth)

GET /health/ready

Checks: database, Twilio, Stripe, ZeroDB. Returns 200 when all healthy, 503 on failure.


Error responses

All errors follow this format:

{
"error": "Bad Request",
"code": "bad_request",
"details": { "field": "to_number", "message": "Invalid E.164 format" }
}
CodeMeaning
400Invalid request parameters
401Missing or invalid authentication
403Insufficient permissions
404Resource not found
422Validation error
429Rate limit exceeded (200 req/min per tenant)
451Blocked by compliance (DNC list)
503Service unavailable (Twilio circuit breaker open)