Create a new agent
curl --request POST \
--url https://api.pineyard.ai/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"voice": "<string>",
"prompt": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', voice: '<string>', prompt: '<string>'})
};
fetch('https://api.pineyard.ai/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents"
payload = {
"name": "<string>",
"voice": "<string>",
"prompt": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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>",
"warnings": [
{
"code": "<string>",
"message": "<string>"
}
]
}Agents
Create a new agent
API keys: knowledge documents listed in abilities are attached only if the key has knowledge.edit. Custom functions are never attached by a key. Skipped items are reported in warnings (knowledge_docs_skipped, function_assign_skipped); the agent is still created.
POST
/
agents
Create a new agent
curl --request POST \
--url https://api.pineyard.ai/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"voice": "<string>",
"prompt": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', voice: '<string>', prompt: '<string>'})
};
fetch('https://api.pineyard.ai/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents"
payload = {
"name": "<string>",
"voice": "<string>",
"prompt": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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>",
"warnings": [
{
"code": "<string>",
"message": "<string>"
}
]
}Required scope:
agents.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json
Required string length:
1 - 100Minimum string length:
1Maximum string length:
128000Maximum string length:
2000Maximum 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
Response
Created
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

