Create Text Pearl
Creates a new text Pearl: the conversation is driven by a graph of nodes connected by transitions, and messages are exchanged over a text channel. Provide exactly one channel: inbound settings OR outbound settings, with the TextChannelId of the channel to use. To retrieve available text channels, use the Get Text Channels endpoint (GET /v2/Account/TextChannels). The Pearl is created already published: the configuration you send becomes its live (published) version. For more details, click here.
curl --request POST \
--url https://api.nlpearl.ai/v2/Pearl/Text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"pearl": {
"agentPersonality": "<string>",
"timeZone": "<string>",
"modelType": 123,
"companyName": "<string>",
"companyDescription": "<string>",
"generalInstructions": "<string>",
"knowledgeBase": "<string>",
"memory": true,
"successDescription": "<string>",
"indicatorTags": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": 123
}
],
"nodes": [
{
"nodeId": "<string>",
"name": "<string>",
"nodeType": 123,
"transitions": [
{
"name": "<string>",
"toNodeId": "<string>",
"apiResult": 123
}
],
"script": "<string>",
"instructions": "<string>",
"apiSettings": {
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"headers": {},
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"credentialId": "<string>"
},
"smsSettings": {
"body": "<string>"
},
"emailSettings": {
"to": [
"<string>"
],
"cc": [
"<string>"
],
"subject": "<string>",
"body": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": true,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
},
"transferCallSettings": {
"transferCallPhoneNumber": "<string>",
"triggerDescription": "<string>",
"warmTransferMessage": "<string>"
},
"handOffAction": "<array>",
"postCallActions": "<array>"
}
],
"agentName": "<string>"
},
"variables": [
{
"id": "<string>",
"name": "<string>",
"group": 123,
"type": 123,
"isList": true,
"description": "<string>",
"value": "<string>",
"options": [
{
"value": "<string>",
"code": "<string>"
}
]
}
],
"inbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"callWebhookUrl": "<string>",
"textChannelId": "<string>",
"maxTurns": 123,
"autoCloseAfterInactivityHours": 123,
"inactivityFollowUps": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
},
"outbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"budgetTotal": 123,
"timeZone": "<string>",
"callingHours": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
],
"callWebhookUrl": "<string>",
"leadWebhookUrl": "<string>",
"textChannelId": "<string>",
"maxTurns": 123,
"autoCloseAfterInactivityHours": 123,
"inactivityFollowUps": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
}
}
'import requests
url = "https://api.nlpearl.ai/v2/Pearl/Text"
payload = {
"name": "<string>",
"pearl": {
"agentPersonality": "<string>",
"timeZone": "<string>",
"modelType": 123,
"companyName": "<string>",
"companyDescription": "<string>",
"generalInstructions": "<string>",
"knowledgeBase": "<string>",
"memory": True,
"successDescription": "<string>",
"indicatorTags": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": 123
}
],
"nodes": [
{
"nodeId": "<string>",
"name": "<string>",
"nodeType": 123,
"transitions": [
{
"name": "<string>",
"toNodeId": "<string>",
"apiResult": 123
}
],
"script": "<string>",
"instructions": "<string>",
"apiSettings": {
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"headers": {},
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"credentialId": "<string>"
},
"smsSettings": { "body": "<string>" },
"emailSettings": {
"to": ["<string>"],
"cc": ["<string>"],
"subject": "<string>",
"body": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": True,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
},
"transferCallSettings": {
"transferCallPhoneNumber": "<string>",
"triggerDescription": "<string>",
"warmTransferMessage": "<string>"
},
"handOffAction": "<array>",
"postCallActions": "<array>"
}
],
"agentName": "<string>"
},
"variables": [
{
"id": "<string>",
"name": "<string>",
"group": 123,
"type": 123,
"isList": True,
"description": "<string>",
"value": "<string>",
"options": [
{
"value": "<string>",
"code": "<string>"
}
]
}
],
"inbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"callWebhookUrl": "<string>",
"textChannelId": "<string>",
"maxTurns": 123,
"autoCloseAfterInactivityHours": 123,
"inactivityFollowUps": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
},
"outbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"budgetTotal": 123,
"timeZone": "<string>",
"callingHours": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
],
"callWebhookUrl": "<string>",
"leadWebhookUrl": "<string>",
"textChannelId": "<string>",
"maxTurns": 123,
"autoCloseAfterInactivityHours": 123,
"inactivityFollowUps": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
pearl: {
agentPersonality: '<string>',
timeZone: '<string>',
modelType: 123,
companyName: '<string>',
companyDescription: '<string>',
generalInstructions: '<string>',
knowledgeBase: '<string>',
memory: true,
successDescription: '<string>',
indicatorTags: [{id: '<string>', name: '<string>', description: '<string>', color: 123}],
nodes: [
{
nodeId: '<string>',
name: '<string>',
nodeType: 123,
transitions: [{name: '<string>', toNodeId: '<string>', apiResult: 123}],
script: '<string>',
instructions: '<string>',
apiSettings: {
name: '<string>',
method: 123,
endpointUrl: '<string>',
body: JSON.stringify([
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
]),
headers: {},
description: '<string>',
outputBody: [
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
],
credentialId: '<string>'
},
smsSettings: {body: JSON.stringify('<string>')},
emailSettings: {
to: ['<string>'],
cc: ['<string>'],
subject: '<string>',
body: JSON.stringify('<string>'),
smtpSettings: {
id: '<string>',
provider: 123,
smtpServer: '<string>',
port: 123,
enableSsl: true,
senderEmail: '<string>',
senderPassword: '<string>',
displayName: '<string>'
}
},
transferCallSettings: {
transferCallPhoneNumber: '<string>',
triggerDescription: '<string>',
warmTransferMessage: '<string>'
},
handOffAction: '<array>',
postCallActions: '<array>'
}
],
agentName: '<string>'
},
variables: [
{
id: '<string>',
name: '<string>',
group: 123,
type: 123,
isList: true,
description: '<string>',
value: '<string>',
options: [{value: '<string>', code: '<string>'}]
}
],
inbound: {
totalAgents: 123,
transcriptOptions: 123,
callWebhookUrl: '<string>',
textChannelId: '<string>',
maxTurns: 123,
autoCloseAfterInactivityHours: 123,
inactivityFollowUps: [{delayMinutes: 123, message: '<string>'}]
},
outbound: {
totalAgents: 123,
transcriptOptions: 123,
budgetTotal: 123,
timeZone: '<string>',
callingHours: [{day: 123, start: '<string>', end: '<string>'}],
callWebhookUrl: '<string>',
leadWebhookUrl: '<string>',
textChannelId: '<string>',
maxTurns: 123,
autoCloseAfterInactivityHours: 123,
inactivityFollowUps: [{delayMinutes: 123, message: '<string>'}]
}
})
};
fetch('https://api.nlpearl.ai/v2/Pearl/Text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nlpearl.ai/v2/Pearl/Text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'pearl' => [
'agentPersonality' => '<string>',
'timeZone' => '<string>',
'modelType' => 123,
'companyName' => '<string>',
'companyDescription' => '<string>',
'generalInstructions' => '<string>',
'knowledgeBase' => '<string>',
'memory' => true,
'successDescription' => '<string>',
'indicatorTags' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'color' => 123
]
],
'nodes' => [
[
'nodeId' => '<string>',
'name' => '<string>',
'nodeType' => 123,
'transitions' => [
[
'name' => '<string>',
'toNodeId' => '<string>',
'apiResult' => 123
]
],
'script' => '<string>',
'instructions' => '<string>',
'apiSettings' => [
'name' => '<string>',
'method' => 123,
'endpointUrl' => '<string>',
'body' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'headers' => [
],
'description' => '<string>',
'outputBody' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'credentialId' => '<string>'
],
'smsSettings' => [
'body' => '<string>'
],
'emailSettings' => [
'to' => [
'<string>'
],
'cc' => [
'<string>'
],
'subject' => '<string>',
'body' => '<string>',
'smtpSettings' => [
'id' => '<string>',
'provider' => 123,
'smtpServer' => '<string>',
'port' => 123,
'enableSsl' => true,
'senderEmail' => '<string>',
'senderPassword' => '<string>',
'displayName' => '<string>'
]
],
'transferCallSettings' => [
'transferCallPhoneNumber' => '<string>',
'triggerDescription' => '<string>',
'warmTransferMessage' => '<string>'
],
'handOffAction' => '<array>',
'postCallActions' => '<array>'
]
],
'agentName' => '<string>'
],
'variables' => [
[
'id' => '<string>',
'name' => '<string>',
'group' => 123,
'type' => 123,
'isList' => true,
'description' => '<string>',
'value' => '<string>',
'options' => [
[
'value' => '<string>',
'code' => '<string>'
]
]
]
],
'inbound' => [
'totalAgents' => 123,
'transcriptOptions' => 123,
'callWebhookUrl' => '<string>',
'textChannelId' => '<string>',
'maxTurns' => 123,
'autoCloseAfterInactivityHours' => 123,
'inactivityFollowUps' => [
[
'delayMinutes' => 123,
'message' => '<string>'
]
]
],
'outbound' => [
'totalAgents' => 123,
'transcriptOptions' => 123,
'budgetTotal' => 123,
'timeZone' => '<string>',
'callingHours' => [
[
'day' => 123,
'start' => '<string>',
'end' => '<string>'
]
],
'callWebhookUrl' => '<string>',
'leadWebhookUrl' => '<string>',
'textChannelId' => '<string>',
'maxTurns' => 123,
'autoCloseAfterInactivityHours' => 123,
'inactivityFollowUps' => [
[
'delayMinutes' => 123,
'message' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nlpearl.ai/v2/Pearl/Text"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"generalInstructions\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"nodes\": [\n {\n \"nodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"nodeType\": 123,\n \"transitions\": [\n {\n \"name\": \"<string>\",\n \"toNodeId\": \"<string>\",\n \"apiResult\": 123\n }\n ],\n \"script\": \"<string>\",\n \"instructions\": \"<string>\",\n \"apiSettings\": {\n \"name\": \"<string>\",\n \"method\": 123,\n \"endpointUrl\": \"<string>\",\n \"body\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"headers\": {},\n \"description\": \"<string>\",\n \"outputBody\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"credentialId\": \"<string>\"\n },\n \"smsSettings\": {\n \"body\": \"<string>\"\n },\n \"emailSettings\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"smtpSettings\": {\n \"id\": \"<string>\",\n \"provider\": 123,\n \"smtpServer\": \"<string>\",\n \"port\": 123,\n \"enableSsl\": true,\n \"senderEmail\": \"<string>\",\n \"senderPassword\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n },\n \"transferCallSettings\": {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n },\n \"handOffAction\": \"<array>\",\n \"postCallActions\": \"<array>\"\n }\n ],\n \"agentName\": \"<string>\"\n },\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"group\": 123,\n \"type\": 123,\n \"isList\": true,\n \"description\": \"<string>\",\n \"value\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"code\": \"<string>\"\n }\n ]\n }\n ],\n \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nlpearl.ai/v2/Pearl/Text")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"generalInstructions\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"nodes\": [\n {\n \"nodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"nodeType\": 123,\n \"transitions\": [\n {\n \"name\": \"<string>\",\n \"toNodeId\": \"<string>\",\n \"apiResult\": 123\n }\n ],\n \"script\": \"<string>\",\n \"instructions\": \"<string>\",\n \"apiSettings\": {\n \"name\": \"<string>\",\n \"method\": 123,\n \"endpointUrl\": \"<string>\",\n \"body\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"headers\": {},\n \"description\": \"<string>\",\n \"outputBody\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"credentialId\": \"<string>\"\n },\n \"smsSettings\": {\n \"body\": \"<string>\"\n },\n \"emailSettings\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"smtpSettings\": {\n \"id\": \"<string>\",\n \"provider\": 123,\n \"smtpServer\": \"<string>\",\n \"port\": 123,\n \"enableSsl\": true,\n \"senderEmail\": \"<string>\",\n \"senderPassword\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n },\n \"transferCallSettings\": {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n },\n \"handOffAction\": \"<array>\",\n \"postCallActions\": \"<array>\"\n }\n ],\n \"agentName\": \"<string>\"\n },\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"group\": 123,\n \"type\": 123,\n \"isList\": true,\n \"description\": \"<string>\",\n \"value\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"code\": \"<string>\"\n }\n ]\n }\n ],\n \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlpearl.ai/v2/Pearl/Text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"generalInstructions\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"nodes\": [\n {\n \"nodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"nodeType\": 123,\n \"transitions\": [\n {\n \"name\": \"<string>\",\n \"toNodeId\": \"<string>\",\n \"apiResult\": 123\n }\n ],\n \"script\": \"<string>\",\n \"instructions\": \"<string>\",\n \"apiSettings\": {\n \"name\": \"<string>\",\n \"method\": 123,\n \"endpointUrl\": \"<string>\",\n \"body\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"headers\": {},\n \"description\": \"<string>\",\n \"outputBody\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"credentialId\": \"<string>\"\n },\n \"smsSettings\": {\n \"body\": \"<string>\"\n },\n \"emailSettings\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"smtpSettings\": {\n \"id\": \"<string>\",\n \"provider\": 123,\n \"smtpServer\": \"<string>\",\n \"port\": 123,\n \"enableSsl\": true,\n \"senderEmail\": \"<string>\",\n \"senderPassword\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n },\n \"transferCallSettings\": {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n },\n \"handOffAction\": \"<array>\",\n \"postCallActions\": \"<array>\"\n }\n ],\n \"agentName\": \"<string>\"\n },\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"group\": 123,\n \"type\": 123,\n \"isList\": true,\n \"description\": \"<string>\",\n \"value\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"code\": \"<string>\"\n }\n ]\n }\n ],\n \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}Authorizations
Specify the authorization token.
For more information, check out the Authorization Guide.
Body
The name of the Pearl.
Conversation flow (node graph) and agent behavior configuration for the Pearl.
Show child attributes
Show child attributes
Variables that can be defined, stored, and used by the agent during conversations. For details on variable groups and how to use variables in supported fields, see: Flow Variables
Show child attributes
Show child attributes
Inbound text settings for the Pearl. Required when creating an inbound Pearl. Must not be provided together with Outbound.
Show child attributes
Show child attributes
Outbound text settings for the Pearl. Required when creating an outbound Pearl. Must not be provided together with Inbound.
Show child attributes
Show child attributes
Response
The ID of the newly created Pearl.
The response is of type string.
curl --request POST \
--url https://api.nlpearl.ai/v2/Pearl/Text \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"pearl": {
"agentPersonality": "<string>",
"timeZone": "<string>",
"modelType": 123,
"companyName": "<string>",
"companyDescription": "<string>",
"generalInstructions": "<string>",
"knowledgeBase": "<string>",
"memory": true,
"successDescription": "<string>",
"indicatorTags": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": 123
}
],
"nodes": [
{
"nodeId": "<string>",
"name": "<string>",
"nodeType": 123,
"transitions": [
{
"name": "<string>",
"toNodeId": "<string>",
"apiResult": 123
}
],
"script": "<string>",
"instructions": "<string>",
"apiSettings": {
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"headers": {},
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"credentialId": "<string>"
},
"smsSettings": {
"body": "<string>"
},
"emailSettings": {
"to": [
"<string>"
],
"cc": [
"<string>"
],
"subject": "<string>",
"body": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": true,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
},
"transferCallSettings": {
"transferCallPhoneNumber": "<string>",
"triggerDescription": "<string>",
"warmTransferMessage": "<string>"
},
"handOffAction": "<array>",
"postCallActions": "<array>"
}
],
"agentName": "<string>"
},
"variables": [
{
"id": "<string>",
"name": "<string>",
"group": 123,
"type": 123,
"isList": true,
"description": "<string>",
"value": "<string>",
"options": [
{
"value": "<string>",
"code": "<string>"
}
]
}
],
"inbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"callWebhookUrl": "<string>",
"textChannelId": "<string>",
"maxTurns": 123,
"autoCloseAfterInactivityHours": 123,
"inactivityFollowUps": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
},
"outbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"budgetTotal": 123,
"timeZone": "<string>",
"callingHours": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
],
"callWebhookUrl": "<string>",
"leadWebhookUrl": "<string>",
"textChannelId": "<string>",
"maxTurns": 123,
"autoCloseAfterInactivityHours": 123,
"inactivityFollowUps": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
}
}
'import requests
url = "https://api.nlpearl.ai/v2/Pearl/Text"
payload = {
"name": "<string>",
"pearl": {
"agentPersonality": "<string>",
"timeZone": "<string>",
"modelType": 123,
"companyName": "<string>",
"companyDescription": "<string>",
"generalInstructions": "<string>",
"knowledgeBase": "<string>",
"memory": True,
"successDescription": "<string>",
"indicatorTags": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": 123
}
],
"nodes": [
{
"nodeId": "<string>",
"name": "<string>",
"nodeType": 123,
"transitions": [
{
"name": "<string>",
"toNodeId": "<string>",
"apiResult": 123
}
],
"script": "<string>",
"instructions": "<string>",
"apiSettings": {
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"headers": {},
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"credentialId": "<string>"
},
"smsSettings": { "body": "<string>" },
"emailSettings": {
"to": ["<string>"],
"cc": ["<string>"],
"subject": "<string>",
"body": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": True,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
},
"transferCallSettings": {
"transferCallPhoneNumber": "<string>",
"triggerDescription": "<string>",
"warmTransferMessage": "<string>"
},
"handOffAction": "<array>",
"postCallActions": "<array>"
}
],
"agentName": "<string>"
},
"variables": [
{
"id": "<string>",
"name": "<string>",
"group": 123,
"type": 123,
"isList": True,
"description": "<string>",
"value": "<string>",
"options": [
{
"value": "<string>",
"code": "<string>"
}
]
}
],
"inbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"callWebhookUrl": "<string>",
"textChannelId": "<string>",
"maxTurns": 123,
"autoCloseAfterInactivityHours": 123,
"inactivityFollowUps": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
},
"outbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"budgetTotal": 123,
"timeZone": "<string>",
"callingHours": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
],
"callWebhookUrl": "<string>",
"leadWebhookUrl": "<string>",
"textChannelId": "<string>",
"maxTurns": 123,
"autoCloseAfterInactivityHours": 123,
"inactivityFollowUps": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
pearl: {
agentPersonality: '<string>',
timeZone: '<string>',
modelType: 123,
companyName: '<string>',
companyDescription: '<string>',
generalInstructions: '<string>',
knowledgeBase: '<string>',
memory: true,
successDescription: '<string>',
indicatorTags: [{id: '<string>', name: '<string>', description: '<string>', color: 123}],
nodes: [
{
nodeId: '<string>',
name: '<string>',
nodeType: 123,
transitions: [{name: '<string>', toNodeId: '<string>', apiResult: 123}],
script: '<string>',
instructions: '<string>',
apiSettings: {
name: '<string>',
method: 123,
endpointUrl: '<string>',
body: JSON.stringify([
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
]),
headers: {},
description: '<string>',
outputBody: [
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
],
credentialId: '<string>'
},
smsSettings: {body: JSON.stringify('<string>')},
emailSettings: {
to: ['<string>'],
cc: ['<string>'],
subject: '<string>',
body: JSON.stringify('<string>'),
smtpSettings: {
id: '<string>',
provider: 123,
smtpServer: '<string>',
port: 123,
enableSsl: true,
senderEmail: '<string>',
senderPassword: '<string>',
displayName: '<string>'
}
},
transferCallSettings: {
transferCallPhoneNumber: '<string>',
triggerDescription: '<string>',
warmTransferMessage: '<string>'
},
handOffAction: '<array>',
postCallActions: '<array>'
}
],
agentName: '<string>'
},
variables: [
{
id: '<string>',
name: '<string>',
group: 123,
type: 123,
isList: true,
description: '<string>',
value: '<string>',
options: [{value: '<string>', code: '<string>'}]
}
],
inbound: {
totalAgents: 123,
transcriptOptions: 123,
callWebhookUrl: '<string>',
textChannelId: '<string>',
maxTurns: 123,
autoCloseAfterInactivityHours: 123,
inactivityFollowUps: [{delayMinutes: 123, message: '<string>'}]
},
outbound: {
totalAgents: 123,
transcriptOptions: 123,
budgetTotal: 123,
timeZone: '<string>',
callingHours: [{day: 123, start: '<string>', end: '<string>'}],
callWebhookUrl: '<string>',
leadWebhookUrl: '<string>',
textChannelId: '<string>',
maxTurns: 123,
autoCloseAfterInactivityHours: 123,
inactivityFollowUps: [{delayMinutes: 123, message: '<string>'}]
}
})
};
fetch('https://api.nlpearl.ai/v2/Pearl/Text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nlpearl.ai/v2/Pearl/Text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'pearl' => [
'agentPersonality' => '<string>',
'timeZone' => '<string>',
'modelType' => 123,
'companyName' => '<string>',
'companyDescription' => '<string>',
'generalInstructions' => '<string>',
'knowledgeBase' => '<string>',
'memory' => true,
'successDescription' => '<string>',
'indicatorTags' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'color' => 123
]
],
'nodes' => [
[
'nodeId' => '<string>',
'name' => '<string>',
'nodeType' => 123,
'transitions' => [
[
'name' => '<string>',
'toNodeId' => '<string>',
'apiResult' => 123
]
],
'script' => '<string>',
'instructions' => '<string>',
'apiSettings' => [
'name' => '<string>',
'method' => 123,
'endpointUrl' => '<string>',
'body' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'headers' => [
],
'description' => '<string>',
'outputBody' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'credentialId' => '<string>'
],
'smsSettings' => [
'body' => '<string>'
],
'emailSettings' => [
'to' => [
'<string>'
],
'cc' => [
'<string>'
],
'subject' => '<string>',
'body' => '<string>',
'smtpSettings' => [
'id' => '<string>',
'provider' => 123,
'smtpServer' => '<string>',
'port' => 123,
'enableSsl' => true,
'senderEmail' => '<string>',
'senderPassword' => '<string>',
'displayName' => '<string>'
]
],
'transferCallSettings' => [
'transferCallPhoneNumber' => '<string>',
'triggerDescription' => '<string>',
'warmTransferMessage' => '<string>'
],
'handOffAction' => '<array>',
'postCallActions' => '<array>'
]
],
'agentName' => '<string>'
],
'variables' => [
[
'id' => '<string>',
'name' => '<string>',
'group' => 123,
'type' => 123,
'isList' => true,
'description' => '<string>',
'value' => '<string>',
'options' => [
[
'value' => '<string>',
'code' => '<string>'
]
]
]
],
'inbound' => [
'totalAgents' => 123,
'transcriptOptions' => 123,
'callWebhookUrl' => '<string>',
'textChannelId' => '<string>',
'maxTurns' => 123,
'autoCloseAfterInactivityHours' => 123,
'inactivityFollowUps' => [
[
'delayMinutes' => 123,
'message' => '<string>'
]
]
],
'outbound' => [
'totalAgents' => 123,
'transcriptOptions' => 123,
'budgetTotal' => 123,
'timeZone' => '<string>',
'callingHours' => [
[
'day' => 123,
'start' => '<string>',
'end' => '<string>'
]
],
'callWebhookUrl' => '<string>',
'leadWebhookUrl' => '<string>',
'textChannelId' => '<string>',
'maxTurns' => 123,
'autoCloseAfterInactivityHours' => 123,
'inactivityFollowUps' => [
[
'delayMinutes' => 123,
'message' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nlpearl.ai/v2/Pearl/Text"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"generalInstructions\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"nodes\": [\n {\n \"nodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"nodeType\": 123,\n \"transitions\": [\n {\n \"name\": \"<string>\",\n \"toNodeId\": \"<string>\",\n \"apiResult\": 123\n }\n ],\n \"script\": \"<string>\",\n \"instructions\": \"<string>\",\n \"apiSettings\": {\n \"name\": \"<string>\",\n \"method\": 123,\n \"endpointUrl\": \"<string>\",\n \"body\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"headers\": {},\n \"description\": \"<string>\",\n \"outputBody\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"credentialId\": \"<string>\"\n },\n \"smsSettings\": {\n \"body\": \"<string>\"\n },\n \"emailSettings\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"smtpSettings\": {\n \"id\": \"<string>\",\n \"provider\": 123,\n \"smtpServer\": \"<string>\",\n \"port\": 123,\n \"enableSsl\": true,\n \"senderEmail\": \"<string>\",\n \"senderPassword\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n },\n \"transferCallSettings\": {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n },\n \"handOffAction\": \"<array>\",\n \"postCallActions\": \"<array>\"\n }\n ],\n \"agentName\": \"<string>\"\n },\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"group\": 123,\n \"type\": 123,\n \"isList\": true,\n \"description\": \"<string>\",\n \"value\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"code\": \"<string>\"\n }\n ]\n }\n ],\n \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nlpearl.ai/v2/Pearl/Text")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"generalInstructions\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"nodes\": [\n {\n \"nodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"nodeType\": 123,\n \"transitions\": [\n {\n \"name\": \"<string>\",\n \"toNodeId\": \"<string>\",\n \"apiResult\": 123\n }\n ],\n \"script\": \"<string>\",\n \"instructions\": \"<string>\",\n \"apiSettings\": {\n \"name\": \"<string>\",\n \"method\": 123,\n \"endpointUrl\": \"<string>\",\n \"body\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"headers\": {},\n \"description\": \"<string>\",\n \"outputBody\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"credentialId\": \"<string>\"\n },\n \"smsSettings\": {\n \"body\": \"<string>\"\n },\n \"emailSettings\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"smtpSettings\": {\n \"id\": \"<string>\",\n \"provider\": 123,\n \"smtpServer\": \"<string>\",\n \"port\": 123,\n \"enableSsl\": true,\n \"senderEmail\": \"<string>\",\n \"senderPassword\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n },\n \"transferCallSettings\": {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n },\n \"handOffAction\": \"<array>\",\n \"postCallActions\": \"<array>\"\n }\n ],\n \"agentName\": \"<string>\"\n },\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"group\": 123,\n \"type\": 123,\n \"isList\": true,\n \"description\": \"<string>\",\n \"value\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"code\": \"<string>\"\n }\n ]\n }\n ],\n \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlpearl.ai/v2/Pearl/Text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"generalInstructions\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"nodes\": [\n {\n \"nodeId\": \"<string>\",\n \"name\": \"<string>\",\n \"nodeType\": 123,\n \"transitions\": [\n {\n \"name\": \"<string>\",\n \"toNodeId\": \"<string>\",\n \"apiResult\": 123\n }\n ],\n \"script\": \"<string>\",\n \"instructions\": \"<string>\",\n \"apiSettings\": {\n \"name\": \"<string>\",\n \"method\": 123,\n \"endpointUrl\": \"<string>\",\n \"body\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"headers\": {},\n \"description\": \"<string>\",\n \"outputBody\": [\n {\n \"key\": \"<string>\",\n \"variableId\": \"<string>\",\n \"type\": 123,\n \"value\": \"<string>\",\n \"required\": true\n }\n ],\n \"credentialId\": \"<string>\"\n },\n \"smsSettings\": {\n \"body\": \"<string>\"\n },\n \"emailSettings\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"smtpSettings\": {\n \"id\": \"<string>\",\n \"provider\": 123,\n \"smtpServer\": \"<string>\",\n \"port\": 123,\n \"enableSsl\": true,\n \"senderEmail\": \"<string>\",\n \"senderPassword\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n },\n \"transferCallSettings\": {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n },\n \"handOffAction\": \"<array>\",\n \"postCallActions\": \"<array>\"\n }\n ],\n \"agentName\": \"<string>\"\n },\n \"variables\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"group\": 123,\n \"type\": 123,\n \"isList\": true,\n \"description\": \"<string>\",\n \"value\": \"<string>\",\n \"options\": [\n {\n \"value\": \"<string>\",\n \"code\": \"<string>\"\n }\n ]\n }\n ],\n \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"textChannelId\": \"<string>\",\n \"maxTurns\": 123,\n \"autoCloseAfterInactivityHours\": 123,\n \"inactivityFollowUps\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}
