Create a conversational agent
curl --request POST \
--url https://api.operator.xyz/conversational_agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Operator-Version: <operator-version>' \
--data '
{
"name": "<string>",
"description": "<string>",
"config": {
"personas": [
{
"name": "<string>",
"voice": {
"provider": "operator"
}
}
],
"voice": {
"boosted_keywords": [
"<string>"
],
"ambient_sound": null,
"busy_sound": null
},
"runtime": {
"prompt": {
"text": "<string>",
"type": "fixed"
},
"variables": [
{
"name": "<string>",
"description": "<string>",
"default_value": null
}
]
},
"tool": {
"tools": [
{
"name": "<string>"
}
],
"transfers": [
{
"id": "<string>"
}
]
},
"language": {
"supported_languages": []
},
"channel": {
"is_voicemail_enabled": true
}
}
}
'import requests
url = "https://api.operator.xyz/conversational_agents"
payload = {
"name": "<string>",
"description": "<string>",
"config": {
"personas": [
{
"name": "<string>",
"voice": { "provider": "operator" }
}
],
"voice": {
"boosted_keywords": ["<string>"],
"ambient_sound": None,
"busy_sound": None
},
"runtime": {
"prompt": {
"text": "<string>",
"type": "fixed"
},
"variables": [
{
"name": "<string>",
"description": "<string>",
"default_value": None
}
]
},
"tool": {
"tools": [{ "name": "<string>" }],
"transfers": [{ "id": "<string>" }]
},
"language": { "supported_languages": [] },
"channel": { "is_voicemail_enabled": True }
}
}
headers = {
"Operator-Version": "<operator-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Operator-Version': '<operator-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
config: {
personas: [{name: '<string>', voice: {provider: 'operator'}}],
voice: {boosted_keywords: ['<string>'], ambient_sound: null, busy_sound: null},
runtime: {
prompt: {text: '<string>', type: 'fixed'},
variables: [{name: '<string>', description: '<string>', default_value: null}]
},
tool: {tools: [{name: '<string>'}], transfers: [{id: '<string>'}]},
language: {supported_languages: []},
channel: {is_voicemail_enabled: true}
}
})
};
fetch('https://api.operator.xyz/conversational_agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"version_id": "<string>"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}Conversational agents
Create a conversational agent
POST
/
conversational_agents
Create a conversational agent
curl --request POST \
--url https://api.operator.xyz/conversational_agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Operator-Version: <operator-version>' \
--data '
{
"name": "<string>",
"description": "<string>",
"config": {
"personas": [
{
"name": "<string>",
"voice": {
"provider": "operator"
}
}
],
"voice": {
"boosted_keywords": [
"<string>"
],
"ambient_sound": null,
"busy_sound": null
},
"runtime": {
"prompt": {
"text": "<string>",
"type": "fixed"
},
"variables": [
{
"name": "<string>",
"description": "<string>",
"default_value": null
}
]
},
"tool": {
"tools": [
{
"name": "<string>"
}
],
"transfers": [
{
"id": "<string>"
}
]
},
"language": {
"supported_languages": []
},
"channel": {
"is_voicemail_enabled": true
}
}
}
'import requests
url = "https://api.operator.xyz/conversational_agents"
payload = {
"name": "<string>",
"description": "<string>",
"config": {
"personas": [
{
"name": "<string>",
"voice": { "provider": "operator" }
}
],
"voice": {
"boosted_keywords": ["<string>"],
"ambient_sound": None,
"busy_sound": None
},
"runtime": {
"prompt": {
"text": "<string>",
"type": "fixed"
},
"variables": [
{
"name": "<string>",
"description": "<string>",
"default_value": None
}
]
},
"tool": {
"tools": [{ "name": "<string>" }],
"transfers": [{ "id": "<string>" }]
},
"language": { "supported_languages": [] },
"channel": { "is_voicemail_enabled": True }
}
}
headers = {
"Operator-Version": "<operator-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Operator-Version': '<operator-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
config: {
personas: [{name: '<string>', voice: {provider: 'operator'}}],
voice: {boosted_keywords: ['<string>'], ambient_sound: null, busy_sound: null},
runtime: {
prompt: {text: '<string>', type: 'fixed'},
variables: [{name: '<string>', description: '<string>', default_value: null}]
},
tool: {tools: [{name: '<string>'}], transfers: [{id: '<string>'}]},
language: {supported_languages: []},
channel: {is_voicemail_enabled: true}
}
})
};
fetch('https://api.operator.xyz/conversational_agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"version_id": "<string>"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}Authorizations
Body
application/json

