Poll the immutable result for one accepted API lead.
curl --request GET \
--url https://api.pineyard.ai/v1/leads/{leadId}/result \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/v1/leads/{leadId}/result', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/leads/{leadId}/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "api.lead.result",
"apiVersion": "1.0",
"createdAt": "<string>",
"data": {
"leadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"lead": {
"phone": "<string>",
"name": "<string>",
"fields": {}
},
"status": "completed",
"disposition": "<string>",
"attempts": 1,
"finalCall": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"outcome": "<string>",
"providerDisposition": "<string>",
"attemptNumber": 123,
"answeredAt": "<string>",
"endedAt": "<string>",
"durationMs": 123
},
"analysis": {
"status": "PENDING",
"evaluation": {},
"extraction": {}
},
"journey": {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "DONE",
"endLabel": "<string>",
"failureReason": "<string>",
"startedAt": "<string>",
"endedAt": "<string>",
"tags": [
"<string>"
],
"steps": [
{
"nodeId": "<string>",
"label": "<string>",
"type": "<string>",
"actionKind": "<string>",
"status": "<string>",
"error": "<string>",
"startedAt": "<string>",
"endedAt": "<string>",
"call": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"outcome": "<string>",
"providerDisposition": "<string>",
"answeredAt": "<string>",
"endedAt": "<string>",
"durationMs": 123,
"extraction": {}
},
"port": null
}
]
}
}
}Leads & results
Poll the immutable result for one accepted API lead.
GET
/
v1
/
leads
/
{leadId}
/
result
Poll the immutable result for one accepted API lead.
curl --request GET \
--url https://api.pineyard.ai/v1/leads/{leadId}/result \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/v1/leads/{leadId}/result', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/leads/{leadId}/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "api.lead.result",
"apiVersion": "1.0",
"createdAt": "<string>",
"data": {
"leadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>",
"lead": {
"phone": "<string>",
"name": "<string>",
"fields": {}
},
"status": "completed",
"disposition": "<string>",
"attempts": 1,
"finalCall": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"outcome": "<string>",
"providerDisposition": "<string>",
"attemptNumber": 123,
"answeredAt": "<string>",
"endedAt": "<string>",
"durationMs": 123
},
"analysis": {
"status": "PENDING",
"evaluation": {},
"extraction": {}
},
"journey": {
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "DONE",
"endLabel": "<string>",
"failureReason": "<string>",
"startedAt": "<string>",
"endedAt": "<string>",
"tags": [
"<string>"
],
"steps": [
{
"nodeId": "<string>",
"label": "<string>",
"type": "<string>",
"actionKind": "<string>",
"status": "<string>",
"error": "<string>",
"startedAt": "<string>",
"endedAt": "<string>",
"call": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"outcome": "<string>",
"providerDisposition": "<string>",
"answeredAt": "<string>",
"endedAt": "<string>",
"durationMs": 123,
"extraction": {}
},
"port": null
}
]
}
}
}Required scope:
campaigns.view
Scopes apply to scoped API keys. Keys issued without scopes can call every
/v1 endpoint.Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.

