call
create-call
POST
/
create-call
create-call
curl --request POST \
--url https://platform.voicelabs.in/api/v1/create-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to_number": "+917987544173",
"dynamic_variables": {
"customer_name": "abhinash",
"dealer_name": "vinod volvo",
"vehicle_no": "K34hjslwn",
"callback_date": "30 june 25",
"callback_time": "12 pm",
"alt_contact_name": "chrome",
"alt_contact_no": "+91n839jf02"
},
"metadata": {
"org_id": "org_398ufn29a",
"user_id": "user_9204jkal"
},
"campaign_id": "903ef554-b54d-4918-964f-dede9cf69f10"
}
'import requests
url = "https://platform.voicelabs.in/api/v1/create-call"
payload = {
"to_number": "+917987544173",
"dynamic_variables": {
"customer_name": "abhinash",
"dealer_name": "vinod volvo",
"vehicle_no": "K34hjslwn",
"callback_date": "30 june 25",
"callback_time": "12 pm",
"alt_contact_name": "chrome",
"alt_contact_no": "+91n839jf02"
},
"metadata": {
"org_id": "org_398ufn29a",
"user_id": "user_9204jkal"
},
"campaign_id": "903ef554-b54d-4918-964f-dede9cf69f10"
}
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({
to_number: '+917987544173',
dynamic_variables: {
customer_name: 'abhinash',
dealer_name: 'vinod volvo',
vehicle_no: 'K34hjslwn',
callback_date: '30 june 25',
callback_time: '12 pm',
alt_contact_name: 'chrome',
alt_contact_no: '+91n839jf02'
},
metadata: {org_id: 'org_398ufn29a', user_id: 'user_9204jkal'},
campaign_id: '903ef554-b54d-4918-964f-dede9cf69f10'
})
};
fetch('https://platform.voicelabs.in/api/v1/create-call', 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://platform.voicelabs.in/api/v1/create-call",
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([
'to_number' => '+917987544173',
'dynamic_variables' => [
'customer_name' => 'abhinash',
'dealer_name' => 'vinod volvo',
'vehicle_no' => 'K34hjslwn',
'callback_date' => '30 june 25',
'callback_time' => '12 pm',
'alt_contact_name' => 'chrome',
'alt_contact_no' => '+91n839jf02'
],
'metadata' => [
'org_id' => 'org_398ufn29a',
'user_id' => 'user_9204jkal'
],
'campaign_id' => '903ef554-b54d-4918-964f-dede9cf69f10'
]),
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://platform.voicelabs.in/api/v1/create-call"
payload := strings.NewReader("{\n \"to_number\": \"+917987544173\",\n \"dynamic_variables\": {\n \"customer_name\": \"abhinash\",\n \"dealer_name\": \"vinod volvo\",\n \"vehicle_no\": \"K34hjslwn\",\n \"callback_date\": \"30 june 25\",\n \"callback_time\": \"12 pm\",\n \"alt_contact_name\": \"chrome\",\n \"alt_contact_no\": \"+91n839jf02\"\n },\n \"metadata\": {\n \"org_id\": \"org_398ufn29a\",\n \"user_id\": \"user_9204jkal\"\n },\n \"campaign_id\": \"903ef554-b54d-4918-964f-dede9cf69f10\"\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://platform.voicelabs.in/api/v1/create-call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to_number\": \"+917987544173\",\n \"dynamic_variables\": {\n \"customer_name\": \"abhinash\",\n \"dealer_name\": \"vinod volvo\",\n \"vehicle_no\": \"K34hjslwn\",\n \"callback_date\": \"30 june 25\",\n \"callback_time\": \"12 pm\",\n \"alt_contact_name\": \"chrome\",\n \"alt_contact_no\": \"+91n839jf02\"\n },\n \"metadata\": {\n \"org_id\": \"org_398ufn29a\",\n \"user_id\": \"user_9204jkal\"\n },\n \"campaign_id\": \"903ef554-b54d-4918-964f-dede9cf69f10\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.voicelabs.in/api/v1/create-call")
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 \"to_number\": \"+917987544173\",\n \"dynamic_variables\": {\n \"customer_name\": \"abhinash\",\n \"dealer_name\": \"vinod volvo\",\n \"vehicle_no\": \"K34hjslwn\",\n \"callback_date\": \"30 june 25\",\n \"callback_time\": \"12 pm\",\n \"alt_contact_name\": \"chrome\",\n \"alt_contact_no\": \"+91n839jf02\"\n },\n \"metadata\": {\n \"org_id\": \"org_398ufn29a\",\n \"user_id\": \"user_9204jkal\"\n },\n \"campaign_id\": \"903ef554-b54d-4918-964f-dede9cf69f10\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200
Successful response
Was this page helpful?
⌘I
create-call
curl --request POST \
--url https://platform.voicelabs.in/api/v1/create-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to_number": "+917987544173",
"dynamic_variables": {
"customer_name": "abhinash",
"dealer_name": "vinod volvo",
"vehicle_no": "K34hjslwn",
"callback_date": "30 june 25",
"callback_time": "12 pm",
"alt_contact_name": "chrome",
"alt_contact_no": "+91n839jf02"
},
"metadata": {
"org_id": "org_398ufn29a",
"user_id": "user_9204jkal"
},
"campaign_id": "903ef554-b54d-4918-964f-dede9cf69f10"
}
'import requests
url = "https://platform.voicelabs.in/api/v1/create-call"
payload = {
"to_number": "+917987544173",
"dynamic_variables": {
"customer_name": "abhinash",
"dealer_name": "vinod volvo",
"vehicle_no": "K34hjslwn",
"callback_date": "30 june 25",
"callback_time": "12 pm",
"alt_contact_name": "chrome",
"alt_contact_no": "+91n839jf02"
},
"metadata": {
"org_id": "org_398ufn29a",
"user_id": "user_9204jkal"
},
"campaign_id": "903ef554-b54d-4918-964f-dede9cf69f10"
}
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({
to_number: '+917987544173',
dynamic_variables: {
customer_name: 'abhinash',
dealer_name: 'vinod volvo',
vehicle_no: 'K34hjslwn',
callback_date: '30 june 25',
callback_time: '12 pm',
alt_contact_name: 'chrome',
alt_contact_no: '+91n839jf02'
},
metadata: {org_id: 'org_398ufn29a', user_id: 'user_9204jkal'},
campaign_id: '903ef554-b54d-4918-964f-dede9cf69f10'
})
};
fetch('https://platform.voicelabs.in/api/v1/create-call', 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://platform.voicelabs.in/api/v1/create-call",
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([
'to_number' => '+917987544173',
'dynamic_variables' => [
'customer_name' => 'abhinash',
'dealer_name' => 'vinod volvo',
'vehicle_no' => 'K34hjslwn',
'callback_date' => '30 june 25',
'callback_time' => '12 pm',
'alt_contact_name' => 'chrome',
'alt_contact_no' => '+91n839jf02'
],
'metadata' => [
'org_id' => 'org_398ufn29a',
'user_id' => 'user_9204jkal'
],
'campaign_id' => '903ef554-b54d-4918-964f-dede9cf69f10'
]),
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://platform.voicelabs.in/api/v1/create-call"
payload := strings.NewReader("{\n \"to_number\": \"+917987544173\",\n \"dynamic_variables\": {\n \"customer_name\": \"abhinash\",\n \"dealer_name\": \"vinod volvo\",\n \"vehicle_no\": \"K34hjslwn\",\n \"callback_date\": \"30 june 25\",\n \"callback_time\": \"12 pm\",\n \"alt_contact_name\": \"chrome\",\n \"alt_contact_no\": \"+91n839jf02\"\n },\n \"metadata\": {\n \"org_id\": \"org_398ufn29a\",\n \"user_id\": \"user_9204jkal\"\n },\n \"campaign_id\": \"903ef554-b54d-4918-964f-dede9cf69f10\"\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://platform.voicelabs.in/api/v1/create-call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to_number\": \"+917987544173\",\n \"dynamic_variables\": {\n \"customer_name\": \"abhinash\",\n \"dealer_name\": \"vinod volvo\",\n \"vehicle_no\": \"K34hjslwn\",\n \"callback_date\": \"30 june 25\",\n \"callback_time\": \"12 pm\",\n \"alt_contact_name\": \"chrome\",\n \"alt_contact_no\": \"+91n839jf02\"\n },\n \"metadata\": {\n \"org_id\": \"org_398ufn29a\",\n \"user_id\": \"user_9204jkal\"\n },\n \"campaign_id\": \"903ef554-b54d-4918-964f-dede9cf69f10\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.voicelabs.in/api/v1/create-call")
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 \"to_number\": \"+917987544173\",\n \"dynamic_variables\": {\n \"customer_name\": \"abhinash\",\n \"dealer_name\": \"vinod volvo\",\n \"vehicle_no\": \"K34hjslwn\",\n \"callback_date\": \"30 june 25\",\n \"callback_time\": \"12 pm\",\n \"alt_contact_name\": \"chrome\",\n \"alt_contact_no\": \"+91n839jf02\"\n },\n \"metadata\": {\n \"org_id\": \"org_398ufn29a\",\n \"user_id\": \"user_9204jkal\"\n },\n \"campaign_id\": \"903ef554-b54d-4918-964f-dede9cf69f10\"\n}"
response = http.request(request)
puts response.read_body