curl --request PATCH \
--url https://api.pineyard.ai/v1/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/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/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>"
],
"transferMode": "STATIC",
"transferWebhookUrl": "<string>",
"transferWebhookTimeoutMs": 123,
"hasTransferWebhookSecret": true,
"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>",
"warnings": [
{
"code": "<string>",
"message": "<string>"
}
]
}Update an agent (v1)
Updates the fields you send, with the same rules as the dashboard. Without prompt visibility, prompt and studioConfig are ignored, the rest is applied, and warnings contains prompt_not_editable. Archived agents cannot be updated.
curl --request PATCH \
--url https://api.pineyard.ai/v1/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/v1/agents/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/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>"
],
"transferMode": "STATIC",
"transferWebhookUrl": "<string>",
"transferWebhookTimeoutMs": 123,
"hasTransferWebhookSecret": true,
"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>",
"warnings": [
{
"code": "<string>",
"message": "<string>"
}
]
}agents.edit
/v1 endpoint.Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Body
1 - 1001 - 12800020001100^[a-zA-Z_][a-zA-Z0-9_]*$Show child attributes
Show child attributes
OUTBOUND, INBOUND 5004CALLER_GOODBYE, GOAL_COMPLETED, IDLE, REMOVE_FROM_LIST 60 <= x <= 36000 <= x <= 150032^\+\d{8,15}$500CALLER_ASKS_HUMAN, FRUSTRATED, ASKS_MANAGER, UNKNOWN_QUESTION, BILLING STATIC transfers to transferNumber. WEBHOOK asks transferWebhookUrl for a number at call time; transferNumber is then the fallback.
STATIC, WEBHOOK HTTPS URL that answers {"to_number":"+E.164"} when a caller asks for a human. Cannot be set with an API key.
2048Write-only signing secret for requests to transferWebhookUrl. A string sets it, null or "" removes it, omit to keep. Never returned. Cannot be set with an API key.
1024How long transferWebhookUrl has to answer, in milliseconds (default 3000).
500 <= x <= 4000Show 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
STATIC, WEBHOOK Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

