Skip to main content
GET
Voice and Phone Numbers
These are dashboard-session endpoints for NearIQ business communication features. They use the signed-in app session, active business scoping, and plan limits. Provider webhooks are server-to-server endpoints and validate the provider signature.
Call recording and voicemail storage may require consent notices depending on the caller location. Keep customer-facing disclosure and retention settings aligned with your legal requirements.

Phone Numbers

GET /api/phone-numbers lists active business phone numbers. Add search=1 with country, type, areaCode, contains, locality, region, smsEnabled, voiceEnabled, mmsEnabled, and limit (up to 50) to search available numbers. POST /api/phone-numbers provisions a number and configures SMS plus voice webhooks. PATCH /api/phone-numbers updates a provisioned number label or promotes it to the primary outbound sender. DELETE /api/phone-numbers?id=<uuid> releases a number and soft-disables it in NearIQ.

Call Forwarding

GET /api/call-forwarding lists forwarding rules for the active business. POST /api/call-forwarding creates a rule. PUT /api/call-forwarding updates a rule. DELETE /api/call-forwarding?id=<uuid> deletes a rule.

Call Logs

GET /api/call-logs returns recent calls for the active business. Optional filters: direction, status, from, to, and limit. Rows include recordingPlaybackUrl when an authenticated recording proxy is available.

Voicemails

GET /api/voicemails returns voicemail rows with transcription text when available and an authenticated recordingPlaybackUrl. PATCH /api/voicemails marks a voicemail read or unread. DELETE /api/voicemails?id=<uuid> deletes a voicemail row.

Voice Webhooks

POST /api/voice/incoming receives inbound calls, logs the call, dials active forwarding rules, and falls back to voicemail recording when no forwarding rule is available. POST /api/voice/status receives call status callbacks and updates call_logs, including voice minute usage for completed calls. POST /api/voice/recording receives recording callbacks and stores call recording or voicemail metadata. GET /api/voice/recording?callLogId=<uuid> or GET /api/voice/recording?voicemailId=<uuid> proxies recording playback for authenticated users without exposing provider recording URLs.

Errors