Create Pearl
Creates a new Simple Pearl, driven by an opening sentence and a flow script. Provide exactly one channel: inbound settings OR outbound settings. The Pearl is created already published: the configuration you send becomes its live (published) version. To create a Pearl (node graph), use Create Voice Pearl or Create Text Pearl instead.
curl --request POST \
--url https://api.nlpearl.ai/v2/Pearl \
--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>"
}
]
}
],
"inbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"callWebhookUrl": "<string>",
"phoneNumberId": "<string>",
"recordingOptions": true,
"isStopRecordingAfterTransferCall": true,
"waitingSentence": "<string>",
"isSayQueueDetails": true
},
"outbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"budgetTotal": 123,
"timeZone": "<string>",
"callingHours": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
],
"callWebhookUrl": "<string>",
"leadWebhookUrl": "<string>",
"phoneNumberId": "<string>",
"recordingTrack": 123,
"isStopRecordingAfterTransferCall": true,
"maximumCallAttempts": 123,
"minimumRetryIntervalHours": 123,
"voiceMail": "<string>",
"bypassIVRInstruction": "<string>",
"ringDuration": 123,
"callTimeout": 123
}
}
'import requests
url = "https://api.nlpearl.ai/v2/Pearl"
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>"
}
]
}
],
"inbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"callWebhookUrl": "<string>",
"phoneNumberId": "<string>",
"recordingOptions": True,
"isStopRecordingAfterTransferCall": True,
"waitingSentence": "<string>",
"isSayQueueDetails": True
},
"outbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"budgetTotal": 123,
"timeZone": "<string>",
"callingHours": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
],
"callWebhookUrl": "<string>",
"leadWebhookUrl": "<string>",
"phoneNumberId": "<string>",
"recordingTrack": 123,
"isStopRecordingAfterTransferCall": True,
"maximumCallAttempts": 123,
"minimumRetryIntervalHours": 123,
"voiceMail": "<string>",
"bypassIVRInstruction": "<string>",
"ringDuration": 123,
"callTimeout": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
pearl: {
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>'}]
}
],
inbound: {
totalAgents: 123,
transcriptOptions: 123,
callWebhookUrl: '<string>',
phoneNumberId: '<string>',
recordingOptions: true,
isStopRecordingAfterTransferCall: true,
waitingSentence: '<string>',
isSayQueueDetails: true
},
outbound: {
totalAgents: 123,
transcriptOptions: 123,
budgetTotal: 123,
timeZone: '<string>',
callingHours: [{day: 123, start: '<string>', end: '<string>'}],
callWebhookUrl: '<string>',
leadWebhookUrl: '<string>',
phoneNumberId: '<string>',
recordingTrack: 123,
isStopRecordingAfterTransferCall: true,
maximumCallAttempts: 123,
minimumRetryIntervalHours: 123,
voiceMail: '<string>',
bypassIVRInstruction: '<string>',
ringDuration: 123,
callTimeout: 123
}
})
};
fetch('https://api.nlpearl.ai/v2/Pearl', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'pearl' => [
'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>'
]
]
]
],
'inbound' => [
'totalAgents' => 123,
'transcriptOptions' => 123,
'callWebhookUrl' => '<string>',
'phoneNumberId' => '<string>',
'recordingOptions' => true,
'isStopRecordingAfterTransferCall' => true,
'waitingSentence' => '<string>',
'isSayQueueDetails' => true
],
'outbound' => [
'totalAgents' => 123,
'transcriptOptions' => 123,
'budgetTotal' => 123,
'timeZone' => '<string>',
'callingHours' => [
[
'day' => 123,
'start' => '<string>',
'end' => '<string>'
]
],
'callWebhookUrl' => '<string>',
'leadWebhookUrl' => '<string>',
'phoneNumberId' => '<string>',
'recordingTrack' => 123,
'isStopRecordingAfterTransferCall' => true,
'maximumCallAttempts' => 123,
'minimumRetryIntervalHours' => 123,
'voiceMail' => '<string>',
'bypassIVRInstruction' => '<string>',
'ringDuration' => 123,
'callTimeout' => 123
]
]),
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"
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 \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingOptions\": true,\n \"isStopRecordingAfterTransferCall\": true,\n \"waitingSentence\": \"<string>\",\n \"isSayQueueDetails\": true\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingTrack\": 123,\n \"isStopRecordingAfterTransferCall\": true,\n \"maximumCallAttempts\": 123,\n \"minimumRetryIntervalHours\": 123,\n \"voiceMail\": \"<string>\",\n \"bypassIVRInstruction\": \"<string>\",\n \"ringDuration\": 123,\n \"callTimeout\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nlpearl.ai/v2/Pearl")
.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 \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingOptions\": true,\n \"isStopRecordingAfterTransferCall\": true,\n \"waitingSentence\": \"<string>\",\n \"isSayQueueDetails\": true\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingTrack\": 123,\n \"isStopRecordingAfterTransferCall\": true,\n \"maximumCallAttempts\": 123,\n \"minimumRetryIntervalHours\": 123,\n \"voiceMail\": \"<string>\",\n \"bypassIVRInstruction\": \"<string>\",\n \"ringDuration\": 123,\n \"callTimeout\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlpearl.ai/v2/Pearl")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"pearl\": {\n \"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 \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingOptions\": true,\n \"isStopRecordingAfterTransferCall\": true,\n \"waitingSentence\": \"<string>\",\n \"isSayQueueDetails\": true\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingTrack\": 123,\n \"isStopRecordingAfterTransferCall\": true,\n \"maximumCallAttempts\": 123,\n \"minimumRetryIntervalHours\": 123,\n \"voiceMail\": \"<string>\",\n \"bypassIVRInstruction\": \"<string>\",\n \"ringDuration\": 123,\n \"callTimeout\": 123\n }\n}"
response = http.request(request)
puts response.read_body"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}Authorizations
Specify the authorization token.
For more information, check out the Authorization Guide.
Body
Create Pearl request (simple mode): a voice Pearl driven by an opening sentence and a flow script.
The name of the Pearl.
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
Inbound settings for the Pearl. Required when creating an inbound Pearl. Must not be provided together with Outbound.
Show child attributes
Show child attributes
Outbound settings for the Pearl. Required when creating an outbound Pearl. Must not be provided together with Inbound.
Show child attributes
Show child attributes
Response
The ID of the newly created Pearl.
The response is of type string.
curl --request POST \
--url https://api.nlpearl.ai/v2/Pearl \
--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>"
}
]
}
],
"inbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"callWebhookUrl": "<string>",
"phoneNumberId": "<string>",
"recordingOptions": true,
"isStopRecordingAfterTransferCall": true,
"waitingSentence": "<string>",
"isSayQueueDetails": true
},
"outbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"budgetTotal": 123,
"timeZone": "<string>",
"callingHours": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
],
"callWebhookUrl": "<string>",
"leadWebhookUrl": "<string>",
"phoneNumberId": "<string>",
"recordingTrack": 123,
"isStopRecordingAfterTransferCall": true,
"maximumCallAttempts": 123,
"minimumRetryIntervalHours": 123,
"voiceMail": "<string>",
"bypassIVRInstruction": "<string>",
"ringDuration": 123,
"callTimeout": 123
}
}
'import requests
url = "https://api.nlpearl.ai/v2/Pearl"
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>"
}
]
}
],
"inbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"callWebhookUrl": "<string>",
"phoneNumberId": "<string>",
"recordingOptions": True,
"isStopRecordingAfterTransferCall": True,
"waitingSentence": "<string>",
"isSayQueueDetails": True
},
"outbound": {
"totalAgents": 123,
"transcriptOptions": 123,
"budgetTotal": 123,
"timeZone": "<string>",
"callingHours": [
{
"day": 123,
"start": "<string>",
"end": "<string>"
}
],
"callWebhookUrl": "<string>",
"leadWebhookUrl": "<string>",
"phoneNumberId": "<string>",
"recordingTrack": 123,
"isStopRecordingAfterTransferCall": True,
"maximumCallAttempts": 123,
"minimumRetryIntervalHours": 123,
"voiceMail": "<string>",
"bypassIVRInstruction": "<string>",
"ringDuration": 123,
"callTimeout": 123
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
pearl: {
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>'}]
}
],
inbound: {
totalAgents: 123,
transcriptOptions: 123,
callWebhookUrl: '<string>',
phoneNumberId: '<string>',
recordingOptions: true,
isStopRecordingAfterTransferCall: true,
waitingSentence: '<string>',
isSayQueueDetails: true
},
outbound: {
totalAgents: 123,
transcriptOptions: 123,
budgetTotal: 123,
timeZone: '<string>',
callingHours: [{day: 123, start: '<string>', end: '<string>'}],
callWebhookUrl: '<string>',
leadWebhookUrl: '<string>',
phoneNumberId: '<string>',
recordingTrack: 123,
isStopRecordingAfterTransferCall: true,
maximumCallAttempts: 123,
minimumRetryIntervalHours: 123,
voiceMail: '<string>',
bypassIVRInstruction: '<string>',
ringDuration: 123,
callTimeout: 123
}
})
};
fetch('https://api.nlpearl.ai/v2/Pearl', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'pearl' => [
'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>'
]
]
]
],
'inbound' => [
'totalAgents' => 123,
'transcriptOptions' => 123,
'callWebhookUrl' => '<string>',
'phoneNumberId' => '<string>',
'recordingOptions' => true,
'isStopRecordingAfterTransferCall' => true,
'waitingSentence' => '<string>',
'isSayQueueDetails' => true
],
'outbound' => [
'totalAgents' => 123,
'transcriptOptions' => 123,
'budgetTotal' => 123,
'timeZone' => '<string>',
'callingHours' => [
[
'day' => 123,
'start' => '<string>',
'end' => '<string>'
]
],
'callWebhookUrl' => '<string>',
'leadWebhookUrl' => '<string>',
'phoneNumberId' => '<string>',
'recordingTrack' => 123,
'isStopRecordingAfterTransferCall' => true,
'maximumCallAttempts' => 123,
'minimumRetryIntervalHours' => 123,
'voiceMail' => '<string>',
'bypassIVRInstruction' => '<string>',
'ringDuration' => 123,
'callTimeout' => 123
]
]),
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"
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 \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingOptions\": true,\n \"isStopRecordingAfterTransferCall\": true,\n \"waitingSentence\": \"<string>\",\n \"isSayQueueDetails\": true\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingTrack\": 123,\n \"isStopRecordingAfterTransferCall\": true,\n \"maximumCallAttempts\": 123,\n \"minimumRetryIntervalHours\": 123,\n \"voiceMail\": \"<string>\",\n \"bypassIVRInstruction\": \"<string>\",\n \"ringDuration\": 123,\n \"callTimeout\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nlpearl.ai/v2/Pearl")
.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 \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingOptions\": true,\n \"isStopRecordingAfterTransferCall\": true,\n \"waitingSentence\": \"<string>\",\n \"isSayQueueDetails\": true\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingTrack\": 123,\n \"isStopRecordingAfterTransferCall\": true,\n \"maximumCallAttempts\": 123,\n \"minimumRetryIntervalHours\": 123,\n \"voiceMail\": \"<string>\",\n \"bypassIVRInstruction\": \"<string>\",\n \"ringDuration\": 123,\n \"callTimeout\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlpearl.ai/v2/Pearl")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"pearl\": {\n \"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 \"inbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"callWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingOptions\": true,\n \"isStopRecordingAfterTransferCall\": true,\n \"waitingSentence\": \"<string>\",\n \"isSayQueueDetails\": true\n },\n \"outbound\": {\n \"totalAgents\": 123,\n \"transcriptOptions\": 123,\n \"budgetTotal\": 123,\n \"timeZone\": \"<string>\",\n \"callingHours\": [\n {\n \"day\": 123,\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n ],\n \"callWebhookUrl\": \"<string>\",\n \"leadWebhookUrl\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"recordingTrack\": 123,\n \"isStopRecordingAfterTransferCall\": true,\n \"maximumCallAttempts\": 123,\n \"minimumRetryIntervalHours\": 123,\n \"voiceMail\": \"<string>\",\n \"bypassIVRInstruction\": \"<string>\",\n \"ringDuration\": 123,\n \"callTimeout\": 123\n }\n}"
response = http.request(request)
puts response.read_body"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}
