List campaign leads
curl --request GET \
--url https://api.pineyard.ai/campaigns/{id}/leads \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/campaigns/{id}/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/leads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"contactId": "<string>",
"callId": "<string>",
"toNumber": "<string>",
"name": "<string>",
"status": "<string>",
"outcome": "<string>",
"durationMs": 123,
"attemptCount": 123,
"queuedAt": "<string>",
"scheduledCallbackAt": "<string>",
"fields": {},
"doNotCall": true,
"churnDepth": 123,
"nextEligibleAt": "<string>",
"referredFromCallId": "<string>",
"everReached": true,
"extraction": null,
"workflowRunId": "<string>"
}
],
"total": 123
}Results & insights
List campaign leads
One row per lead with its status, outcome, latest call and extracted fields. Offset-paginated.
GET
/
campaigns
/
{id}
/
leads
List campaign leads
curl --request GET \
--url https://api.pineyard.ai/campaigns/{id}/leads \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/campaigns/{id}/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/leads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"contactId": "<string>",
"callId": "<string>",
"toNumber": "<string>",
"name": "<string>",
"status": "<string>",
"outcome": "<string>",
"durationMs": 123,
"attemptCount": 123,
"queuedAt": "<string>",
"scheduledCallbackAt": "<string>",
"fields": {},
"doNotCall": true,
"churnDepth": 123,
"nextEligibleAt": "<string>",
"referredFromCallId": "<string>",
"everReached": true,
"extraction": null,
"workflowRunId": "<string>"
}
],
"total": 123
}Required scope:
intel.viewAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Query Parameters
Required range:
1 <= x <= 200Required range:
x >= 0
