Get calls
curl --request GET \
--url https://api.elemente.ai/api/v1/calls \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.elemente.ai/api/v1/calls"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.elemente.ai/api/v1/calls', 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.elemente.ai/api/v1/calls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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.elemente.ai/api/v1/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.elemente.ai/api/v1/calls")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elemente.ai/api/v1/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "in-progress",
"agentPhone": "+1234567890",
"agentEmail": "+1234567890",
"customerPhone": "+1234567890",
"customerEmail": "+1234567890",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"customerId": "123e4567-e89b-12d3-a456-426614174000",
"skillId": "123e4567-e89b-12d3-a456-426614174000",
"customerName": "John Doe",
"transcription": "Hello, how can I help you?",
"recordingUrl": "https://example.com/recording.wav",
"messages": [
{
"sid": "SM1234567890abcdef",
"timestamp": "2025-03-17T14:30:00Z",
"sender": "agent",
"content": "Hello, how can I assist you today?",
"mediaUrl": "https://example.com/image.jpg",
"status": "delivered"
}
],
"duration": "7200"
}Calls
Get calls
GET
/
api
/
v1
/
calls
Get calls
curl --request GET \
--url https://api.elemente.ai/api/v1/calls \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.elemente.ai/api/v1/calls"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.elemente.ai/api/v1/calls', 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.elemente.ai/api/v1/calls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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.elemente.ai/api/v1/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.elemente.ai/api/v1/calls")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elemente.ai/api/v1/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "in-progress",
"agentPhone": "+1234567890",
"agentEmail": "+1234567890",
"customerPhone": "+1234567890",
"customerEmail": "+1234567890",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"customerId": "123e4567-e89b-12d3-a456-426614174000",
"skillId": "123e4567-e89b-12d3-a456-426614174000",
"customerName": "John Doe",
"transcription": "Hello, how can I help you?",
"recordingUrl": "https://example.com/recording.wav",
"messages": [
{
"sid": "SM1234567890abcdef",
"timestamp": "2025-03-17T14:30:00Z",
"sender": "agent",
"content": "Hello, how can I assist you today?",
"mediaUrl": "https://example.com/image.jpg",
"status": "delivered"
}
],
"duration": "7200"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Query Parameters
Example:
{ "from": "2022-01-01", "to": "2022-01-31" }
Example:
24
Available options:
failed, voicemail, ringing, answer, completed, busy, open, close, closed, resolved, no-answer, canceled, in-progress, ongoing, pending, stalled, expired, processing, queued Example:
"answer"
Available options:
call, sms, whatsapp, email, webchat Example:
"call"
Example:
"yes"
Response
Returns the call
Interaction ID
Example:
"123e4567-e89b-12d3-a456-426614174000"
Interaction status
Example:
"in-progress"
Agent phone number
Example:
"+1234567890"
Agent Email
Example:
"+1234567890"
Customer phone number
Example:
"+1234567890"
Customer email
Example:
"+1234567890"
Agent ID
Example:
"123e4567-e89b-12d3-a456-426614174000"
Customer ID
Example:
"123e4567-e89b-12d3-a456-426614174000"
Skill ID
Example:
"123e4567-e89b-12d3-a456-426614174000"
Customer name
Example:
"John Doe"
Transcription
Example:
"Hello, how can I help you?"
Recording URL
Example:
"https://example.com/recording.wav"
conversation messages
Example:
[
{
"sid": "SM1234567890abcdef",
"timestamp": "2025-03-17T14:30:00Z",
"sender": "agent",
"content": "Hello, how can I assist you today?",
"mediaUrl": "https://example.com/image.jpg",
"status": "delivered"
}
]
Session duration in seconds
Example:
"7200"
