curl --request POST \
--url https://app.robocallz.ai/webhooks/post-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"id": 12345,
"customer_phone": "+1234567890",
"assistant_phone": "+1987654321",
"duration": 125,
"status": "completed",
"extracted_variables": {
"status": true,
"summary": "Customer interested in product demo",
"lead_quality": "high",
"next_action": "schedule_demo"
},
"input_variables": {
"customer_name": "John Doe",
"product_interest": "Pro Plan"
},
"transcript": "AI: Hello! This is Sarah from Autocalls. How are you today?\nCustomer: Hi, I'm doing well, thanks for calling...\nAI: I'm calling to tell you about our new product features.\nCustomer: That sounds interesting, tell me more...",
"recording_url": "https://app.autocalls.ai/storage/recordings/call-12345.mp4",
"created_at": "2025-01-15T10:30:00.000000Z",
"finished_at": "2025-01-15T10:32:05.000000Z",
"lead": {
"id": 789,
"phone_number": "+1234567890",
"variables": {
"source": "website",
"interest_level": "high"
},
"status": "contacted",
"created_at": "2025-01-15T09:00:00.000000Z",
"updated_at": "2025-01-15T10:32:05.000000Z",
"campaign": {
"id": 456,
"name": "Product Demo Campaign",
"status": "active",
"allowed_hours_start_time": "09:00",
"allowed_hours_end_time": "17:00",
"allowed_days": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"max_calls_in_parallel": 5,
"max_retries": 3,
"retry_interval": 60,
"created_at": "2025-01-15T08:00:00.000000Z",
"updated_at": "2025-01-15T08:00:00.000000Z"
}
}
}
EOFimport requests
url = "https://app.robocallz.ai/webhooks/post-call"
payload = {
"id": 12345,
"customer_phone": "+1234567890",
"assistant_phone": "+1987654321",
"duration": 125,
"status": "completed",
"extracted_variables": {
"status": True,
"summary": "Customer interested in product demo",
"lead_quality": "high",
"next_action": "schedule_demo"
},
"input_variables": {
"customer_name": "John Doe",
"product_interest": "Pro Plan"
},
"transcript": "AI: Hello! This is Sarah from Autocalls. How are you today?
Customer: Hi, I'm doing well, thanks for calling...
AI: I'm calling to tell you about our new product features.
Customer: That sounds interesting, tell me more...",
"recording_url": "https://app.autocalls.ai/storage/recordings/call-12345.mp4",
"created_at": "2025-01-15T10:30:00.000000Z",
"finished_at": "2025-01-15T10:32:05.000000Z",
"lead": {
"id": 789,
"phone_number": "+1234567890",
"variables": {
"source": "website",
"interest_level": "high"
},
"status": "contacted",
"created_at": "2025-01-15T09:00:00.000000Z",
"updated_at": "2025-01-15T10:32:05.000000Z",
"campaign": {
"id": 456,
"name": "Product Demo Campaign",
"status": "active",
"allowed_hours_start_time": "09:00",
"allowed_hours_end_time": "17:00",
"allowed_days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"max_calls_in_parallel": 5,
"max_retries": 3,
"retry_interval": 60,
"created_at": "2025-01-15T08:00:00.000000Z",
"updated_at": "2025-01-15T08:00:00.000000Z"
}
}
}
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({
id: 12345,
customer_phone: '+1234567890',
assistant_phone: '+1987654321',
duration: 125,
status: 'completed',
extracted_variables: {
status: true,
summary: 'Customer interested in product demo',
lead_quality: 'high',
next_action: 'schedule_demo'
},
input_variables: {customer_name: 'John Doe', product_interest: 'Pro Plan'},
transcript: 'AI: Hello! This is Sarah from Autocalls. How are you today?\nCustomer: Hi, I\'m doing well, thanks for calling...\nAI: I\'m calling to tell you about our new product features.\nCustomer: That sounds interesting, tell me more...',
recording_url: 'https://app.autocalls.ai/storage/recordings/call-12345.mp4',
created_at: '2025-01-15T10:30:00.000000Z',
finished_at: '2025-01-15T10:32:05.000000Z',
lead: {
id: 789,
phone_number: '+1234567890',
variables: {source: 'website', interest_level: 'high'},
status: 'contacted',
created_at: '2025-01-15T09:00:00.000000Z',
updated_at: '2025-01-15T10:32:05.000000Z',
campaign: {
id: 456,
name: 'Product Demo Campaign',
status: 'active',
allowed_hours_start_time: '09:00',
allowed_hours_end_time: '17:00',
allowed_days: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday'],
max_calls_in_parallel: 5,
max_retries: 3,
retry_interval: 60,
created_at: '2025-01-15T08:00:00.000000Z',
updated_at: '2025-01-15T08:00:00.000000Z'
}
}
})
};
fetch('https://app.robocallz.ai/webhooks/post-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://app.robocallz.ai/webhooks/post-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([
'id' => 12345,
'customer_phone' => '+1234567890',
'assistant_phone' => '+1987654321',
'duration' => 125,
'status' => 'completed',
'extracted_variables' => [
'status' => true,
'summary' => 'Customer interested in product demo',
'lead_quality' => 'high',
'next_action' => 'schedule_demo'
],
'input_variables' => [
'customer_name' => 'John Doe',
'product_interest' => 'Pro Plan'
],
'transcript' => 'AI: Hello! This is Sarah from Autocalls. How are you today?
Customer: Hi, I\'m doing well, thanks for calling...
AI: I\'m calling to tell you about our new product features.
Customer: That sounds interesting, tell me more...',
'recording_url' => 'https://app.autocalls.ai/storage/recordings/call-12345.mp4',
'created_at' => '2025-01-15T10:30:00.000000Z',
'finished_at' => '2025-01-15T10:32:05.000000Z',
'lead' => [
'id' => 789,
'phone_number' => '+1234567890',
'variables' => [
'source' => 'website',
'interest_level' => 'high'
],
'status' => 'contacted',
'created_at' => '2025-01-15T09:00:00.000000Z',
'updated_at' => '2025-01-15T10:32:05.000000Z',
'campaign' => [
'id' => 456,
'name' => 'Product Demo Campaign',
'status' => 'active',
'allowed_hours_start_time' => '09:00',
'allowed_hours_end_time' => '17:00',
'allowed_days' => [
'monday',
'tuesday',
'wednesday',
'thursday',
'friday'
],
'max_calls_in_parallel' => 5,
'max_retries' => 3,
'retry_interval' => 60,
'created_at' => '2025-01-15T08:00:00.000000Z',
'updated_at' => '2025-01-15T08:00:00.000000Z'
]
]
]),
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://app.robocallz.ai/webhooks/post-call"
payload := strings.NewReader("{\n \"id\": 12345,\n \"customer_phone\": \"+1234567890\",\n \"assistant_phone\": \"+1987654321\",\n \"duration\": 125,\n \"status\": \"completed\",\n \"extracted_variables\": {\n \"status\": true,\n \"summary\": \"Customer interested in product demo\",\n \"lead_quality\": \"high\",\n \"next_action\": \"schedule_demo\"\n },\n \"input_variables\": {\n \"customer_name\": \"John Doe\",\n \"product_interest\": \"Pro Plan\"\n },\n \"transcript\": \"AI: Hello! This is Sarah from Autocalls. How are you today?\\nCustomer: Hi, I'm doing well, thanks for calling...\\nAI: I'm calling to tell you about our new product features.\\nCustomer: That sounds interesting, tell me more...\",\n \"recording_url\": \"https://app.autocalls.ai/storage/recordings/call-12345.mp4\",\n \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n \"finished_at\": \"2025-01-15T10:32:05.000000Z\",\n \"lead\": {\n \"id\": 789,\n \"phone_number\": \"+1234567890\",\n \"variables\": {\n \"source\": \"website\",\n \"interest_level\": \"high\"\n },\n \"status\": \"contacted\",\n \"created_at\": \"2025-01-15T09:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T10:32:05.000000Z\",\n \"campaign\": {\n \"id\": 456,\n \"name\": \"Product Demo Campaign\",\n \"status\": \"active\",\n \"allowed_hours_start_time\": \"09:00\",\n \"allowed_hours_end_time\": \"17:00\",\n \"allowed_days\": [\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\",\n \"friday\"\n ],\n \"max_calls_in_parallel\": 5,\n \"max_retries\": 3,\n \"retry_interval\": 60,\n \"created_at\": \"2025-01-15T08:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T08:00:00.000000Z\"\n }\n }\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://app.robocallz.ai/webhooks/post-call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 12345,\n \"customer_phone\": \"+1234567890\",\n \"assistant_phone\": \"+1987654321\",\n \"duration\": 125,\n \"status\": \"completed\",\n \"extracted_variables\": {\n \"status\": true,\n \"summary\": \"Customer interested in product demo\",\n \"lead_quality\": \"high\",\n \"next_action\": \"schedule_demo\"\n },\n \"input_variables\": {\n \"customer_name\": \"John Doe\",\n \"product_interest\": \"Pro Plan\"\n },\n \"transcript\": \"AI: Hello! This is Sarah from Autocalls. How are you today?\\nCustomer: Hi, I'm doing well, thanks for calling...\\nAI: I'm calling to tell you about our new product features.\\nCustomer: That sounds interesting, tell me more...\",\n \"recording_url\": \"https://app.autocalls.ai/storage/recordings/call-12345.mp4\",\n \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n \"finished_at\": \"2025-01-15T10:32:05.000000Z\",\n \"lead\": {\n \"id\": 789,\n \"phone_number\": \"+1234567890\",\n \"variables\": {\n \"source\": \"website\",\n \"interest_level\": \"high\"\n },\n \"status\": \"contacted\",\n \"created_at\": \"2025-01-15T09:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T10:32:05.000000Z\",\n \"campaign\": {\n \"id\": 456,\n \"name\": \"Product Demo Campaign\",\n \"status\": \"active\",\n \"allowed_hours_start_time\": \"09:00\",\n \"allowed_hours_end_time\": \"17:00\",\n \"allowed_days\": [\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\",\n \"friday\"\n ],\n \"max_calls_in_parallel\": 5,\n \"max_retries\": 3,\n \"retry_interval\": 60,\n \"created_at\": \"2025-01-15T08:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T08:00:00.000000Z\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.robocallz.ai/webhooks/post-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 \"id\": 12345,\n \"customer_phone\": \"+1234567890\",\n \"assistant_phone\": \"+1987654321\",\n \"duration\": 125,\n \"status\": \"completed\",\n \"extracted_variables\": {\n \"status\": true,\n \"summary\": \"Customer interested in product demo\",\n \"lead_quality\": \"high\",\n \"next_action\": \"schedule_demo\"\n },\n \"input_variables\": {\n \"customer_name\": \"John Doe\",\n \"product_interest\": \"Pro Plan\"\n },\n \"transcript\": \"AI: Hello! This is Sarah from Autocalls. How are you today?\\nCustomer: Hi, I'm doing well, thanks for calling...\\nAI: I'm calling to tell you about our new product features.\\nCustomer: That sounds interesting, tell me more...\",\n \"recording_url\": \"https://app.autocalls.ai/storage/recordings/call-12345.mp4\",\n \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n \"finished_at\": \"2025-01-15T10:32:05.000000Z\",\n \"lead\": {\n \"id\": 789,\n \"phone_number\": \"+1234567890\",\n \"variables\": {\n \"source\": \"website\",\n \"interest_level\": \"high\"\n },\n \"status\": \"contacted\",\n \"created_at\": \"2025-01-15T09:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T10:32:05.000000Z\",\n \"campaign\": {\n \"id\": 456,\n \"name\": \"Product Demo Campaign\",\n \"status\": \"active\",\n \"allowed_hours_start_time\": \"09:00\",\n \"allowed_hours_end_time\": \"17:00\",\n \"allowed_days\": [\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\",\n \"friday\"\n ],\n \"max_calls_in_parallel\": 5,\n \"max_retries\": 3,\n \"retry_interval\": 60,\n \"created_at\": \"2025-01-15T08:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T08:00:00.000000Z\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyPost Call Webhook
Webhook for when a call is made
curl --request POST \
--url https://app.robocallz.ai/webhooks/post-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"id": 12345,
"customer_phone": "+1234567890",
"assistant_phone": "+1987654321",
"duration": 125,
"status": "completed",
"extracted_variables": {
"status": true,
"summary": "Customer interested in product demo",
"lead_quality": "high",
"next_action": "schedule_demo"
},
"input_variables": {
"customer_name": "John Doe",
"product_interest": "Pro Plan"
},
"transcript": "AI: Hello! This is Sarah from Autocalls. How are you today?\nCustomer: Hi, I'm doing well, thanks for calling...\nAI: I'm calling to tell you about our new product features.\nCustomer: That sounds interesting, tell me more...",
"recording_url": "https://app.autocalls.ai/storage/recordings/call-12345.mp4",
"created_at": "2025-01-15T10:30:00.000000Z",
"finished_at": "2025-01-15T10:32:05.000000Z",
"lead": {
"id": 789,
"phone_number": "+1234567890",
"variables": {
"source": "website",
"interest_level": "high"
},
"status": "contacted",
"created_at": "2025-01-15T09:00:00.000000Z",
"updated_at": "2025-01-15T10:32:05.000000Z",
"campaign": {
"id": 456,
"name": "Product Demo Campaign",
"status": "active",
"allowed_hours_start_time": "09:00",
"allowed_hours_end_time": "17:00",
"allowed_days": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"max_calls_in_parallel": 5,
"max_retries": 3,
"retry_interval": 60,
"created_at": "2025-01-15T08:00:00.000000Z",
"updated_at": "2025-01-15T08:00:00.000000Z"
}
}
}
EOFimport requests
url = "https://app.robocallz.ai/webhooks/post-call"
payload = {
"id": 12345,
"customer_phone": "+1234567890",
"assistant_phone": "+1987654321",
"duration": 125,
"status": "completed",
"extracted_variables": {
"status": True,
"summary": "Customer interested in product demo",
"lead_quality": "high",
"next_action": "schedule_demo"
},
"input_variables": {
"customer_name": "John Doe",
"product_interest": "Pro Plan"
},
"transcript": "AI: Hello! This is Sarah from Autocalls. How are you today?
Customer: Hi, I'm doing well, thanks for calling...
AI: I'm calling to tell you about our new product features.
Customer: That sounds interesting, tell me more...",
"recording_url": "https://app.autocalls.ai/storage/recordings/call-12345.mp4",
"created_at": "2025-01-15T10:30:00.000000Z",
"finished_at": "2025-01-15T10:32:05.000000Z",
"lead": {
"id": 789,
"phone_number": "+1234567890",
"variables": {
"source": "website",
"interest_level": "high"
},
"status": "contacted",
"created_at": "2025-01-15T09:00:00.000000Z",
"updated_at": "2025-01-15T10:32:05.000000Z",
"campaign": {
"id": 456,
"name": "Product Demo Campaign",
"status": "active",
"allowed_hours_start_time": "09:00",
"allowed_hours_end_time": "17:00",
"allowed_days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"max_calls_in_parallel": 5,
"max_retries": 3,
"retry_interval": 60,
"created_at": "2025-01-15T08:00:00.000000Z",
"updated_at": "2025-01-15T08:00:00.000000Z"
}
}
}
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({
id: 12345,
customer_phone: '+1234567890',
assistant_phone: '+1987654321',
duration: 125,
status: 'completed',
extracted_variables: {
status: true,
summary: 'Customer interested in product demo',
lead_quality: 'high',
next_action: 'schedule_demo'
},
input_variables: {customer_name: 'John Doe', product_interest: 'Pro Plan'},
transcript: 'AI: Hello! This is Sarah from Autocalls. How are you today?\nCustomer: Hi, I\'m doing well, thanks for calling...\nAI: I\'m calling to tell you about our new product features.\nCustomer: That sounds interesting, tell me more...',
recording_url: 'https://app.autocalls.ai/storage/recordings/call-12345.mp4',
created_at: '2025-01-15T10:30:00.000000Z',
finished_at: '2025-01-15T10:32:05.000000Z',
lead: {
id: 789,
phone_number: '+1234567890',
variables: {source: 'website', interest_level: 'high'},
status: 'contacted',
created_at: '2025-01-15T09:00:00.000000Z',
updated_at: '2025-01-15T10:32:05.000000Z',
campaign: {
id: 456,
name: 'Product Demo Campaign',
status: 'active',
allowed_hours_start_time: '09:00',
allowed_hours_end_time: '17:00',
allowed_days: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday'],
max_calls_in_parallel: 5,
max_retries: 3,
retry_interval: 60,
created_at: '2025-01-15T08:00:00.000000Z',
updated_at: '2025-01-15T08:00:00.000000Z'
}
}
})
};
fetch('https://app.robocallz.ai/webhooks/post-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://app.robocallz.ai/webhooks/post-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([
'id' => 12345,
'customer_phone' => '+1234567890',
'assistant_phone' => '+1987654321',
'duration' => 125,
'status' => 'completed',
'extracted_variables' => [
'status' => true,
'summary' => 'Customer interested in product demo',
'lead_quality' => 'high',
'next_action' => 'schedule_demo'
],
'input_variables' => [
'customer_name' => 'John Doe',
'product_interest' => 'Pro Plan'
],
'transcript' => 'AI: Hello! This is Sarah from Autocalls. How are you today?
Customer: Hi, I\'m doing well, thanks for calling...
AI: I\'m calling to tell you about our new product features.
Customer: That sounds interesting, tell me more...',
'recording_url' => 'https://app.autocalls.ai/storage/recordings/call-12345.mp4',
'created_at' => '2025-01-15T10:30:00.000000Z',
'finished_at' => '2025-01-15T10:32:05.000000Z',
'lead' => [
'id' => 789,
'phone_number' => '+1234567890',
'variables' => [
'source' => 'website',
'interest_level' => 'high'
],
'status' => 'contacted',
'created_at' => '2025-01-15T09:00:00.000000Z',
'updated_at' => '2025-01-15T10:32:05.000000Z',
'campaign' => [
'id' => 456,
'name' => 'Product Demo Campaign',
'status' => 'active',
'allowed_hours_start_time' => '09:00',
'allowed_hours_end_time' => '17:00',
'allowed_days' => [
'monday',
'tuesday',
'wednesday',
'thursday',
'friday'
],
'max_calls_in_parallel' => 5,
'max_retries' => 3,
'retry_interval' => 60,
'created_at' => '2025-01-15T08:00:00.000000Z',
'updated_at' => '2025-01-15T08:00:00.000000Z'
]
]
]),
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://app.robocallz.ai/webhooks/post-call"
payload := strings.NewReader("{\n \"id\": 12345,\n \"customer_phone\": \"+1234567890\",\n \"assistant_phone\": \"+1987654321\",\n \"duration\": 125,\n \"status\": \"completed\",\n \"extracted_variables\": {\n \"status\": true,\n \"summary\": \"Customer interested in product demo\",\n \"lead_quality\": \"high\",\n \"next_action\": \"schedule_demo\"\n },\n \"input_variables\": {\n \"customer_name\": \"John Doe\",\n \"product_interest\": \"Pro Plan\"\n },\n \"transcript\": \"AI: Hello! This is Sarah from Autocalls. How are you today?\\nCustomer: Hi, I'm doing well, thanks for calling...\\nAI: I'm calling to tell you about our new product features.\\nCustomer: That sounds interesting, tell me more...\",\n \"recording_url\": \"https://app.autocalls.ai/storage/recordings/call-12345.mp4\",\n \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n \"finished_at\": \"2025-01-15T10:32:05.000000Z\",\n \"lead\": {\n \"id\": 789,\n \"phone_number\": \"+1234567890\",\n \"variables\": {\n \"source\": \"website\",\n \"interest_level\": \"high\"\n },\n \"status\": \"contacted\",\n \"created_at\": \"2025-01-15T09:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T10:32:05.000000Z\",\n \"campaign\": {\n \"id\": 456,\n \"name\": \"Product Demo Campaign\",\n \"status\": \"active\",\n \"allowed_hours_start_time\": \"09:00\",\n \"allowed_hours_end_time\": \"17:00\",\n \"allowed_days\": [\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\",\n \"friday\"\n ],\n \"max_calls_in_parallel\": 5,\n \"max_retries\": 3,\n \"retry_interval\": 60,\n \"created_at\": \"2025-01-15T08:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T08:00:00.000000Z\"\n }\n }\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://app.robocallz.ai/webhooks/post-call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 12345,\n \"customer_phone\": \"+1234567890\",\n \"assistant_phone\": \"+1987654321\",\n \"duration\": 125,\n \"status\": \"completed\",\n \"extracted_variables\": {\n \"status\": true,\n \"summary\": \"Customer interested in product demo\",\n \"lead_quality\": \"high\",\n \"next_action\": \"schedule_demo\"\n },\n \"input_variables\": {\n \"customer_name\": \"John Doe\",\n \"product_interest\": \"Pro Plan\"\n },\n \"transcript\": \"AI: Hello! This is Sarah from Autocalls. How are you today?\\nCustomer: Hi, I'm doing well, thanks for calling...\\nAI: I'm calling to tell you about our new product features.\\nCustomer: That sounds interesting, tell me more...\",\n \"recording_url\": \"https://app.autocalls.ai/storage/recordings/call-12345.mp4\",\n \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n \"finished_at\": \"2025-01-15T10:32:05.000000Z\",\n \"lead\": {\n \"id\": 789,\n \"phone_number\": \"+1234567890\",\n \"variables\": {\n \"source\": \"website\",\n \"interest_level\": \"high\"\n },\n \"status\": \"contacted\",\n \"created_at\": \"2025-01-15T09:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T10:32:05.000000Z\",\n \"campaign\": {\n \"id\": 456,\n \"name\": \"Product Demo Campaign\",\n \"status\": \"active\",\n \"allowed_hours_start_time\": \"09:00\",\n \"allowed_hours_end_time\": \"17:00\",\n \"allowed_days\": [\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\",\n \"friday\"\n ],\n \"max_calls_in_parallel\": 5,\n \"max_retries\": 3,\n \"retry_interval\": 60,\n \"created_at\": \"2025-01-15T08:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T08:00:00.000000Z\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.robocallz.ai/webhooks/post-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 \"id\": 12345,\n \"customer_phone\": \"+1234567890\",\n \"assistant_phone\": \"+1987654321\",\n \"duration\": 125,\n \"status\": \"completed\",\n \"extracted_variables\": {\n \"status\": true,\n \"summary\": \"Customer interested in product demo\",\n \"lead_quality\": \"high\",\n \"next_action\": \"schedule_demo\"\n },\n \"input_variables\": {\n \"customer_name\": \"John Doe\",\n \"product_interest\": \"Pro Plan\"\n },\n \"transcript\": \"AI: Hello! This is Sarah from Autocalls. How are you today?\\nCustomer: Hi, I'm doing well, thanks for calling...\\nAI: I'm calling to tell you about our new product features.\\nCustomer: That sounds interesting, tell me more...\",\n \"recording_url\": \"https://app.autocalls.ai/storage/recordings/call-12345.mp4\",\n \"created_at\": \"2025-01-15T10:30:00.000000Z\",\n \"finished_at\": \"2025-01-15T10:32:05.000000Z\",\n \"lead\": {\n \"id\": 789,\n \"phone_number\": \"+1234567890\",\n \"variables\": {\n \"source\": \"website\",\n \"interest_level\": \"high\"\n },\n \"status\": \"contacted\",\n \"created_at\": \"2025-01-15T09:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T10:32:05.000000Z\",\n \"campaign\": {\n \"id\": 456,\n \"name\": \"Product Demo Campaign\",\n \"status\": \"active\",\n \"allowed_hours_start_time\": \"09:00\",\n \"allowed_hours_end_time\": \"17:00\",\n \"allowed_days\": [\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\",\n \"friday\"\n ],\n \"max_calls_in_parallel\": 5,\n \"max_retries\": 3,\n \"retry_interval\": 60,\n \"created_at\": \"2025-01-15T08:00:00.000000Z\",\n \"updated_at\": \"2025-01-15T08:00:00.000000Z\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Unique identifier of the call
Phone number of the customer in E.164 format (e.g., "+1234567890") or null if not available
Phone number used by the assistant in E.164 format or null if not available
Duration of the call in seconds
Final status of the call (e.g., "completed", "busy", "failed")
Variables extracted by AI based on your post-call schema configuration
Show child attributes
Show child attributes
Variables that were passed to the assistant before the call started
Full transcript of the conversation
URL to download the call recording (only included if "Include recording in webhook" is enabled in assistant settings)
ISO 8601 timestamp when the call was initiated
ISO 8601 timestamp when the call was completed
Lead information (only included for campaign calls)
Show child attributes
Show child attributes

