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": 12345,
"team_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z",
"status": "created",
"source": {
"id": 123,
"name": "angi",
"display_name": "Angi",
"medium": "webhook"
},
"external_id": "<string>",
"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>",
"bookings": [
{
"st_job_id": "<string>",
"source": "native_text",
"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
]
}
}{
"error": "<string>",
"message": "<string>"
}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.
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": 12345,
"team_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"received_at": "2023-11-07T05:31:56Z",
"status": "created",
"source": {
"id": 123,
"name": "angi",
"display_name": "Angi",
"medium": "webhook"
},
"external_id": "<string>",
"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>",
"bookings": [
{
"st_job_id": "<string>",
"source": "native_text",
"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
]
}
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key in the format avoca_<64 hex characters>
Path Parameters
The enterprise ID
Query Parameters
Inclusive lower bound on created_at (>=)
Exclusive upper bound on created_at (<)
Lead-source medium
webhook, email_alerts, st_bookings_alerts, st_native, google_lsa, yelp, web_chat, dropped_responder Lead-source canonical name (exact match)
Lead processing status
created, queued, processing, completed, failed, skipped When false, omit the raw third-party payload field (default true)
When true, include suppressed leads (adds is_ignored / ignored_reason)
When true, include leads from the team's registered test phone numbers (default false)
Include designated internal QA/test teams in multi-team aggregations (default false)
Opaque pagination cursor from the previous response's pagination.cursor
Results per page (default 50, max 500)
x <= 500Was this page helpful?