curl --request PATCH \
--url https://api.lemlist.com/api/calls/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"callStatus": "left-voicemail",
"duration": 45,
"recordingUrl": "https://recordings.dialer.example/8f2c1.mp3"
}
'import requests
url = "https://api.lemlist.com/api/calls/{id}"
payload = {
"callStatus": "left-voicemail",
"duration": 45,
"recordingUrl": "https://recordings.dialer.example/8f2c1.mp3"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
callStatus: 'left-voicemail',
duration: 45,
recordingUrl: 'https://recordings.dialer.example/8f2c1.mp3'
})
};
fetch('https://api.lemlist.com/api/calls/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/calls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callStatus\": \"left-voicemail\",\n \"duration\": 45,\n \"recordingUrl\": \"https://recordings.dialer.example/8f2c1.mp3\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/calls/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'callStatus' => 'left-voicemail',
'duration' => 45,
'recordingUrl' => 'https://recordings.dialer.example/8f2c1.mp3'
]),
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;
}Update a Call
Completes a call logged through the API with its status, note, duration, recording or transcript.
curl --request PATCH \
--url https://api.lemlist.com/api/calls/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"callStatus": "left-voicemail",
"duration": 45,
"recordingUrl": "https://recordings.dialer.example/8f2c1.mp3"
}
'import requests
url = "https://api.lemlist.com/api/calls/{id}"
payload = {
"callStatus": "left-voicemail",
"duration": 45,
"recordingUrl": "https://recordings.dialer.example/8f2c1.mp3"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
callStatus: 'left-voicemail',
duration: 45,
recordingUrl: 'https://recordings.dialer.example/8f2c1.mp3'
})
};
fetch('https://api.lemlist.com/api/calls/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/calls/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callStatus\": \"left-voicemail\",\n \"duration\": 45,\n \"recordingUrl\": \"https://recordings.dialer.example/8f2c1.mp3\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/calls/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'callStatus' => 'left-voicemail',
'duration' => 45,
'recordingUrl' => 'https://recordings.dialer.example/8f2c1.mp3'
]),
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;
}_id the log answered, or by the externalId you sent. Only calls logged through POST /calls can be updated here: the status, the note and the media of a call made with the lemlist dialer, Aircall or Ringover are lemlist’s own, and such a call answers 404 CALLS_API_CALL_NOT_UPDATABLE even though GET /calls/{id} reads it.
The status, the note and the duration reach the CRM call. The recording is fetched in the background: read the call back with GET /calls/{id} until hasRecording turns true, and send the PATCH again with a reachable URL when it does not.Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The call's _id (act_…) or its externalId.
Body
A key of the team's call statuses (GET /call-statuses). Runs the automations that status carries, as the team configured them, and reaches the CRM call.
"left-voicemail"
10000"Left a voicemail, call back Thursday."
Seconds. Moves the end of the call accordingly, and reaches the CRM call (HubSpot, Salesforce, Pipedrive).
0 <= x <= 8640045
An https URL of the recording, reachable from the public internet. An empty string means no recording, so it does not count as a field to update.
2048"https://recordings.dialer.example/8f2c1.mp3"
The transcript as plain text.
200000"Hi Jane, this is Alex from lemlist…"
Was this page helpful?