PUT
/
v1
/
Outbound
/
{outboundId}
/
Lead
/
{leadId}
Update Lead
curl --request PUT \
  --url https://api.nlpearl.ai/v1/Outbound/{outboundId}/Lead/{leadId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "phoneNumber": "<string>",
  "externalId": "<string>",
  "timeZoneId": "<string>",
  "callData": {},
  "status": 123
}'
{
  "id": "<string>",
  "externalId": "<string>",
  "phoneNumber": "<string>",
  "timeZone": "<string>",
  "status": 123,
  "created": "2023-11-07T05:31:56Z",
  "callsId": [
    "<string>"
  ],
  "lastCall": {
    "id": "<string>",
    "startTime": "2023-11-07T05:31:56Z",
    "pearlId": "<string>",
    "status": 123,
    "from": "<string>",
    "name": "<string>",
    "collectedData": {
      "transcript": [
        {
          "role": 123,
          "content": "<string>",
          "startTime": 123,
          "endTime": 123
        }
      ],
      "collectedInfos": [
        {
          "id": "<string>",
          "name": "<string>",
          "value": "<any>"
        }
      ]
    },
    "summary": "<string>",
    "duration": 123,
    "recording": "<string>",
    "tags": [
      "<string>"
    ]
  },
  "callData": {},
  "collectedData": {}
}

Authorizations

Authorization
string
header
required

Specify the authorization token.

For more information, check out the Authorization Guide.

Path Parameters

outboundId
string
required

The unique identifier of the outbound campaign.

leadId
string
required

The unique identifier of the lead to update.

Body

The updated lead information.

Represents the data used to update an existing lead in an outbound campaign. All fields are optional; only the provided values will be updated.

phoneNumber
string | null

The updated phone number of the lead.
If provided, it will replace the existing phone number.

externalId
string | null

An updated external identifier for the lead.
This can be used to link the lead with external systems.

timeZoneId
string | null

Optional time zone identifier for the lead.
If set, this overrides the default time zone configured on the outbound.
For accepted values, refer to the Windows Time Zones list.
Example: "Pacific Standard Time", "Türkiye Standard Time".

callData
object | null

A dictionary containing additional lead information.
These values can be used in the Pearl's "Opening Sentence" or "Flow Script".
The key is the variable ID and the value is its value.
See Variables for more details.
Example: { "email": "joe@gmail.com", "carLicense": "90-929-82" }

status
integer

The new status to assign to the lead.

This can be used to update the lead's progression or interaction result.

For example, if you want the outbound campaign to stop calling this lead, you can set the status to Completed. Or, if the lead already converted successfully in an external CRM, you can mark it directly as Success.

1 - New

10 - NeedRetry

100 - Success

110 - NotSuccessfull

130 - Completed

Response

The updated lead is returned.

id
string | null

The unique identifier of the lead, represented as an ObjectId.

externalId
string | null

The identifier for the lead from an external system, such as a CRM.

phoneNumber
string | null

The phone number of the lead.

timeZone
string | null

The time zone of the lead, represented as a float (e.g., -5.0 for EST).

status
integer

The Status of the lead is the status of the last conversation.

To determine the definition of 'Success' or 'Not Successful,' please refer to the Create a Pearl page at step 4.

1 - New

10 - NeedRetry

20 - InCallQueue

30 - WrongCountryCode

40 - OnCall

70 - VoiceMailLeft

100 - Success

110 - NotSuccessfull

130 - Completed

150 - Unreachable

500 - Error

created
string<date-time>

The date and time when the lead was created.

callsId
string[] | null

The list of the ID's of all the calls this lead has received.

lastCall
object
callData
object | null

A dictionary containing additional information about the call. It is used as variables that you can use in "Opening Sentence" or "Flow Script" when you create a Pearl on the platform. The keys represent the field names, and the values contain the corresponding data. This information can be used to personalize the conversation or manage lead-specific details. This parameter is optional. see Variables for more information. Here is an exemple of the json to send: { "email" : "joe@gmail.com", "address": "3 Abbey Road UK" , "carLicense" : "90-929-82" }

collectedData
object | null

A dictionary containing all the information collected about the lead during the call.
These values are the result of the conversation and reflect the answers or actions taken by the lead.
The key represents the ID of the variable configured on the platform,
and the value corresponds to the collected data.

This information can be used to understand user intent, track specific responses, or power further automation.
For more details on how variables work, see Variables.

Here is an example of the JSON format: { "confirmBooking": true, "dropOffLocation": "Orly Airport", "rideTime": "Friday at 12:00", "userIntent": "Book a taxi to the airport" }