Draft a conversation flow with AI
curl --request POST \
--url https://api.pineyard.ai/agents/studio/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"goal": "<string>",
"companyName": "<string>",
"languages": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({goal: '<string>', companyName: '<string>', languages: ['<string>']})
};
fetch('https://api.pineyard.ai/agents/studio/draft', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents/studio/draft"
payload = {
"goal": "<string>",
"companyName": "<string>",
"languages": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"flowGraph": {
"nodes": [
{
"id": "<string>",
"type": "step",
"title": "<string>",
"detail": "<string>"
}
],
"edges": [
{
"id": "<string>",
"source": "<string>",
"target": "<string>",
"condition": "<string>"
}
]
},
"flowSteps": [
{
"id": "<string>",
"title": "<string>",
"detail": "<string>"
}
],
"faqs": [
{
"question": "<string>",
"answer": "<string>"
}
],
"openingLine": "<string>",
"suggestedExtractionKeys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"keyTerms": [
"<string>"
],
"aiUsed": true,
"cached": true
}Agent studio
Draft a conversation flow with AI
AI-draft the conversation flow, FAQs, and suggested extraction fields for the Studio wizard
POST
/
agents
/
studio
/
draft
Draft a conversation flow with AI
curl --request POST \
--url https://api.pineyard.ai/agents/studio/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"goal": "<string>",
"companyName": "<string>",
"languages": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({goal: '<string>', companyName: '<string>', languages: ['<string>']})
};
fetch('https://api.pineyard.ai/agents/studio/draft', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents/studio/draft"
payload = {
"goal": "<string>",
"companyName": "<string>",
"languages": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"flowGraph": {
"nodes": [
{
"id": "<string>",
"type": "step",
"title": "<string>",
"detail": "<string>"
}
],
"edges": [
{
"id": "<string>",
"source": "<string>",
"target": "<string>",
"condition": "<string>"
}
]
},
"flowSteps": [
{
"id": "<string>",
"title": "<string>",
"detail": "<string>"
}
],
"faqs": [
{
"question": "<string>",
"answer": "<string>"
}
],
"openingLine": "<string>",
"suggestedExtractionKeys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"keyTerms": [
"<string>"
],
"aiUsed": true,
"cached": true
}Required scope:
agents.edit
Requires the
agent_studio feature enabled for your workspace. Otherwise the request is refused; see Errors.Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json
Required string length:
1 - 2000Required string length:
1 - 120Required array length:
1 - 24 elementsRequired string length:
1 - 40Available options:
warm_professional, formal, casual, assertive, empathetic Maximum string length:
4000Maximum string length:
100Maximum string length:
100Maximum string length:
100Maximum string length:
8000Required string length:
1 - 40Minimum array length:
1Available options:
flow, faqs, opening Show child attributes
Show child attributes
Response
OK

