Ask about a campaign
curl --request POST \
--url https://api.pineyard.ai/campaigns/{id}/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>'})
};
fetch('https://api.pineyard.ai/campaigns/{id}/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/chat"
payload = { "message": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"messageId": "<string>",
"sessionId": "<string>"
}Results & insights
Ask about a campaign
Ask a question about a campaign’s results. Each campaign conversation has a fair-use message cap (429 message_limit_reached). Read replies with GET /campaigns/{id}/chat/messages, or use the streaming variant.
POST
/
campaigns
/
{id}
/
chat
Ask about a campaign
curl --request POST \
--url https://api.pineyard.ai/campaigns/{id}/chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>'})
};
fetch('https://api.pineyard.ai/campaigns/{id}/chat', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/chat"
payload = { "message": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"messageId": "<string>",
"sessionId": "<string>"
}Required scope:
intel.view
Requires a plan that includes business intelligence (ai tier). Otherwise the request is refused; see Errors.

