curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/outbound/campaign-enrollments \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/outbound/campaign-enrollments"
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/teams/{teamId}/outbound/campaign-enrollments', 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/teams/{teamId}/outbound/campaign-enrollments",
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/teams/{teamId}/outbound/campaign-enrollments"
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/teams/{teamId}/outbound/campaign-enrollments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/outbound/campaign-enrollments")
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": 123,
"campaign_id": 123,
"campaign_name": "<string>",
"campaign_status": "CREATED",
"campaign_type": "<string>",
"enrolled_at": "2023-11-07T05:31:56Z",
"audience_status": "<string>",
"in_progress_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"last_customer_reply_at": "2023-11-07T05:31:56Z",
"is_booked": true,
"booked_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"customer_name": "<string>",
"customer_phone_number": "<string>",
"lead_id": 123,
"job_id": 123,
"job_number": "<string>",
"job_type": "<string>",
"business_unit": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"cursor": "<string>",
"has_more": true,
"limit": 123
},
"meta": {
"team_id": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"campaign_status": [
"<string>"
],
"campaign_id": [
123
],
"campaign_type": [
"<string>"
],
"campaign_count": 123,
"truncated_campaigns": true,
"as_of": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}List campaign enrollments
One row per campaign enrollment (workflow_campaign_audience): every member of a campaign, whether or not Avoca ever dialed or texted them, keyset-paginated on enrollment time, oldest first. Use it for text-only campaigns such as unsold-estimate (Rehash) outreach, which campaign-customers returns nothing for because its grain is the dialed customer. Each row carries the enrollment status and lifecycle timestamps, the customer, lead_id (joins the v1 leads feed), and the CRM job the audience row was built from (job_id, job_number, job_type, business_unit). The window applies to enrolled_at; row contents change as the campaign works the member, so re-sweep and upsert by id, comparing updated_at to the previous sweep’s meta.as_of. Always scoped to the team in the URL path. Requires the read:outbound permission.
curl --request GET \
--url https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/outbound/campaign-enrollments \
--header 'Authorization: Bearer <token>'import requests
url = "https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/outbound/campaign-enrollments"
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/teams/{teamId}/outbound/campaign-enrollments', 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/teams/{teamId}/outbound/campaign-enrollments",
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/teams/{teamId}/outbound/campaign-enrollments"
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/teams/{teamId}/outbound/campaign-enrollments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://enterprise-api.avoca.ai/api/v1/teams/{teamId}/outbound/campaign-enrollments")
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": 123,
"campaign_id": 123,
"campaign_name": "<string>",
"campaign_status": "CREATED",
"campaign_type": "<string>",
"enrolled_at": "2023-11-07T05:31:56Z",
"audience_status": "<string>",
"in_progress_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"last_customer_reply_at": "2023-11-07T05:31:56Z",
"is_booked": true,
"booked_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"customer_name": "<string>",
"customer_phone_number": "<string>",
"lead_id": 123,
"job_id": 123,
"job_number": "<string>",
"job_type": "<string>",
"business_unit": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"cursor": "<string>",
"has_more": true,
"limit": 123
},
"meta": {
"team_id": 123,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"campaign_status": [
"<string>"
],
"campaign_id": [
123
],
"campaign_type": [
"<string>"
],
"campaign_count": 123,
"truncated_campaigns": true,
"as_of": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key in the format avoca_<64 hex characters>
Path Parameters
The team ID
Query Parameters
Include enrollments created on/after this ISO 8601 timestamp.
Include enrollments created before this ISO 8601 timestamp.
Comma-separated campaign statuses (default ACTIVE,DRAINING,SCHEDULED,COMPLETED).
Comma-separated campaign ids to narrow to (max 200). Discover ids with the campaigns endpoint.
Comma-separated workflow types to narrow to, e.g. UNSOLD_ESTIMATES (max 20).
Opaque pagination cursor from the previous response's pagination.cursor
Results per page (default 50, max 500)
x <= 500Was this page helpful?