API Key & Endpoints
Use your API key to authenticate requests. Keep it secret.
Your API Key
This key is unique to your company and is generated when the company is created. Include it in the Authorization header or as X-API-Key when calling the API.
Select a company to see your API key.
Available Endpoints
Base URL
https://connector.realityborder.com
Authentication
Send your API key in one of these ways:
- Query parameter:
?api_key=YOUR_API_KEY - Header:
Authorization: Bearer YOUR_API_KEY - Header:
X-API-Key: YOUR_API_KEY
1. Get WhatsApp Numbers
Returns the connected/validated WhatsApp numbers for your company.
Endpoint URL
GET https://connector.realityborder.com/api/whatsapp/numbers?api_key=YOUR_API_KEY
cURL Example
curl -X GET "https://connector.realityborder.com/api/whatsapp/numbers?api_key=YOUR_API_KEY"
Returns:
{"success": true, "data": {"whatsapp_numbers": [...]}}
Each WhatsApp number includes: phone_number_id, display_phone_number, verified_name, is_active, verification_status
2. Get Phone Numbers
Returns the phone numbers (phones field) for your company.
Endpoint URL
GET https://connector.realityborder.com/api/phones?api_key=YOUR_API_KEY
cURL Example
curl -X GET "https://connector.realityborder.com/api/phones?api_key=YOUR_API_KEY"
Returns:
{"success": true, "data": {"phones": [...]}}
Array of phone number strings. Empty array if no phones configured.
3. Get Email Addresses
Returns the email addresses (emails field) for your company.
Endpoint URL
GET https://connector.realityborder.com/api/emails?api_key=YOUR_API_KEY
cURL Example
curl -X GET "https://connector.realityborder.com/api/emails?api_key=YOUR_API_KEY"
Returns:
{"success": true, "data": {"emails": [...]}}
Array of email address strings. Empty array if no emails configured.
4. Make Outbound Call
Initiate an outbound call from an authorized phone number to a destination number. The origin phone must be in your company's phones list.
Endpoint URL
POST https://connector.realityborder.com/api/calls/outbound?api_key=YOUR_API_KEY
Request Body
{"from": "origin_phone_number", "to": "destination_phone_number", "call_objective": "What the AI should talk about"}
cURL Example
curl -X POST "https://connector.realityborder.com/api/calls/outbound?api_key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from": "+1234567890", "to": "+0987654321", "call_objective": "Ask for their availability for a meeting"}'
Returns:
{"success": true, "data": {...}}
Returns 403 if the origin phone is not in your company's phones list. Returns 400 if from/to are missing.
5. Create Inbound Call (VoIP)
To handle an inbound voice call with the AI, use two steps: (1) notify the connector via the VoIP webhook, then (2) connect your media server (e.g. Asterisk) to the real-time voice stream WebSocket. The called number must be one of your company's phones so the connector can identify the company.
Step 1 — Webhook (notify call started)
POST to the webhook when a call arrives. This endpoint is protected with a Connector API key (configure on your PBX/media server).
POST https://connector.realityborder.com/api/voip/webhook
Auth: send the key as x-connector-api-key or as a Bearer token in Authorization.
Headers:
x-connector-api-key: YOUR_CONNECTOR_API_KEY
# or
Authorization: Bearer YOUR_CONNECTOR_API_KEY
Request Body (JSON)
{
"callId": "unique-call-id",
"callerPhone": "+1234567890",
"callerName": "Optional caller name",
"b_number": "+34987654321",
"event": "connect",
"websocketUrl": "wss://connector.realityborder.com/api/real-time-voice-stream?callId=..."
}
cURL Example
curl -X POST "https://connector.realityborder.com/api/voip/webhook" \
-H "Content-Type: application/json" \
-H "x-connector-api-key: YOUR_CONNECTOR_API_KEY" \
-d '{
"callId": "unique-call-id",
"callerPhone": "+1234567890",
"b_number": "+34987654321",
"event": "connect",
"websocketUrl": "wss://connector.realityborder.com/api/real-time-voice-stream?callId=unique-call-id&aNumberE164=CALLER_E164&bNumberE164=CALLED_E164"
}'
callId — unique ID for this call. callerPhone / caller_number — caller's number. b_number — called number (must be in your company's phones; used to find the company). companyId — optional; if omitted, company is resolved from b_number. event — use "connect" for new call. websocketUrl — required; use the real-time stream URL, e.g. wss://connector.realityborder.com/api/real-time-voice-stream?callId=...&aNumberE164=...&bNumberE164=.... The webhook responds with 200 immediately; call handling continues asynchronously.
Step 2 — Real-time voice stream (audio)
Your media server (e.g. Asterisk) must open a WebSocket to the connector to send and receive audio. Use the same callId and numbers so the connector can attach the connection to the session created by the webhook.
wss://connector.realityborder.com/api/real-time-voice-stream?callId=UNIQUE_CALL_ID&aNumberE164=CALLER_E164&bNumberE164=CALLED_E164
Query params: callId — same as in the webhook. aNumberE164 — caller number (E.164, without leading +). bNumberE164 — called number (E.164). The connector matches this WebSocket to the session and bridges audio to the AI. Callers must be authorized for the company (e.g. allowed list or balance); otherwise the call is rejected.
Summary
1) POST https://connector.realityborder.com/api/voip/webhook with your Connector API key, call details, and event: "connect". 2) Open wss://connector.realityborder.com/api/real-time-voice-stream with the same callId and number params so audio is bridged. Use event: "terminate" in the webhook when the call ends (optional).
6. Send WhatsApp Template
Send a WhatsApp template message to a recipient. The phone number ID must be authorized for your company.
Endpoint URL
POST https://connector.realityborder.com/api/whatsapp/template?api_key=YOUR_API_KEY
Request Body
{
"phone_number_id": "YOUR_PHONE_NUMBER_ID",
"to": "recipient_phone_number",
"template_name": "hello_world",
"language_code": "es",
"components": []
}
cURL Example
curl -X POST "https://connector.realityborder.com/api/whatsapp/template?api_key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number_id": "123456789",
"to": "+1234567890",
"template_name": "hello_world",
"language_code": "es"
}'
Returns:
{"success": true, "data": {...}}
Returns 403 if the phone number ID is not authorized. Returns 400 if required fields are missing or Meta API returns an error.
📝 Note
All endpoints return empty arrays (not errors) when no data is available.
Responses use 200 for success;
401 for invalid/missing API key;
400 for bad requests;
403 for unauthorized phone numbers;
500 for server errors.
Company Management
Manage your companies and create new ones
Usage Statistics
Track model usage and costs across all your companies and conversations
Daily Cost Trend
Usage by Company
Total usage per company. Click a row to see model breakdown.
| Company / Model / Type | Date | Text | Audio | Est. Cost | ||
|---|---|---|---|---|---|---|
| Input | Output | Input | Output | |||
Usage by Conversation
Detailed usage per conversation.
| Conversation / Model / Type | Date | Text | Audio | Est. Cost | ||
|---|---|---|---|---|---|---|
| Input | Output | Input | Output | |||
Calendar
Manage your events and availability across your connected calendars.
No Calendar Connected
Connect your Google Calendar to view and manage events
January 2026
Syncing with Google Calendar...