Update an agent
curl --request PATCH \
--url https://api.pineyard.ai/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"prompt": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', prompt: '<string>'})
};
fetch('https://api.pineyard.ai/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents/{id}"
payload = {
"name": "<string>",
"prompt": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, 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
Update an agent
PATCH
/
agents
/
{id}
Update an agent
curl --request PATCH \
--url https://api.pineyard.ai/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"prompt": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', prompt: '<string>'})
};
fetch('https://api.pineyard.ai/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents/{id}"
payload = {
"name": "<string>",
"prompt": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, 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.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Body
application/json
Required string length:
1 - 100Required string length:
1 - 128000Maximum string length:
2000Minimum string length:
1Maximum array length:
100Pattern:
^[a-zA-Z_][a-zA-Z0-9_]*$Show child attributes
Show child attributes
Available options:
OUTBOUND, INBOUND Maximum string length:
500Maximum array length:
4Available options:
CALLER_GOODBYE, GOAL_COMPLETED, IDLE, REMOVE_FROM_LIST Required range:
60 <= x <= 3600Required range:
0 <= x <= 1Maximum string length:
500Maximum string length:
32Pattern:
^\+\d{8,15}$Maximum string length:
500Available options:
CALLER_ASKS_HUMAN, FRUSTRATED, ASKS_MANAGER, UNKNOWN_QUESTION, BILLING Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

