Create an outreach request
curl --request POST \
--url https://staging.sdk.aurorax.co/api/v1/requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"objective": "<string>",
"user_details": {
"phone_number": "<string>",
"full_name": "<string>"
},
"targets": [
{
"phone_number": "<string>",
"name": "<string>",
"is_business": true
}
],
"target_options": {
"auto_discover_relevant_businesses": true,
"search_location": {
"address": "<string>",
"coordinates": {
"lat": 0,
"lng": 0
}
},
"radius": 250050
},
"personalisation_options": {
"caller_id": "<string>",
"voice_preference": {
"gender": "auto"
}
},
"webhook_uri": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://staging.sdk.aurorax.co/api/v1/requests"
payload = {
"objective": "<string>",
"user_details": {
"phone_number": "<string>",
"full_name": "<string>"
},
"targets": [
{
"phone_number": "<string>",
"name": "<string>",
"is_business": True
}
],
"target_options": {
"auto_discover_relevant_businesses": True,
"search_location": {
"address": "<string>",
"coordinates": {
"lat": 0,
"lng": 0
}
},
"radius": 250050
},
"personalisation_options": {
"caller_id": "<string>",
"voice_preference": { "gender": "auto" }
},
"webhook_uri": "<string>",
"idempotency_key": "<string>"
}
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({
objective: '<string>',
user_details: {phone_number: '<string>', full_name: '<string>'},
targets: [{phone_number: '<string>', name: '<string>', is_business: true}],
target_options: {
auto_discover_relevant_businesses: true,
search_location: {address: '<string>', coordinates: {lat: 0, lng: 0}},
radius: 250050
},
personalisation_options: {caller_id: '<string>', voice_preference: {gender: 'auto'}},
webhook_uri: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://staging.sdk.aurorax.co/api/v1/requests', 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://staging.sdk.aurorax.co/api/v1/requests",
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([
'objective' => '<string>',
'user_details' => [
'phone_number' => '<string>',
'full_name' => '<string>'
],
'targets' => [
[
'phone_number' => '<string>',
'name' => '<string>',
'is_business' => true
]
],
'target_options' => [
'auto_discover_relevant_businesses' => true,
'search_location' => [
'address' => '<string>',
'coordinates' => [
'lat' => 0,
'lng' => 0
]
],
'radius' => 250050
],
'personalisation_options' => [
'caller_id' => '<string>',
'voice_preference' => [
'gender' => 'auto'
]
],
'webhook_uri' => '<string>',
'idempotency_key' => '<string>'
]),
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://staging.sdk.aurorax.co/api/v1/requests"
payload := strings.NewReader("{\n \"objective\": \"<string>\",\n \"user_details\": {\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\"\n },\n \"targets\": [\n {\n \"phone_number\": \"<string>\",\n \"name\": \"<string>\",\n \"is_business\": true\n }\n ],\n \"target_options\": {\n \"auto_discover_relevant_businesses\": true,\n \"search_location\": {\n \"address\": \"<string>\",\n \"coordinates\": {\n \"lat\": 0,\n \"lng\": 0\n }\n },\n \"radius\": 250050\n },\n \"personalisation_options\": {\n \"caller_id\": \"<string>\",\n \"voice_preference\": {\n \"gender\": \"auto\"\n }\n },\n \"webhook_uri\": \"<string>\",\n \"idempotency_key\": \"<string>\"\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://staging.sdk.aurorax.co/api/v1/requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"objective\": \"<string>\",\n \"user_details\": {\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\"\n },\n \"targets\": [\n {\n \"phone_number\": \"<string>\",\n \"name\": \"<string>\",\n \"is_business\": true\n }\n ],\n \"target_options\": {\n \"auto_discover_relevant_businesses\": true,\n \"search_location\": {\n \"address\": \"<string>\",\n \"coordinates\": {\n \"lat\": 0,\n \"lng\": 0\n }\n },\n \"radius\": 250050\n },\n \"personalisation_options\": {\n \"caller_id\": \"<string>\",\n \"voice_preference\": {\n \"gender\": \"auto\"\n }\n },\n \"webhook_uri\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.sdk.aurorax.co/api/v1/requests")
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 \"objective\": \"<string>\",\n \"user_details\": {\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\"\n },\n \"targets\": [\n {\n \"phone_number\": \"<string>\",\n \"name\": \"<string>\",\n \"is_business\": true\n }\n ],\n \"target_options\": {\n \"auto_discover_relevant_businesses\": true,\n \"search_location\": {\n \"address\": \"<string>\",\n \"coordinates\": {\n \"lat\": 0,\n \"lng\": 0\n }\n },\n \"radius\": 250050\n },\n \"personalisation_options\": {\n \"caller_id\": \"<string>\",\n \"voice_preference\": {\n \"gender\": \"auto\"\n }\n },\n \"webhook_uri\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"status": "processing",
"created_at": "2023-11-07T05:31:56Z"
}Requests
Create an outreach request
Start an asynchronous voice outreach request on behalf of an end user. Pass Idempotency-Key (or idempotency_key in the JSON body) to safely retry without launching duplicate outreach campaigns.
POST
/
api
/
v1
/
requests
Create an outreach request
curl --request POST \
--url https://staging.sdk.aurorax.co/api/v1/requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"objective": "<string>",
"user_details": {
"phone_number": "<string>",
"full_name": "<string>"
},
"targets": [
{
"phone_number": "<string>",
"name": "<string>",
"is_business": true
}
],
"target_options": {
"auto_discover_relevant_businesses": true,
"search_location": {
"address": "<string>",
"coordinates": {
"lat": 0,
"lng": 0
}
},
"radius": 250050
},
"personalisation_options": {
"caller_id": "<string>",
"voice_preference": {
"gender": "auto"
}
},
"webhook_uri": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://staging.sdk.aurorax.co/api/v1/requests"
payload = {
"objective": "<string>",
"user_details": {
"phone_number": "<string>",
"full_name": "<string>"
},
"targets": [
{
"phone_number": "<string>",
"name": "<string>",
"is_business": True
}
],
"target_options": {
"auto_discover_relevant_businesses": True,
"search_location": {
"address": "<string>",
"coordinates": {
"lat": 0,
"lng": 0
}
},
"radius": 250050
},
"personalisation_options": {
"caller_id": "<string>",
"voice_preference": { "gender": "auto" }
},
"webhook_uri": "<string>",
"idempotency_key": "<string>"
}
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({
objective: '<string>',
user_details: {phone_number: '<string>', full_name: '<string>'},
targets: [{phone_number: '<string>', name: '<string>', is_business: true}],
target_options: {
auto_discover_relevant_businesses: true,
search_location: {address: '<string>', coordinates: {lat: 0, lng: 0}},
radius: 250050
},
personalisation_options: {caller_id: '<string>', voice_preference: {gender: 'auto'}},
webhook_uri: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://staging.sdk.aurorax.co/api/v1/requests', 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://staging.sdk.aurorax.co/api/v1/requests",
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([
'objective' => '<string>',
'user_details' => [
'phone_number' => '<string>',
'full_name' => '<string>'
],
'targets' => [
[
'phone_number' => '<string>',
'name' => '<string>',
'is_business' => true
]
],
'target_options' => [
'auto_discover_relevant_businesses' => true,
'search_location' => [
'address' => '<string>',
'coordinates' => [
'lat' => 0,
'lng' => 0
]
],
'radius' => 250050
],
'personalisation_options' => [
'caller_id' => '<string>',
'voice_preference' => [
'gender' => 'auto'
]
],
'webhook_uri' => '<string>',
'idempotency_key' => '<string>'
]),
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://staging.sdk.aurorax.co/api/v1/requests"
payload := strings.NewReader("{\n \"objective\": \"<string>\",\n \"user_details\": {\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\"\n },\n \"targets\": [\n {\n \"phone_number\": \"<string>\",\n \"name\": \"<string>\",\n \"is_business\": true\n }\n ],\n \"target_options\": {\n \"auto_discover_relevant_businesses\": true,\n \"search_location\": {\n \"address\": \"<string>\",\n \"coordinates\": {\n \"lat\": 0,\n \"lng\": 0\n }\n },\n \"radius\": 250050\n },\n \"personalisation_options\": {\n \"caller_id\": \"<string>\",\n \"voice_preference\": {\n \"gender\": \"auto\"\n }\n },\n \"webhook_uri\": \"<string>\",\n \"idempotency_key\": \"<string>\"\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://staging.sdk.aurorax.co/api/v1/requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"objective\": \"<string>\",\n \"user_details\": {\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\"\n },\n \"targets\": [\n {\n \"phone_number\": \"<string>\",\n \"name\": \"<string>\",\n \"is_business\": true\n }\n ],\n \"target_options\": {\n \"auto_discover_relevant_businesses\": true,\n \"search_location\": {\n \"address\": \"<string>\",\n \"coordinates\": {\n \"lat\": 0,\n \"lng\": 0\n }\n },\n \"radius\": 250050\n },\n \"personalisation_options\": {\n \"caller_id\": \"<string>\",\n \"voice_preference\": {\n \"gender\": \"auto\"\n }\n },\n \"webhook_uri\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.sdk.aurorax.co/api/v1/requests")
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 \"objective\": \"<string>\",\n \"user_details\": {\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\"\n },\n \"targets\": [\n {\n \"phone_number\": \"<string>\",\n \"name\": \"<string>\",\n \"is_business\": true\n }\n ],\n \"target_options\": {\n \"auto_discover_relevant_businesses\": true,\n \"search_location\": {\n \"address\": \"<string>\",\n \"coordinates\": {\n \"lat\": 0,\n \"lng\": 0\n }\n },\n \"radius\": 250050\n },\n \"personalisation_options\": {\n \"caller_id\": \"<string>\",\n \"voice_preference\": {\n \"gender\": \"auto\"\n }\n },\n \"webhook_uri\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"status": "processing",
"created_at": "2023-11-07T05:31:56Z"
}Authorizations
BearerAuthApiKeyAuth
Headers
Body
application/json