Duplicate an agent
curl --request POST \
--url https://api.pineyard.ai/agents/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.pineyard.ai/agents/{id}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents/{id}/duplicate"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"greeting": "<string>",
"voice": "<string>",
"status": "<string>",
"preCallVariables": [
"<string>"
],
"variables": [
"<string>"
],
"systemVariables": [
"<string>"
],
"extractionConfig": {
"prompt": "<string>",
"keys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"includeToolLogs": false
},
"agentType": "<string>",
"enableRecording": true,
"endCallEnabled": true,
"endCallMessage": "<string>",
"endCallTriggers": [
"<string>"
],
"maxCallDurationSecs": 123,
"backgroundAudioId": "<string>",
"backgroundAudioVolume": 123,
"voicemailDetectionEnabled": true,
"voicemailMessage": "<string>",
"screenerHandlingEnabled": true,
"transferEnabled": true,
"transferNumber": "<string>",
"transferMessage": "<string>",
"transferTriggers": [
"<string>"
],
"language": "<string>",
"studioConfig": {
"agentName": "<string>",
"companyName": "<string>",
"languages": [
"<string>"
],
"primaryLanguage": "<string>",
"gender": "female",
"tone": "warm_professional",
"goal": "<string>",
"flowSteps": [
{
"id": "<string>",
"title": "<string>",
"detail": "<string>"
}
],
"faqs": [
{
"question": "<string>",
"answer": "<string>"
}
],
"industry": "<string>",
"designation": "<string>",
"companyDescription": "<string>",
"briefText": "<string>",
"welcomeMessage": "<string>",
"guardrails": [],
"flowGraph": {
"nodes": [
{
"id": "<string>",
"type": "step",
"title": "<string>",
"detail": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"edges": [
{
"id": "<string>",
"source": "<string>",
"target": "<string>",
"condition": "<string>"
}
]
},
"closingBehavior": "confirm_and_end",
"abilities": {
"transfer": {
"number": "<string>",
"triggers": [
"CALLER_ASKS_HUMAN"
]
},
"booking": {
"types": [
"site_visit"
]
},
"callback": true,
"whatsapp": {
"collectionIds": [
"<string>"
],
"templateIds": [
"<string>"
]
},
"knowledgeDocIds": [
"<string>"
],
"functionIds": [
"<string>"
]
},
"languageSwitching": "fast",
"keyTerms": [
"<string>"
],
"sampleDialogue": "<string>",
"promptSpec": 1,
"overrides": {
"namesPolicy": "use_name",
"identityConfirm": "by_name",
"silenceHandling": "ask",
"endCallEtiquette": "close_only",
"mixRatio": "balanced"
}
},
"abilities": {
"transfer": {
"number": "<string>",
"triggers": [
"CALLER_ASKS_HUMAN"
]
},
"booking": {
"types": [
"site_visit"
]
},
"callback": true,
"whatsapp": {
"collectionIds": [
"<string>"
],
"templateIds": [
"<string>"
]
},
"knowledgeDocIds": [
"<string>"
],
"functionIds": [
"<string>"
]
},
"promptEditedManually": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}Agents
Duplicate an agent
Duplicate an agent — clones its configuration into a new, freshly provisioned agent.
POST
/
agents
/
{id}
/
duplicate
Duplicate an agent
curl --request POST \
--url https://api.pineyard.ai/agents/{id}/duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.pineyard.ai/agents/{id}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents/{id}/duplicate"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"prompt": "<string>",
"greeting": "<string>",
"voice": "<string>",
"status": "<string>",
"preCallVariables": [
"<string>"
],
"variables": [
"<string>"
],
"systemVariables": [
"<string>"
],
"extractionConfig": {
"prompt": "<string>",
"keys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"includeToolLogs": false
},
"agentType": "<string>",
"enableRecording": true,
"endCallEnabled": true,
"endCallMessage": "<string>",
"endCallTriggers": [
"<string>"
],
"maxCallDurationSecs": 123,
"backgroundAudioId": "<string>",
"backgroundAudioVolume": 123,
"voicemailDetectionEnabled": true,
"voicemailMessage": "<string>",
"screenerHandlingEnabled": true,
"transferEnabled": true,
"transferNumber": "<string>",
"transferMessage": "<string>",
"transferTriggers": [
"<string>"
],
"language": "<string>",
"studioConfig": {
"agentName": "<string>",
"companyName": "<string>",
"languages": [
"<string>"
],
"primaryLanguage": "<string>",
"gender": "female",
"tone": "warm_professional",
"goal": "<string>",
"flowSteps": [
{
"id": "<string>",
"title": "<string>",
"detail": "<string>"
}
],
"faqs": [
{
"question": "<string>",
"answer": "<string>"
}
],
"industry": "<string>",
"designation": "<string>",
"companyDescription": "<string>",
"briefText": "<string>",
"welcomeMessage": "<string>",
"guardrails": [],
"flowGraph": {
"nodes": [
{
"id": "<string>",
"type": "step",
"title": "<string>",
"detail": "<string>",
"position": {
"x": 123,
"y": 123
}
}
],
"edges": [
{
"id": "<string>",
"source": "<string>",
"target": "<string>",
"condition": "<string>"
}
]
},
"closingBehavior": "confirm_and_end",
"abilities": {
"transfer": {
"number": "<string>",
"triggers": [
"CALLER_ASKS_HUMAN"
]
},
"booking": {
"types": [
"site_visit"
]
},
"callback": true,
"whatsapp": {
"collectionIds": [
"<string>"
],
"templateIds": [
"<string>"
]
},
"knowledgeDocIds": [
"<string>"
],
"functionIds": [
"<string>"
]
},
"languageSwitching": "fast",
"keyTerms": [
"<string>"
],
"sampleDialogue": "<string>",
"promptSpec": 1,
"overrides": {
"namesPolicy": "use_name",
"identityConfirm": "by_name",
"silenceHandling": "ask",
"endCallEtiquette": "close_only",
"mixRatio": "balanced"
}
},
"abilities": {
"transfer": {
"number": "<string>",
"triggers": [
"CALLER_ASKS_HUMAN"
]
},
"booking": {
"types": [
"site_visit"
]
},
"callback": true,
"whatsapp": {
"collectionIds": [
"<string>"
],
"templateIds": [
"<string>"
]
},
"knowledgeDocIds": [
"<string>"
],
"functionIds": [
"<string>"
]
},
"promptEditedManually": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}Required scope:
agents.edit
Idempotency: an Idempotency-Key header is required when calling with an API key. See Idempotency.Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Headers
Unique value (e.g. a UUID) per action, up to 200 printable ASCII characters. Reuse it only to retry the same request; the first response is replayed for 24 hours.
Maximum string length:
200Example:
"f1d2c3b4-0000-4000-8000-000000000000"
Path Parameters
Response
Created
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

