Record an outbound SDK call (browser to phone)
curl --request POST \
--url https://your-instance.example.com/api/calls/sdk/initiate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contactId": "64f0a1b2c3d4e5f6a7b8c9d0",
"phoneNumber": "+14165550199"
}
'import requests
url = "https://your-instance.example.com/api/calls/sdk/initiate"
payload = {
"contactId": "64f0a1b2c3d4e5f6a7b8c9d0",
"phoneNumber": "+14165550199"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contactId: '64f0a1b2c3d4e5f6a7b8c9d0', phoneNumber: '+14165550199'})
};
fetch('https://your-instance.example.com/api/calls/sdk/initiate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/calls/sdk/initiate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contactId' => '64f0a1b2c3d4e5f6a7b8c9d0',
'phoneNumber' => '+14165550199'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/calls/sdk/initiate"
payload := strings.NewReader("{\n \"contactId\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"phoneNumber\": \"+14165550199\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/calls/sdk/initiate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contactId\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"phoneNumber\": \"+14165550199\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/calls/sdk/initiate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contactId\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"phoneNumber\": \"+14165550199\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"call": {
"_id": "64f0a1b2c3d4e5f6a7b8cb00",
"callId": "64f0a1b2c3d4e5f6a7b8cb00",
"provider": "sinch",
"direction": "outbound",
"status": "initiated",
"from": "+14165550100",
"to": "+14165550199"
},
"message": "Call recorded"
}{
"success": false,
"error": "Call not found"
}{
"success": false,
"error": "Call not found"
}Calls
Record an outbound SDK call (browser to phone)
Persists a Call record (and conversation, if a contact is resolved) for a browser-initiated outbound call placed via the active voice provider’s SDK. Either contactId or phoneNumber must be provided; if both are absent the request is rejected. Emits the call_initiated socket event.
POST
/
api
/
calls
/
sdk
/
initiate
Record an outbound SDK call (browser to phone)
curl --request POST \
--url https://your-instance.example.com/api/calls/sdk/initiate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contactId": "64f0a1b2c3d4e5f6a7b8c9d0",
"phoneNumber": "+14165550199"
}
'import requests
url = "https://your-instance.example.com/api/calls/sdk/initiate"
payload = {
"contactId": "64f0a1b2c3d4e5f6a7b8c9d0",
"phoneNumber": "+14165550199"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contactId: '64f0a1b2c3d4e5f6a7b8c9d0', phoneNumber: '+14165550199'})
};
fetch('https://your-instance.example.com/api/calls/sdk/initiate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/calls/sdk/initiate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contactId' => '64f0a1b2c3d4e5f6a7b8c9d0',
'phoneNumber' => '+14165550199'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/calls/sdk/initiate"
payload := strings.NewReader("{\n \"contactId\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"phoneNumber\": \"+14165550199\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your-instance.example.com/api/calls/sdk/initiate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contactId\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"phoneNumber\": \"+14165550199\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/calls/sdk/initiate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contactId\": \"64f0a1b2c3d4e5f6a7b8c9d0\",\n \"phoneNumber\": \"+14165550199\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"call": {
"_id": "64f0a1b2c3d4e5f6a7b8cb00",
"callId": "64f0a1b2c3d4e5f6a7b8cb00",
"provider": "sinch",
"direction": "outbound",
"status": "initiated",
"from": "+14165550100",
"to": "+14165550199"
},
"message": "Call recorded"
}{
"success": false,
"error": "Call not found"
}{
"success": false,
"error": "Call not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Call record created
Available options:
true A Call document. Many fields are provider-specific; clients should be tolerant of additional properties.
Show child attributes
Show child attributes
Example:
{
"_id": "64f0a1b2c3d4e5f6a7b8cb00",
"callId": "64f0a1b2c3d4e5f6a7b8cb00",
"provider": "sinch",
"providerCallId": "sinch-call-abc123",
"direction": "outbound",
"status": "completed",
"from": "+14165550100",
"to": "+14165550199",
"contactId": "64f0a1b2c3d4e5f6a7b8c9d0",
"conversationId": "64f0a1b2c3d4e5f6a7b8c9e0",
"organizationId": "64f0a1b2c3d4e5f6a7b8c9d3",
"userId": "64f0a1b2c3d4e5f6a7b8c9d4",
"providerPhoneNumber": "+14165550100",
"startTime": "2026-05-15T09:10:00.000Z",
"answerTime": "2026-05-15T09:10:08.000Z",
"endTime": "2026-05-15T09:12:34.000Z",
"duration": 154,
"recordings": [],
"createdAt": "2026-05-15T09:10:00.000Z",
"updatedAt": "2026-05-15T09:12:34.000Z"
}
⌘I