Update Text Pearl
Updates a text Pearl. Only the provided parts are updated: pearl replaces the whole conversation flow (send the complete node graph), inbound/outbound partially update the channel settings (only the fields present in the JSON are applied; when TextChannelId is omitted, the current channel is kept). Omitted parts are kept unchanged. The Pearl must be a text Pearl (AgentType = Text). The update applies to the published version of the Pearl: if several versions exist on the platform, only the currently published one is modified. For more details, click here.
curl --request PUT \
--url https://api.nlpearl.ai/v2/Pearl/Text/{pearlId} \
--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": {
"value": 123
},
"transcriptOptions": {
"value": 123
},
"callWebhookUrl": {
"value": "<string>"
},
"textChannelId": {
"value": "<string>"
},
"maxTurns": {
"value": 123
},
"autoCloseAfterInactivityHours": {
"value": 123
},
"inactivityFollowUps": {
"value": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
}
},
"outbound": {
"totalAgents": {
"value": 123
},
"transcriptOptions": {
"value": 123
},
"budgetTotal": {
"value": 123
},
"timeZone": {
"value": "<string>"
},
"callingHours": {
"value": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
]
},
"callWebhookUrl": {
"value": "<string>"
},
"leadWebhookUrl": {
"value": "<string>"
},
"textChannelId": {
"value": "<string>"
},
"maxTurns": {
"value": 123
},
"autoCloseAfterInactivityHours": {
"value": 123
},
"inactivityFollowUps": {
"value": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
}
}
}
'import requests
url = "https://api.nlpearl.ai/v2/Pearl/Text/{pearlId}"
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": { "value": 123 },
"transcriptOptions": { "value": 123 },
"callWebhookUrl": { "value": "<string>" },
"textChannelId": { "value": "<string>" },
"maxTurns": { "value": 123 },
"autoCloseAfterInactivityHours": { "value": 123 },
"inactivityFollowUps": { "value": [
{
"delayMinutes": 123,
"message": "<string>"
}
] }
},
"outbound": {
"totalAgents": { "value": 123 },
"transcriptOptions": { "value": 123 },
"budgetTotal": { "value": 123 },
"timeZone": { "value": "<string>" },
"callingHours": { "value": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
] },
"callWebhookUrl": { "value": "<string>" },
"leadWebhookUrl": { "value": "<string>" },
"textChannelId": { "value": "<string>" },
"maxTurns": { "value": 123 },
"autoCloseAfterInactivityHours": { "value": 123 },
"inactivityFollowUps": { "value": [
{
"delayMinutes": 123,
"message": "<string>"
}
] }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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: {value: 123},
transcriptOptions: {value: 123},
callWebhookUrl: {value: '<string>'},
textChannelId: {value: '<string>'},
maxTurns: {value: 123},
autoCloseAfterInactivityHours: {value: 123},
inactivityFollowUps: {value: [{delayMinutes: 123, message: '<string>'}]}
},
outbound: {
totalAgents: {value: 123},
transcriptOptions: {value: 123},
budgetTotal: {value: 123},
timeZone: {value: '<string>'},
callingHours: {value: [{day: 123, start: '<string>', end: '<string>'}]},
callWebhookUrl: {value: '<string>'},
leadWebhookUrl: {value: '<string>'},
textChannelId: {value: '<string>'},
maxTurns: {value: 123},
autoCloseAfterInactivityHours: {value: 123},
inactivityFollowUps: {value: [{delayMinutes: 123, message: '<string>'}]}
}
})
};
fetch('https://api.nlpearl.ai/v2/Pearl/Text/{pearlId}', 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/{pearlId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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' => [
'value' => 123
],
'transcriptOptions' => [
'value' => 123
],
'callWebhookUrl' => [
'value' => '<string>'
],
'textChannelId' => [
'value' => '<string>'
],
'maxTurns' => [
'value' => 123
],
'autoCloseAfterInactivityHours' => [
'value' => 123
],
'inactivityFollowUps' => [
'value' => [
[
'delayMinutes' => 123,
'message' => '<string>'
]
]
]
],
'outbound' => [
'totalAgents' => [
'value' => 123
],
'transcriptOptions' => [
'value' => 123
],
'budgetTotal' => [
'value' => 123
],
'timeZone' => [
'value' => '<string>'
],
'callingHours' => [
'value' => [
[
'day' => 123,
'start' => '<string>',
'end' => '<string>'
]
]
],
'callWebhookUrl' => [
'value' => '<string>'
],
'leadWebhookUrl' => [
'value' => '<string>'
],
'textChannelId' => [
'value' => '<string>'
],
'maxTurns' => [
'value' => 123
],
'autoCloseAfterInactivityHours' => [
'value' => 123
],
'inactivityFollowUps' => [
'value' => [
[
'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/{pearlId}"
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\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n },\n \"outbound\": {\n \"totalAgents\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"budgetTotal\": {\n \"value\": 123\n },\n \"timeZone\": {\n \"value\": \"<string>\"\n },\n \"callingHours\": {\n \"value\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ]\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"leadWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.nlpearl.ai/v2/Pearl/Text/{pearlId}")
.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\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n },\n \"outbound\": {\n \"totalAgents\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"budgetTotal\": {\n \"value\": 123\n },\n \"timeZone\": {\n \"value\": \"<string>\"\n },\n \"callingHours\": {\n \"value\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ]\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"leadWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlpearl.ai/v2/Pearl/Text/{pearlId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n },\n \"outbound\": {\n \"totalAgents\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"budgetTotal\": {\n \"value\": 123\n },\n \"timeZone\": {\n \"value\": \"<string>\"\n },\n \"callingHours\": {\n \"value\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ]\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"leadWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_bodytrue{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}Authorizations
Specify the authorization token.
For more information, check out the Authorization Guide.
Path Parameters
Body
The updated name of the Pearl.
Updated conversation flow (node graph) for the Pearl. When omitted, the current flow is kept unchanged. When provided, it replaces the whole flow, so send the complete node graph.
Show child attributes
Show child attributes
Variables that can be defined, stored, and used by the agent during conversations. Used together with Pearl. For details on variable groups and how to use variables in supported fields, see: Flow Variables
Show child attributes
Show child attributes
Partial update of the inbound text settings: only the fields present in the JSON are applied. When omitted, the inbound settings are kept unchanged. Must not be provided together with Outbound.
Show child attributes
Show child attributes
Partial update of the outbound text settings: only the fields present in the JSON are applied. When omitted, the outbound settings are kept unchanged. Must not be provided together with Inbound.
Show child attributes
Show child attributes
Response
The Pearl was updated successfully.
The response is of type boolean.
curl --request PUT \
--url https://api.nlpearl.ai/v2/Pearl/Text/{pearlId} \
--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": {
"value": 123
},
"transcriptOptions": {
"value": 123
},
"callWebhookUrl": {
"value": "<string>"
},
"textChannelId": {
"value": "<string>"
},
"maxTurns": {
"value": 123
},
"autoCloseAfterInactivityHours": {
"value": 123
},
"inactivityFollowUps": {
"value": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
}
},
"outbound": {
"totalAgents": {
"value": 123
},
"transcriptOptions": {
"value": 123
},
"budgetTotal": {
"value": 123
},
"timeZone": {
"value": "<string>"
},
"callingHours": {
"value": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
]
},
"callWebhookUrl": {
"value": "<string>"
},
"leadWebhookUrl": {
"value": "<string>"
},
"textChannelId": {
"value": "<string>"
},
"maxTurns": {
"value": 123
},
"autoCloseAfterInactivityHours": {
"value": 123
},
"inactivityFollowUps": {
"value": [
{
"delayMinutes": 123,
"message": "<string>"
}
]
}
}
}
'import requests
url = "https://api.nlpearl.ai/v2/Pearl/Text/{pearlId}"
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": { "value": 123 },
"transcriptOptions": { "value": 123 },
"callWebhookUrl": { "value": "<string>" },
"textChannelId": { "value": "<string>" },
"maxTurns": { "value": 123 },
"autoCloseAfterInactivityHours": { "value": 123 },
"inactivityFollowUps": { "value": [
{
"delayMinutes": 123,
"message": "<string>"
}
] }
},
"outbound": {
"totalAgents": { "value": 123 },
"transcriptOptions": { "value": 123 },
"budgetTotal": { "value": 123 },
"timeZone": { "value": "<string>" },
"callingHours": { "value": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
] },
"callWebhookUrl": { "value": "<string>" },
"leadWebhookUrl": { "value": "<string>" },
"textChannelId": { "value": "<string>" },
"maxTurns": { "value": 123 },
"autoCloseAfterInactivityHours": { "value": 123 },
"inactivityFollowUps": { "value": [
{
"delayMinutes": 123,
"message": "<string>"
}
] }
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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: {value: 123},
transcriptOptions: {value: 123},
callWebhookUrl: {value: '<string>'},
textChannelId: {value: '<string>'},
maxTurns: {value: 123},
autoCloseAfterInactivityHours: {value: 123},
inactivityFollowUps: {value: [{delayMinutes: 123, message: '<string>'}]}
},
outbound: {
totalAgents: {value: 123},
transcriptOptions: {value: 123},
budgetTotal: {value: 123},
timeZone: {value: '<string>'},
callingHours: {value: [{day: 123, start: '<string>', end: '<string>'}]},
callWebhookUrl: {value: '<string>'},
leadWebhookUrl: {value: '<string>'},
textChannelId: {value: '<string>'},
maxTurns: {value: 123},
autoCloseAfterInactivityHours: {value: 123},
inactivityFollowUps: {value: [{delayMinutes: 123, message: '<string>'}]}
}
})
};
fetch('https://api.nlpearl.ai/v2/Pearl/Text/{pearlId}', 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/{pearlId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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' => [
'value' => 123
],
'transcriptOptions' => [
'value' => 123
],
'callWebhookUrl' => [
'value' => '<string>'
],
'textChannelId' => [
'value' => '<string>'
],
'maxTurns' => [
'value' => 123
],
'autoCloseAfterInactivityHours' => [
'value' => 123
],
'inactivityFollowUps' => [
'value' => [
[
'delayMinutes' => 123,
'message' => '<string>'
]
]
]
],
'outbound' => [
'totalAgents' => [
'value' => 123
],
'transcriptOptions' => [
'value' => 123
],
'budgetTotal' => [
'value' => 123
],
'timeZone' => [
'value' => '<string>'
],
'callingHours' => [
'value' => [
[
'day' => 123,
'start' => '<string>',
'end' => '<string>'
]
]
],
'callWebhookUrl' => [
'value' => '<string>'
],
'leadWebhookUrl' => [
'value' => '<string>'
],
'textChannelId' => [
'value' => '<string>'
],
'maxTurns' => [
'value' => 123
],
'autoCloseAfterInactivityHours' => [
'value' => 123
],
'inactivityFollowUps' => [
'value' => [
[
'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/{pearlId}"
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\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n },\n \"outbound\": {\n \"totalAgents\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"budgetTotal\": {\n \"value\": 123\n },\n \"timeZone\": {\n \"value\": \"<string>\"\n },\n \"callingHours\": {\n \"value\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ]\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"leadWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.nlpearl.ai/v2/Pearl/Text/{pearlId}")
.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\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n },\n \"outbound\": {\n \"totalAgents\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"budgetTotal\": {\n \"value\": 123\n },\n \"timeZone\": {\n \"value\": \"<string>\"\n },\n \"callingHours\": {\n \"value\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ]\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"leadWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlpearl.ai/v2/Pearl/Text/{pearlId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.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\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n },\n \"outbound\": {\n \"totalAgents\": {\n \"value\": 123\n },\n \"transcriptOptions\": {\n \"value\": 123\n },\n \"budgetTotal\": {\n \"value\": 123\n },\n \"timeZone\": {\n \"value\": \"<string>\"\n },\n \"callingHours\": {\n \"value\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ]\n },\n \"callWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"leadWebhookUrl\": {\n \"value\": \"<string>\"\n },\n \"textChannelId\": {\n \"value\": \"<string>\"\n },\n \"maxTurns\": {\n \"value\": 123\n },\n \"autoCloseAfterInactivityHours\": {\n \"value\": 123\n },\n \"inactivityFollowUps\": {\n \"value\": [\n {\n \"delayMinutes\": 123,\n \"message\": \"<string>\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_bodytrue{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}
