Duplicate a campaign
curl --request POST \
--url https://api.pineyard.ai/campaigns/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"duplicateAgent": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({duplicateAgent: false})
};
fetch('https://api.pineyard.ai/campaigns/{id}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/duplicate"
payload = { "duplicateAgent": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"campaignId": "<string>",
"agentId": "<string>",
"agentDuplicated": true
}Campaigns
Duplicate a campaign
Duplicate a campaign as a new DRAFT — clones its full config; optionally clones the agent too.
POST
/
campaigns
/
{id}
/
duplicate
Duplicate a campaign
curl --request POST \
--url https://api.pineyard.ai/campaigns/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"duplicateAgent": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({duplicateAgent: false})
};
fetch('https://api.pineyard.ai/campaigns/{id}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/duplicate"
payload = { "duplicateAgent": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"campaignId": "<string>",
"agentId": "<string>",
"agentDuplicated": true
}Required scope:
campaigns.edit
