cURL
curl --request GET \
--url https://api.aicaller.io/v1/phoneCalls \
--header 'aicaller-api-key: <api-key>'import requests
url = "https://api.aicaller.io/v1/phoneCalls"
headers = {"aicaller-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'aicaller-api-key': '<api-key>'}};
fetch('https://api.aicaller.io/v1/phoneCalls', 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://api.aicaller.io/v1/phoneCalls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"aicaller-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aicaller.io/v1/phoneCalls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("aicaller-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aicaller.io/v1/phoneCalls")
.header("aicaller-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aicaller.io/v1/phoneCalls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["aicaller-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"teamId": "363573667364666473667332",
"callTemplateId": "363573667364666473667332",
"nameOfHuman": "John",
"toPhoneNumber": "+1234567890",
"promptVariableValues": [
{
"key": "customer_name",
"value": "John"
}
],
"resultValues": [
{
"columnName": "city",
"value": "Bangalore"
}
],
"_id": "12345678901234567890",
"fileId": "363573667364666473667332",
"fileName": "lead_list.csv",
"callTriggeredAt": "2023-10-12T09:07:55.387Z",
"callStartedAt": "2023-10-12T09:08:05.387Z",
"callEndedAt": "2023-10-12T09:09:02.387Z",
"createdAt": "2023-10-12T09:08:00.387Z",
"updatedAt": "2023-10-12T09:08:00.387Z",
"phoneNumberId": "363573667364666473667332",
"fromPhoneNumber": "+1234567890",
"toEmailAddress": "[email protected]",
"status": "queued",
"telephonyProvider": "twilio",
"record": false,
"callDelayedUntil": "2023-10-12T09:08:00.387Z",
"phoneCallWebhooks": [
{
"url": "https://hooks.abc.com/",
"subscribedEvent": "phoneCall.completed",
"secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
}
],
"statusExtraInfo": {
"statusCode": "CALL_LATER",
"dateTime": "2024-03-11T10:00:00Z"
},
"fixedMeetingTime": "2024-03-11T10:00:00Z",
"recordingUrl": "https://example.com/recording.mp3",
"callDuration": 60,
"callOrigin": "api",
"customTagsHitOnCall": [
"<string>"
]
}
]
}{
"error": {
"statusCode": 400,
"message": [
"Invalid input"
],
"error": "Bad Request"
},
"payload": {}
}{
"error": {
"statusCode": 401,
"message": [
"Unauthorized"
],
"error": "Unauthorized"
},
"payload": {}
}{
"error": {
"statusCode": 403,
"message": [
"Forbidden resource"
],
"error": "Forbidden"
},
"payload": {}
}{
"error": {
"statusCode": 404,
"message": [
"Not Found"
],
"error": "Not Found"
},
"payload": {}
}{
"error": {
"error": "Internal Server Error",
"message": [
"INTERNAL_ERROR"
],
"statusCode": 500
},
"payload": {}
}Phone Calls
Get Phonecalls
Get all the PhoneCall
GET
/
v1
/
phoneCalls
cURL
curl --request GET \
--url https://api.aicaller.io/v1/phoneCalls \
--header 'aicaller-api-key: <api-key>'import requests
url = "https://api.aicaller.io/v1/phoneCalls"
headers = {"aicaller-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'aicaller-api-key': '<api-key>'}};
fetch('https://api.aicaller.io/v1/phoneCalls', 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://api.aicaller.io/v1/phoneCalls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"aicaller-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aicaller.io/v1/phoneCalls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("aicaller-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aicaller.io/v1/phoneCalls")
.header("aicaller-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aicaller.io/v1/phoneCalls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["aicaller-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"teamId": "363573667364666473667332",
"callTemplateId": "363573667364666473667332",
"nameOfHuman": "John",
"toPhoneNumber": "+1234567890",
"promptVariableValues": [
{
"key": "customer_name",
"value": "John"
}
],
"resultValues": [
{
"columnName": "city",
"value": "Bangalore"
}
],
"_id": "12345678901234567890",
"fileId": "363573667364666473667332",
"fileName": "lead_list.csv",
"callTriggeredAt": "2023-10-12T09:07:55.387Z",
"callStartedAt": "2023-10-12T09:08:05.387Z",
"callEndedAt": "2023-10-12T09:09:02.387Z",
"createdAt": "2023-10-12T09:08:00.387Z",
"updatedAt": "2023-10-12T09:08:00.387Z",
"phoneNumberId": "363573667364666473667332",
"fromPhoneNumber": "+1234567890",
"toEmailAddress": "[email protected]",
"status": "queued",
"telephonyProvider": "twilio",
"record": false,
"callDelayedUntil": "2023-10-12T09:08:00.387Z",
"phoneCallWebhooks": [
{
"url": "https://hooks.abc.com/",
"subscribedEvent": "phoneCall.completed",
"secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
}
],
"statusExtraInfo": {
"statusCode": "CALL_LATER",
"dateTime": "2024-03-11T10:00:00Z"
},
"fixedMeetingTime": "2024-03-11T10:00:00Z",
"recordingUrl": "https://example.com/recording.mp3",
"callDuration": 60,
"callOrigin": "api",
"customTagsHitOnCall": [
"<string>"
]
}
]
}{
"error": {
"statusCode": 400,
"message": [
"Invalid input"
],
"error": "Bad Request"
},
"payload": {}
}{
"error": {
"statusCode": 401,
"message": [
"Unauthorized"
],
"error": "Unauthorized"
},
"payload": {}
}{
"error": {
"statusCode": 403,
"message": [
"Forbidden resource"
],
"error": "Forbidden"
},
"payload": {}
}{
"error": {
"statusCode": 404,
"message": [
"Not Found"
],
"error": "Not Found"
},
"payload": {}
}{
"error": {
"error": "Internal Server Error",
"message": [
"INTERNAL_ERROR"
],
"statusCode": 500
},
"payload": {}
}List of possible status and statusExtraInfo values
Please refer to this blog for list all possible values and their meaning.Authorizations
Query Parameters
Unique ID of the CallTemplate
Unique ID of the PhoneNumber you own
Get phoneCalls created after this date
Get phoneCalls created before this date
Get phoneCalls made to a phoneNumber
Get phoneCalls with specific status, Possible values: "queued", "ringing", "inProgress", "busy", "noAnswer", "canceled", "failed", "completed".
Get bulk phoneCalls triggered using a file associated with fileId
Response
Phone calls found.
Show child attributes
Show child attributes
⌘I
