Update Call
curl --request PUT \
--url https://api.elemente.ai/api/v1/calls/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "This call need a follow up",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"status": "completed"
}
'import requests
url = "https://api.elemente.ai/api/v1/calls/{id}"
payload = {
"note": "This call need a follow up",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"status": "completed"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
note: 'This call need a follow up',
agentId: '123e4567-e89b-12d3-a456-426614174000',
status: 'completed'
})
};
fetch('https://api.elemente.ai/api/v1/calls/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'note' => 'This call need a follow up',
'agentId' => '123e4567-e89b-12d3-a456-426614174000',
'status' => 'completed'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api.elemente.ai/api/v1/calls/{id}"
payload := strings.NewReader("{\n \"note\": \"This call need a follow up\",\n \"agentId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"status\": \"completed\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("https://api.elemente.ai/api/v1/calls/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"This call need a follow up\",\n \"agentId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"status\": \"completed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elemente.ai/api/v1/calls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"This call need a follow up\",\n \"agentId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"status\": \"completed\"\n}"
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
Update Call
PUT
/
api
/
v1
/
calls
/
{id}
Update Call
curl --request PUT \
--url https://api.elemente.ai/api/v1/calls/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "This call need a follow up",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"status": "completed"
}
'import requests
url = "https://api.elemente.ai/api/v1/calls/{id}"
payload = {
"note": "This call need a follow up",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"status": "completed"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
note: 'This call need a follow up',
agentId: '123e4567-e89b-12d3-a456-426614174000',
status: 'completed'
})
};
fetch('https://api.elemente.ai/api/v1/calls/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'note' => 'This call need a follow up',
'agentId' => '123e4567-e89b-12d3-a456-426614174000',
'status' => 'completed'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api.elemente.ai/api/v1/calls/{id}"
payload := strings.NewReader("{\n \"note\": \"This call need a follow up\",\n \"agentId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"status\": \"completed\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("https://api.elemente.ai/api/v1/calls/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"This call need a follow up\",\n \"agentId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"status\": \"completed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.elemente.ai/api/v1/calls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"This call need a follow up\",\n \"agentId\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"status\": \"completed\"\n}"
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.
Path Parameters
The id of the call
Body
application/json
Input data for update call
Response
Update 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"
