Documentation Index
Fetch the complete documentation index at: https://developers.nlpearl.ai/llms.txt
Use this file to discover all available pages before exploring further.


Overview
When configuring a Pearl, you can set up webhooks to receive real-time notifications at key moments of the call lifecycle. The webhooks available to you depend on whether your Pearl is configured for Inbound or Outbound activity.Inbound Pearl
Access to the Call Webhook only.
Outbound Pearl
Access to both the Call Webhook and the Lead Webhook.
The Call Webhook payload is identical whether it originates from an Inbound or Outbound Pearl. The Lead Webhook is exclusive to Outbound campaigns, as leads are a concept specific to outbound call management.
Webhook Types
Call Webhook
Triggered at the start and end of every call. Available for both Inbound and Outbound Pearls.
Lead Webhook
Triggered every time a lead changes status. Available for Outbound Pearls only.
Webhook Version
Select the version that matches your Pearl configuration. V2 is the recommended version and is selected by default.- V2 (Latest)
- V1
In V2, all JSON payload keys use camelCase (e.g.
pearlId, phoneNumber, collectedData).Call Webhook Payload
The Call Webhook is triggered at the start and at the end of every call. It provides comprehensive data about the call, including its outcome, duration, transcript, and any information collected during the conversation.Available for both Inbound and Outbound Pearls.
Payload Fields
| Field | Type | Description |
|---|---|---|
id | string | The unique identifier of the call. |
pearlId | string | The unique identifier of the Pearl used during this call. |
startTime | datetime | The date and time when the call processing started. |
conversationStatus | int (enum) | The status of the conversation. See Conversation Statuses below. |
status | int (enum) | The overall technical status of the call. See Call Statuses below. |
from | string | The phone number from which the call was made. |
to | string | The phone number to which the call was made. |
name | string | The name associated with the call, if available. |
duration | integer | The duration of the call in seconds. |
recording | string (URL) | A URL to the call recording, if recording is enabled. |
transcript | object[] | The full conversation transcript as a list of messages. See Transcript Message below. |
summary | string | A concise AI-generated summary of the conversation. |
collectedInfo | object[] | Structured data points collected during the call. See Collected Info below. |
tags | string[] | Tags or labels triggered during the conversation based on your Pearl configuration. |
isCallTransferred | boolean | Whether the call was transferred to a human agent or external number. |
overallSentiment | int (enum) | The overall emotional tone detected from the client. See Sentiment Values below. |
leadId | string | The unique identifier of the associated lead, if the call is linked to one. Otherwise null. |
Conversation Statuses
| Value | Code | Description |
|---|---|---|
NeedRetry | 10 | The call will be retried. |
InCallQueue | 20 | The call is queued and waiting to be placed. |
OnCall | 40 | The call is currently in progress. |
VoiceMailLeft | 70 | Pearl reached voicemail and left a message. |
Success | 100 | The conversation ended with a successful outcome as defined in the Pearl. |
NotSuccessful | 110 | The conversation ended without achieving the defined success criteria. |
Completed | 130 | The conversation was completed (neutral outcome). |
Unreachable | 150 | The lead could not be reached after all attempts. |
Blacklisted | 220 | The number is blacklisted and will not be contacted. |
QueueAbandon | 300 | The call was abandoned while in the queue. |
Error | 500 | An error occurred during the conversation. |
The definition of Success and NotSuccessful is configured at the Pearl level. Refer to the Create a Pearl page for more details.
Call Statuses
| Value | Code | Description |
|---|---|---|
InProgress | 3 | The call is currently active. |
Completed | 4 | The call ended normally. |
Busy | 5 | The line was busy when the call was placed. |
Failed | 6 | The call could not be connected due to a technical issue. |
NoAnswer | 7 | The call was not answered within the configured ring duration. |
Canceled | 8 | The call was canceled before being connected. |
Transcript Message
Each entry in thetranscript array represents a single message in the conversation.| Field | Type | Description |
|---|---|---|
role | int (enum) | The speaker: Pearl (2) or Client (3). |
content | string | The text content of the message. |
startTime | float | The timestamp (in seconds) when the message started. |
endTime | float | The timestamp (in seconds) when the message ended. |
Collected Info
Each entry in thecollectedInfo array represents a variable captured during the call.| Field | Type | Description |
|---|---|---|
id | string | The ID of the variable as configured in your Pearl. |
name | string | The display name of the variable. |
value | any | The value collected for this variable during the call. |
Sentiment Values
| Value | Code | Description |
|---|---|---|
Negative | 1 | Clear signals of anger, disappointment, or distress. |
SlightlyNegative | 2 | Some negative emotions present, but overall tone remains close to neutral. |
Neutral | 3 | Balanced, objective, or factual - no significant positive or negative leanings. |
SlightlyPositive | 4 | More positive cues than negative, though enthusiasm is mild. |
Positive | 5 | Positive emotions, enthusiasm, satisfaction, or gratitude. |
Example Payload
Lead Webhook Payload
The Lead Webhook is triggered every time a lead changes status - at the beginning and at the end of a call. It contains all relevant information about the lead and its current state.Available for Outbound Pearls only.
Payload Fields
| Field | Type | Description |
|---|---|---|
id | string (ObjectId) | The unique identifier of the lead in the NLPearl.AI system. |
pearlId | string | The unique identifier of the Pearl associated with this lead. |
externalId | string | The ID from an external system such as a CRM, for cross-referencing. |
phoneNumber | string | The phone number of the lead. |
timeZone | string | The time zone assigned to the lead. |
status | int (enum) | The current status of the lead. See Lead Statuses below. |
created | datetime | The date and time when the lead was created. |
callsId | string[] | A list of all call IDs associated with this lead. |
callData | object (key-value) | Custom variables provided before the call to personalize the Pearl conversation. |
collectedData | object (key-value) | Data collected during the call. Keys correspond to variable IDs configured in the Pearl. |
callData vs collectedData
callData | collectedData | |
|---|---|---|
| When | Provided before the call | Filled during the call |
| Purpose | Personalizes the Pearl’s script and opening | Captures outcomes and responses from the conversation |
| Example | { "firstName": "John", "plan": "Premium" } | { "confirmBooking": true, "rideTime": "Friday 12:00" } |
Lead Statuses
| Value | Code | Description |
|---|---|---|
New | 1 | The lead has just been added, no call attempted yet. |
NeedRetry | 10 | The call will be retried according to the retry configuration. |
InCallQueue | 20 | The lead is queued and waiting for a call to be placed. |
WrongCountryCode | 30 | The phone number does not match the campaign’s country code. |
OnCall | 40 | The lead is currently in an active call. |
VoiceMailLeft | 70 | Pearl reached voicemail and left a personalized message. |
Success | 100 | The conversation ended with a successful outcome as defined in the Pearl. |
NotSuccessful | 110 | The conversation ended without achieving the success criteria. |
Completed | 130 | All attempts are done (neutral outcome). |
Unreachable | 150 | The lead could not be reached after all retry attempts. |
Blacklisted | 220 | The number is blacklisted and will not be contacted. |
QueueAbandon | 300 | The call was abandoned while in the queue. |
Error | 500 | An error occurred while processing this lead. |
The definition of Success and NotSuccessful is set at the Pearl level. Refer to the Create a Pearl page for details.
Example Payload
Differences Between V1 and V2
| V1 | V2 | |
|---|---|---|
| JSON key format | PascalCase | camelCase |
| Lead: campaign reference | OutboundId | pearlId |
| Lead: post-call collected data | ❌ Not available | ✅ collectedData |
| Call: entity reference | RelatedId | ❌ Removed |
Setting Up Webhooks
You can configure webhook URLs directly in your Pearl or outbound campaign settings.Open Your Campaign Settings
Navigate to the Pearl or outbound campaign you want to configure and open its settings panel.
Make sure your webhook endpoint is publicly accessible and responds within a reasonable timeout. NLPearl.AI does not retry failed webhook deliveries by default.
Outbound Campaigns
Learn how to create and configure outbound campaigns, including webhook setup.
API Reference – Get Calls
Explore the full call object structure returned by the API.


