curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach', 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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach",
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: Bearer <token>"
],
]);
$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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 9000001,
"team_id": 70001,
"external_id": "<string>",
"phone_number": "+15555550100",
"created_at": "2023-11-07T05:31:56Z",
"is_partial": true,
"outreach": {
"state": "not_contacted",
"reason": "inactive",
"is_idle": true,
"changed_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z",
"last_outreach_at": "2023-11-07T05:31:56Z",
"last_customer_reply_at": "2023-11-07T05:31:56Z"
}
}
],
"pagination": {
"cursor": "<string>",
"has_more": true,
"limit": 123
},
"meta": {
"enterprise_id": 123,
"team_ids": [
123
],
"as_of": "2023-11-07T05:31:56Z",
"outreach_changed_after": "2023-11-07T05:31:56Z",
"outreach_changed_before": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}List lead outreach (all brands)
Each lead’s identity and outreach across every team in the enterprise: whether Avoca is still contacting the lead, and why outreach ended or never started. Same key rules and lead filters as GET /api/v1/enterprise/{enterpriseId}/leads, which is unchanged and does not return outreach. Keyset cursor-paginated ascending by (created_at, id), except with an outreach window or outreach_live, which return rows in scan order (follow the cursor). Requires the read:leads permission.
curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach', 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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach",
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: Bearer <token>"
],
]);
$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://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads/outreach")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 9000001,
"team_id": 70001,
"external_id": "<string>",
"phone_number": "+15555550100",
"created_at": "2023-11-07T05:31:56Z",
"is_partial": true,
"outreach": {
"state": "not_contacted",
"reason": "inactive",
"is_idle": true,
"changed_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"last_activity_at": "2023-11-07T05:31:56Z",
"last_outreach_at": "2023-11-07T05:31:56Z",
"last_customer_reply_at": "2023-11-07T05:31:56Z"
}
}
],
"pagination": {
"cursor": "<string>",
"has_more": true,
"limit": 123
},
"meta": {
"enterprise_id": 123,
"team_ids": [
123
],
"as_of": "2023-11-07T05:31:56Z",
"outreach_changed_after": "2023-11-07T05:31:56Z",
"outreach_changed_before": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}Query Parameters
When true, return every lead being worked right now (active or with_human) whose latest conversation had a message in the last 30 days, instead of every lead. Rows come in no particular order; follow pagination.cursor, which is the only way to continue. A page can hold fewer than limit rows while has_more is true. Cannot be combined with outreach_changed_after.
Inclusive lower bound on outreach.changed_at. Returns only the leads whose outreach changed in the window, each once, in no particular order; follow pagination.cursor (a page can hold fewer than limit rows while has_more is true). To poll, pass the previous response's meta.outreach_changed_before. A move to human follow-up or an AI-texting toggle without a message, a cleared opt-out, and a deleted conversation do not appear in windows. To pick them up, sweep outreach_live=true daily, and re-read with ids any lead you hold as active or with_human that the sweep did not return.
Was this page helpful?