Update Pearl
Updates the configuration of a Simple Pearl (name, pearl settings and variables). 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 Pearls, use Update Voice Pearl or Update Text Pearl instead.
curl --request PUT \
--url https://api.nlpearl.ai/v2/Pearl/{pearlId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"pearl": {
"agents": [
{
"name": "<string>",
"voiceId": "<string>"
}
],
"agentPersonality": "<string>",
"timeZone": "<string>",
"modelType": 123,
"companyName": "<string>",
"companyDescription": "<string>",
"knowledgeBase": "<string>",
"memory": true,
"speechRecognitionKeywords": [
{
"word": "<string>",
"pronunciations": [
"<string>"
]
}
],
"openingSentence": "<string>",
"flowScript": "<string>",
"transferCallSettings": [
{
"transferCallPhoneNumber": "<string>",
"triggerDescription": "<string>",
"warmTransferMessage": "<string>"
}
],
"smsSettings": [
{
"body": "<string>",
"triggerDescription": "<string>"
}
],
"emailSettings": [
{
"subject": "<string>",
"body": "<string>",
"triggerDescription": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": true,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
}
],
"apiSettings": [
{
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"headers": {},
"triggerDescription": "<string>",
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"credentialId": "<string>"
}
],
"successDescription": "<string>",
"indicatorTags": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": 123
}
],
"notifications": [
{
"apiSettings": {
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"headers": {},
"triggerDescription": "<string>",
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"credentialId": "<string>"
},
"emailTemplate": {
"to": [
"<string>"
],
"cc": [
"<string>"
],
"subject": "<string>",
"body": "<string>",
"triggerDescription": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": true,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
},
"indicatorTagsIds": [
"<string>"
]
}
]
},
"variables": [
{
"id": "<string>",
"name": "<string>",
"group": 123,
"type": 123,
"isList": true,
"description": "<string>",
"value": "<string>",
"options": [
{
"value": "<string>",
"code": "<string>"
}
]
}
]
}
'import requests
url = "https://api.nlpearl.ai/v2/Pearl/{pearlId}"
payload = {
"name": "<string>",
"pearl": {
"agents": [
{
"name": "<string>",
"voiceId": "<string>"
}
],
"agentPersonality": "<string>",
"timeZone": "<string>",
"modelType": 123,
"companyName": "<string>",
"companyDescription": "<string>",
"knowledgeBase": "<string>",
"memory": True,
"speechRecognitionKeywords": [
{
"word": "<string>",
"pronunciations": ["<string>"]
}
],
"openingSentence": "<string>",
"flowScript": "<string>",
"transferCallSettings": [
{
"transferCallPhoneNumber": "<string>",
"triggerDescription": "<string>",
"warmTransferMessage": "<string>"
}
],
"smsSettings": [
{
"body": "<string>",
"triggerDescription": "<string>"
}
],
"emailSettings": [
{
"subject": "<string>",
"body": "<string>",
"triggerDescription": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": True,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
}
],
"apiSettings": [
{
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"headers": {},
"triggerDescription": "<string>",
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"credentialId": "<string>"
}
],
"successDescription": "<string>",
"indicatorTags": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": 123
}
],
"notifications": [
{
"apiSettings": {
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"headers": {},
"triggerDescription": "<string>",
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"credentialId": "<string>"
},
"emailTemplate": {
"to": ["<string>"],
"cc": ["<string>"],
"subject": "<string>",
"body": "<string>",
"triggerDescription": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": True,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
},
"indicatorTagsIds": ["<string>"]
}
]
},
"variables": [
{
"id": "<string>",
"name": "<string>",
"group": 123,
"type": 123,
"isList": True,
"description": "<string>",
"value": "<string>",
"options": [
{
"value": "<string>",
"code": "<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: {
agents: [{name: '<string>', voiceId: '<string>'}],
agentPersonality: '<string>',
timeZone: '<string>',
modelType: 123,
companyName: '<string>',
companyDescription: '<string>',
knowledgeBase: '<string>',
memory: true,
speechRecognitionKeywords: [{word: '<string>', pronunciations: ['<string>']}],
openingSentence: '<string>',
flowScript: '<string>',
transferCallSettings: [
{
transferCallPhoneNumber: '<string>',
triggerDescription: '<string>',
warmTransferMessage: '<string>'
}
],
smsSettings: [{body: JSON.stringify('<string>'), triggerDescription: '<string>'}],
emailSettings: [
{
subject: '<string>',
body: JSON.stringify('<string>'),
triggerDescription: '<string>',
smtpSettings: {
id: '<string>',
provider: 123,
smtpServer: '<string>',
port: 123,
enableSsl: true,
senderEmail: '<string>',
senderPassword: '<string>',
displayName: '<string>'
}
}
],
apiSettings: [
{
name: '<string>',
method: 123,
endpointUrl: '<string>',
body: JSON.stringify([
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
]),
headers: {},
triggerDescription: '<string>',
description: '<string>',
outputBody: [
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
],
credentialId: '<string>'
}
],
successDescription: '<string>',
indicatorTags: [{id: '<string>', name: '<string>', description: '<string>', color: 123}],
notifications: [
{
apiSettings: {
name: '<string>',
method: 123,
endpointUrl: '<string>',
body: JSON.stringify([
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
]),
headers: {},
triggerDescription: '<string>',
description: '<string>',
outputBody: [
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
],
credentialId: '<string>'
},
emailTemplate: {
to: ['<string>'],
cc: ['<string>'],
subject: '<string>',
body: JSON.stringify('<string>'),
triggerDescription: '<string>',
smtpSettings: {
id: '<string>',
provider: 123,
smtpServer: '<string>',
port: 123,
enableSsl: true,
senderEmail: '<string>',
senderPassword: '<string>',
displayName: '<string>'
}
},
indicatorTagsIds: ['<string>']
}
]
},
variables: [
{
id: '<string>',
name: '<string>',
group: 123,
type: 123,
isList: true,
description: '<string>',
value: '<string>',
options: [{value: '<string>', code: '<string>'}]
}
]
})
};
fetch('https://api.nlpearl.ai/v2/Pearl/{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/{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' => [
'agents' => [
[
'name' => '<string>',
'voiceId' => '<string>'
]
],
'agentPersonality' => '<string>',
'timeZone' => '<string>',
'modelType' => 123,
'companyName' => '<string>',
'companyDescription' => '<string>',
'knowledgeBase' => '<string>',
'memory' => true,
'speechRecognitionKeywords' => [
[
'word' => '<string>',
'pronunciations' => [
'<string>'
]
]
],
'openingSentence' => '<string>',
'flowScript' => '<string>',
'transferCallSettings' => [
[
'transferCallPhoneNumber' => '<string>',
'triggerDescription' => '<string>',
'warmTransferMessage' => '<string>'
]
],
'smsSettings' => [
[
'body' => '<string>',
'triggerDescription' => '<string>'
]
],
'emailSettings' => [
[
'subject' => '<string>',
'body' => '<string>',
'triggerDescription' => '<string>',
'smtpSettings' => [
'id' => '<string>',
'provider' => 123,
'smtpServer' => '<string>',
'port' => 123,
'enableSsl' => true,
'senderEmail' => '<string>',
'senderPassword' => '<string>',
'displayName' => '<string>'
]
]
],
'apiSettings' => [
[
'name' => '<string>',
'method' => 123,
'endpointUrl' => '<string>',
'body' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'headers' => [
],
'triggerDescription' => '<string>',
'description' => '<string>',
'outputBody' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'credentialId' => '<string>'
]
],
'successDescription' => '<string>',
'indicatorTags' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'color' => 123
]
],
'notifications' => [
[
'apiSettings' => [
'name' => '<string>',
'method' => 123,
'endpointUrl' => '<string>',
'body' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'headers' => [
],
'triggerDescription' => '<string>',
'description' => '<string>',
'outputBody' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'credentialId' => '<string>'
],
'emailTemplate' => [
'to' => [
'<string>'
],
'cc' => [
'<string>'
],
'subject' => '<string>',
'body' => '<string>',
'triggerDescription' => '<string>',
'smtpSettings' => [
'id' => '<string>',
'provider' => 123,
'smtpServer' => '<string>',
'port' => 123,
'enableSsl' => true,
'senderEmail' => '<string>',
'senderPassword' => '<string>',
'displayName' => '<string>'
]
],
'indicatorTagsIds' => [
'<string>'
]
]
]
],
'variables' => [
[
'id' => '<string>',
'name' => '<string>',
'group' => 123,
'type' => 123,
'isList' => true,
'description' => '<string>',
'value' => '<string>',
'options' => [
[
'value' => '<string>',
'code' => '<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/{pearlId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agents\": [\n {\n \"name\": \"<string>\",\n \"voiceId\": \"<string>\"\n }\n ],\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"speechRecognitionKeywords\": [\n {\n \"word\": \"<string>\",\n \"pronunciations\": [\n \"<string>\"\n ]\n }\n ],\n \"openingSentence\": \"<string>\",\n \"flowScript\": \"<string>\",\n \"transferCallSettings\": [\n {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n }\n ],\n \"smsSettings\": [\n {\n \"body\": \"<string>\",\n \"triggerDescription\": \"<string>\"\n }\n ],\n \"emailSettings\": [\n {\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 ],\n \"apiSettings\": [\n {\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 \"triggerDescription\": \"<string>\",\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 ],\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"notifications\": [\n {\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 \"triggerDescription\": \"<string>\",\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 \"emailTemplate\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 \"indicatorTagsIds\": [\n \"<string>\"\n ]\n }\n ]\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}")
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/{pearlId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agents\": [\n {\n \"name\": \"<string>\",\n \"voiceId\": \"<string>\"\n }\n ],\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"speechRecognitionKeywords\": [\n {\n \"word\": \"<string>\",\n \"pronunciations\": [\n \"<string>\"\n ]\n }\n ],\n \"openingSentence\": \"<string>\",\n \"flowScript\": \"<string>\",\n \"transferCallSettings\": [\n {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n }\n ],\n \"smsSettings\": [\n {\n \"body\": \"<string>\",\n \"triggerDescription\": \"<string>\"\n }\n ],\n \"emailSettings\": [\n {\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 ],\n \"apiSettings\": [\n {\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 \"triggerDescription\": \"<string>\",\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 ],\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"notifications\": [\n {\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 \"triggerDescription\": \"<string>\",\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 \"emailTemplate\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 \"indicatorTagsIds\": [\n \"<string>\"\n ]\n }\n ]\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlpearl.ai/v2/Pearl/{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 \"agents\": [\n {\n \"name\": \"<string>\",\n \"voiceId\": \"<string>\"\n }\n ],\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"speechRecognitionKeywords\": [\n {\n \"word\": \"<string>\",\n \"pronunciations\": [\n \"<string>\"\n ]\n }\n ],\n \"openingSentence\": \"<string>\",\n \"flowScript\": \"<string>\",\n \"transferCallSettings\": [\n {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n }\n ],\n \"smsSettings\": [\n {\n \"body\": \"<string>\",\n \"triggerDescription\": \"<string>\"\n }\n ],\n \"emailSettings\": [\n {\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 ],\n \"apiSettings\": [\n {\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 \"triggerDescription\": \"<string>\",\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 ],\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"notifications\": [\n {\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 \"triggerDescription\": \"<string>\",\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 \"emailTemplate\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 \"indicatorTagsIds\": [\n \"<string>\"\n ]\n }\n ]\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}"
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
The unique identifier of the Pearl.
Body
The updated Pearl flow configuration.
The updated name of the Pearl.
Updated conversation flow 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
Response
The Pearl flow was updated successfully.
The response is of type boolean.
curl --request PUT \
--url https://api.nlpearl.ai/v2/Pearl/{pearlId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"pearl": {
"agents": [
{
"name": "<string>",
"voiceId": "<string>"
}
],
"agentPersonality": "<string>",
"timeZone": "<string>",
"modelType": 123,
"companyName": "<string>",
"companyDescription": "<string>",
"knowledgeBase": "<string>",
"memory": true,
"speechRecognitionKeywords": [
{
"word": "<string>",
"pronunciations": [
"<string>"
]
}
],
"openingSentence": "<string>",
"flowScript": "<string>",
"transferCallSettings": [
{
"transferCallPhoneNumber": "<string>",
"triggerDescription": "<string>",
"warmTransferMessage": "<string>"
}
],
"smsSettings": [
{
"body": "<string>",
"triggerDescription": "<string>"
}
],
"emailSettings": [
{
"subject": "<string>",
"body": "<string>",
"triggerDescription": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": true,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
}
],
"apiSettings": [
{
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"headers": {},
"triggerDescription": "<string>",
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"credentialId": "<string>"
}
],
"successDescription": "<string>",
"indicatorTags": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": 123
}
],
"notifications": [
{
"apiSettings": {
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"headers": {},
"triggerDescription": "<string>",
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": true
}
],
"credentialId": "<string>"
},
"emailTemplate": {
"to": [
"<string>"
],
"cc": [
"<string>"
],
"subject": "<string>",
"body": "<string>",
"triggerDescription": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": true,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
},
"indicatorTagsIds": [
"<string>"
]
}
]
},
"variables": [
{
"id": "<string>",
"name": "<string>",
"group": 123,
"type": 123,
"isList": true,
"description": "<string>",
"value": "<string>",
"options": [
{
"value": "<string>",
"code": "<string>"
}
]
}
]
}
'import requests
url = "https://api.nlpearl.ai/v2/Pearl/{pearlId}"
payload = {
"name": "<string>",
"pearl": {
"agents": [
{
"name": "<string>",
"voiceId": "<string>"
}
],
"agentPersonality": "<string>",
"timeZone": "<string>",
"modelType": 123,
"companyName": "<string>",
"companyDescription": "<string>",
"knowledgeBase": "<string>",
"memory": True,
"speechRecognitionKeywords": [
{
"word": "<string>",
"pronunciations": ["<string>"]
}
],
"openingSentence": "<string>",
"flowScript": "<string>",
"transferCallSettings": [
{
"transferCallPhoneNumber": "<string>",
"triggerDescription": "<string>",
"warmTransferMessage": "<string>"
}
],
"smsSettings": [
{
"body": "<string>",
"triggerDescription": "<string>"
}
],
"emailSettings": [
{
"subject": "<string>",
"body": "<string>",
"triggerDescription": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": True,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
}
],
"apiSettings": [
{
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"headers": {},
"triggerDescription": "<string>",
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"credentialId": "<string>"
}
],
"successDescription": "<string>",
"indicatorTags": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"color": 123
}
],
"notifications": [
{
"apiSettings": {
"name": "<string>",
"method": 123,
"endpointUrl": "<string>",
"body": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"headers": {},
"triggerDescription": "<string>",
"description": "<string>",
"outputBody": [
{
"key": "<string>",
"variableId": "<string>",
"type": 123,
"value": "<string>",
"required": True
}
],
"credentialId": "<string>"
},
"emailTemplate": {
"to": ["<string>"],
"cc": ["<string>"],
"subject": "<string>",
"body": "<string>",
"triggerDescription": "<string>",
"smtpSettings": {
"id": "<string>",
"provider": 123,
"smtpServer": "<string>",
"port": 123,
"enableSsl": True,
"senderEmail": "<string>",
"senderPassword": "<string>",
"displayName": "<string>"
}
},
"indicatorTagsIds": ["<string>"]
}
]
},
"variables": [
{
"id": "<string>",
"name": "<string>",
"group": 123,
"type": 123,
"isList": True,
"description": "<string>",
"value": "<string>",
"options": [
{
"value": "<string>",
"code": "<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: {
agents: [{name: '<string>', voiceId: '<string>'}],
agentPersonality: '<string>',
timeZone: '<string>',
modelType: 123,
companyName: '<string>',
companyDescription: '<string>',
knowledgeBase: '<string>',
memory: true,
speechRecognitionKeywords: [{word: '<string>', pronunciations: ['<string>']}],
openingSentence: '<string>',
flowScript: '<string>',
transferCallSettings: [
{
transferCallPhoneNumber: '<string>',
triggerDescription: '<string>',
warmTransferMessage: '<string>'
}
],
smsSettings: [{body: JSON.stringify('<string>'), triggerDescription: '<string>'}],
emailSettings: [
{
subject: '<string>',
body: JSON.stringify('<string>'),
triggerDescription: '<string>',
smtpSettings: {
id: '<string>',
provider: 123,
smtpServer: '<string>',
port: 123,
enableSsl: true,
senderEmail: '<string>',
senderPassword: '<string>',
displayName: '<string>'
}
}
],
apiSettings: [
{
name: '<string>',
method: 123,
endpointUrl: '<string>',
body: JSON.stringify([
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
]),
headers: {},
triggerDescription: '<string>',
description: '<string>',
outputBody: [
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
],
credentialId: '<string>'
}
],
successDescription: '<string>',
indicatorTags: [{id: '<string>', name: '<string>', description: '<string>', color: 123}],
notifications: [
{
apiSettings: {
name: '<string>',
method: 123,
endpointUrl: '<string>',
body: JSON.stringify([
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
]),
headers: {},
triggerDescription: '<string>',
description: '<string>',
outputBody: [
{
key: '<string>',
variableId: '<string>',
type: 123,
value: '<string>',
required: true
}
],
credentialId: '<string>'
},
emailTemplate: {
to: ['<string>'],
cc: ['<string>'],
subject: '<string>',
body: JSON.stringify('<string>'),
triggerDescription: '<string>',
smtpSettings: {
id: '<string>',
provider: 123,
smtpServer: '<string>',
port: 123,
enableSsl: true,
senderEmail: '<string>',
senderPassword: '<string>',
displayName: '<string>'
}
},
indicatorTagsIds: ['<string>']
}
]
},
variables: [
{
id: '<string>',
name: '<string>',
group: 123,
type: 123,
isList: true,
description: '<string>',
value: '<string>',
options: [{value: '<string>', code: '<string>'}]
}
]
})
};
fetch('https://api.nlpearl.ai/v2/Pearl/{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/{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' => [
'agents' => [
[
'name' => '<string>',
'voiceId' => '<string>'
]
],
'agentPersonality' => '<string>',
'timeZone' => '<string>',
'modelType' => 123,
'companyName' => '<string>',
'companyDescription' => '<string>',
'knowledgeBase' => '<string>',
'memory' => true,
'speechRecognitionKeywords' => [
[
'word' => '<string>',
'pronunciations' => [
'<string>'
]
]
],
'openingSentence' => '<string>',
'flowScript' => '<string>',
'transferCallSettings' => [
[
'transferCallPhoneNumber' => '<string>',
'triggerDescription' => '<string>',
'warmTransferMessage' => '<string>'
]
],
'smsSettings' => [
[
'body' => '<string>',
'triggerDescription' => '<string>'
]
],
'emailSettings' => [
[
'subject' => '<string>',
'body' => '<string>',
'triggerDescription' => '<string>',
'smtpSettings' => [
'id' => '<string>',
'provider' => 123,
'smtpServer' => '<string>',
'port' => 123,
'enableSsl' => true,
'senderEmail' => '<string>',
'senderPassword' => '<string>',
'displayName' => '<string>'
]
]
],
'apiSettings' => [
[
'name' => '<string>',
'method' => 123,
'endpointUrl' => '<string>',
'body' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'headers' => [
],
'triggerDescription' => '<string>',
'description' => '<string>',
'outputBody' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'credentialId' => '<string>'
]
],
'successDescription' => '<string>',
'indicatorTags' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'color' => 123
]
],
'notifications' => [
[
'apiSettings' => [
'name' => '<string>',
'method' => 123,
'endpointUrl' => '<string>',
'body' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'headers' => [
],
'triggerDescription' => '<string>',
'description' => '<string>',
'outputBody' => [
[
'key' => '<string>',
'variableId' => '<string>',
'type' => 123,
'value' => '<string>',
'required' => true
]
],
'credentialId' => '<string>'
],
'emailTemplate' => [
'to' => [
'<string>'
],
'cc' => [
'<string>'
],
'subject' => '<string>',
'body' => '<string>',
'triggerDescription' => '<string>',
'smtpSettings' => [
'id' => '<string>',
'provider' => 123,
'smtpServer' => '<string>',
'port' => 123,
'enableSsl' => true,
'senderEmail' => '<string>',
'senderPassword' => '<string>',
'displayName' => '<string>'
]
],
'indicatorTagsIds' => [
'<string>'
]
]
]
],
'variables' => [
[
'id' => '<string>',
'name' => '<string>',
'group' => 123,
'type' => 123,
'isList' => true,
'description' => '<string>',
'value' => '<string>',
'options' => [
[
'value' => '<string>',
'code' => '<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/{pearlId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agents\": [\n {\n \"name\": \"<string>\",\n \"voiceId\": \"<string>\"\n }\n ],\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"speechRecognitionKeywords\": [\n {\n \"word\": \"<string>\",\n \"pronunciations\": [\n \"<string>\"\n ]\n }\n ],\n \"openingSentence\": \"<string>\",\n \"flowScript\": \"<string>\",\n \"transferCallSettings\": [\n {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n }\n ],\n \"smsSettings\": [\n {\n \"body\": \"<string>\",\n \"triggerDescription\": \"<string>\"\n }\n ],\n \"emailSettings\": [\n {\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 ],\n \"apiSettings\": [\n {\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 \"triggerDescription\": \"<string>\",\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 ],\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"notifications\": [\n {\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 \"triggerDescription\": \"<string>\",\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 \"emailTemplate\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 \"indicatorTagsIds\": [\n \"<string>\"\n ]\n }\n ]\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}")
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/{pearlId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"pearl\": {\n \"agents\": [\n {\n \"name\": \"<string>\",\n \"voiceId\": \"<string>\"\n }\n ],\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"speechRecognitionKeywords\": [\n {\n \"word\": \"<string>\",\n \"pronunciations\": [\n \"<string>\"\n ]\n }\n ],\n \"openingSentence\": \"<string>\",\n \"flowScript\": \"<string>\",\n \"transferCallSettings\": [\n {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n }\n ],\n \"smsSettings\": [\n {\n \"body\": \"<string>\",\n \"triggerDescription\": \"<string>\"\n }\n ],\n \"emailSettings\": [\n {\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 ],\n \"apiSettings\": [\n {\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 \"triggerDescription\": \"<string>\",\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 ],\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"notifications\": [\n {\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 \"triggerDescription\": \"<string>\",\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 \"emailTemplate\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 \"indicatorTagsIds\": [\n \"<string>\"\n ]\n }\n ]\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlpearl.ai/v2/Pearl/{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 \"agents\": [\n {\n \"name\": \"<string>\",\n \"voiceId\": \"<string>\"\n }\n ],\n \"agentPersonality\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"modelType\": 123,\n \"companyName\": \"<string>\",\n \"companyDescription\": \"<string>\",\n \"knowledgeBase\": \"<string>\",\n \"memory\": true,\n \"speechRecognitionKeywords\": [\n {\n \"word\": \"<string>\",\n \"pronunciations\": [\n \"<string>\"\n ]\n }\n ],\n \"openingSentence\": \"<string>\",\n \"flowScript\": \"<string>\",\n \"transferCallSettings\": [\n {\n \"transferCallPhoneNumber\": \"<string>\",\n \"triggerDescription\": \"<string>\",\n \"warmTransferMessage\": \"<string>\"\n }\n ],\n \"smsSettings\": [\n {\n \"body\": \"<string>\",\n \"triggerDescription\": \"<string>\"\n }\n ],\n \"emailSettings\": [\n {\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 ],\n \"apiSettings\": [\n {\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 \"triggerDescription\": \"<string>\",\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 ],\n \"successDescription\": \"<string>\",\n \"indicatorTags\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"color\": 123\n }\n ],\n \"notifications\": [\n {\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 \"triggerDescription\": \"<string>\",\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 \"emailTemplate\": {\n \"to\": [\n \"<string>\"\n ],\n \"cc\": [\n \"<string>\"\n ],\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"triggerDescription\": \"<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 \"indicatorTagsIds\": [\n \"<string>\"\n ]\n }\n ]\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}"
response = http.request(request)
puts response.read_bodytrue{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}
