Leads
Get Lead Calls
Get the tracked phone calls of a lead with GET /api/leads//calls: status, numbers, times, duration, summary and transcript of the 10 most recent calls.
GET
/
api
/
leads
/
{id}
/
calls
Get Lead Calls
curl --request GET \
--url https://octanist.com/api/leads/{id}/calls \
--header 'X-API-KEY: <api-key>'import requests
url = "https://octanist.com/api/leads/{id}/calls"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://octanist.com/api/leads/{id}/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://octanist.com/api/leads/{id}/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 => [
"X-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://octanist.com/api/leads/{id}/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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://octanist.com/api/leads/{id}/calls")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://octanist.com/api/leads/{id}/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "call_abc123",
"status": "completed",
"callerNumber": "+31612345678",
"calledNumber": "+31852081234",
"startedAt": "2023-11-07T05:31:56Z",
"answeredAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"durationSeconds": 252,
"summary": "<string>",
"transcript": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}Returns the phone calls that call tracking linked to one lead. The 10 most recent calls are returned, newest first. A lead without calls returns an empty array.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Octanist lead ID |
Example Request
curl -X GET \
-H "X-API-KEY: your_api_key" \
"https://octanist.com/api/leads/lead_abc123/calls"
Example Response
{
"success": true,
"data": [
{
"id": "call_abc123",
"status": "completed",
"callerNumber": "+31612345678",
"calledNumber": "+31852081234",
"startedAt": "2026-01-15T10:30:00.000Z",
"answeredAt": "2026-01-15T10:30:08.000Z",
"endedAt": "2026-01-15T10:34:20.000Z",
"durationSeconds": 252,
"summary": "Caller asked for a quote for 20 licenses.",
"transcript": "...",
"createdAt": "2026-01-15T10:30:00.000Z"
}
],
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Call ID |
status | string | initiated, answered, transferred, completed, failed, or missed |
callerNumber | string | Number of the person who called |
calledNumber | string | Tracking number the person dialed |
startedAt | string | null | When the call started (ISO 8601) |
answeredAt | string | null | When the call was answered |
endedAt | string | null | When the call ended |
durationSeconds | integer | null | Length of the call in seconds |
summary | string | null | Summary of the call, when one was made |
transcript | string | null | Transcript of the call, when one was made |
createdAt | string | When Octanist recorded the call |
Error Responses
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | LEAD_LOCKED | The lead is over your plan’s lead limit. See Locked leads. |
| 404 | NOT_FOUND | No lead with this ID in your organization |
| 500 | INTERNAL_ERROR | Server error |
⌘I
Get Lead Calls
curl --request GET \
--url https://octanist.com/api/leads/{id}/calls \
--header 'X-API-KEY: <api-key>'import requests
url = "https://octanist.com/api/leads/{id}/calls"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://octanist.com/api/leads/{id}/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://octanist.com/api/leads/{id}/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 => [
"X-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://octanist.com/api/leads/{id}/calls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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://octanist.com/api/leads/{id}/calls")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://octanist.com/api/leads/{id}/calls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": "call_abc123",
"status": "completed",
"callerNumber": "+31612345678",
"calledNumber": "+31852081234",
"startedAt": "2023-11-07T05:31:56Z",
"answeredAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"durationSeconds": 252,
"summary": "<string>",
"transcript": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable error message",
"details": {}
},
"meta": {
"requestId": "req_a1b2c3d4e5f6",
"timestamp": "2026-03-10T12:00:00.000Z"
}
}