List leads (all brands)
curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads")
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": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_partial": true,
"received_at": "2023-11-07T05:31:56Z",
"status": "created",
"source": {
"id": 123,
"name": "angi",
"display_name": "Angi",
"medium": "webhook"
},
"external_id": "<string>",
"st_lead_id": 123,
"customer": {
"name": "<string>",
"phone_number": "<string>",
"email": "<string>",
"address": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"notes": "<string>"
},
"attribution": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>"
},
"contacted": true,
"not_contacted_reason": "<string>",
"qualified": true,
"outcome": "booked",
"opted_out": true,
"escalated": true,
"escalated_at": "2023-11-07T05:31:56Z",
"activity": {
"texts_sent": 123,
"texts_received": 123,
"calls_made": 123,
"calls_answered": 123
},
"campaign": {
"campaign_id": 500003,
"campaign_name": "<string>",
"campaign_type": "<string>",
"enrolled_at": "2023-11-07T05:31:56Z",
"audience_status": "COMPLETED",
"completed_at": "2023-11-07T05:31:56Z"
},
"bookings": [
{
"st_job_id": "<string>",
"source": "native_text",
"booked_by": "ai",
"booked_at": "2023-11-07T05:31:56Z",
"job_type_name": "<string>"
}
],
"booked_job_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"is_ignored": true,
"ignored_reason": "<string>",
"raw": {}
}
],
"pagination": {
"cursor": "<string>",
"has_more": true,
"limit": 123
},
"meta": {
"enterprise_id": 123,
"team_ids": [
123
],
"as_of": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}Leads
List leads (all brands)
The canonical leads feed across every team (brand) in the enterprise. Requires an enterprise_all_teams key whose enterprise matches the path — single-team and portfolio keys receive 403. Every row carries team_id. Same query parameters as the single-team feed. Requires the read:leads permission.
GET
/
api
/
v1
/
enterprise
/
{enterpriseId}
/
leads
List leads (all brands)
curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/enterprise/{enterpriseId}/leads")
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": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_partial": true,
"received_at": "2023-11-07T05:31:56Z",
"status": "created",
"source": {
"id": 123,
"name": "angi",
"display_name": "Angi",
"medium": "webhook"
},
"external_id": "<string>",
"st_lead_id": 123,
"customer": {
"name": "<string>",
"phone_number": "<string>",
"email": "<string>",
"address": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"country": "<string>",
"notes": "<string>"
},
"attribution": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>"
},
"contacted": true,
"not_contacted_reason": "<string>",
"qualified": true,
"outcome": "booked",
"opted_out": true,
"escalated": true,
"escalated_at": "2023-11-07T05:31:56Z",
"activity": {
"texts_sent": 123,
"texts_received": 123,
"calls_made": 123,
"calls_answered": 123
},
"campaign": {
"campaign_id": 500003,
"campaign_name": "<string>",
"campaign_type": "<string>",
"enrolled_at": "2023-11-07T05:31:56Z",
"audience_status": "COMPLETED",
"completed_at": "2023-11-07T05:31:56Z"
},
"bookings": [
{
"st_job_id": "<string>",
"source": "native_text",
"booked_by": "ai",
"booked_at": "2023-11-07T05:31:56Z",
"job_type_name": "<string>"
}
],
"booked_job_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"is_ignored": true,
"ignored_reason": "<string>",
"raw": {}
}
],
"pagination": {
"cursor": "<string>",
"has_more": true,
"limit": 123
},
"meta": {
"enterprise_id": 123,
"team_ids": [
123
],
"as_of": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}Query Parameters
Was this page helpful?