Skip to main content
PATCH
/
api
/
leads
/
{id}
/
agent
Error
A valid request URL is required to generate request examples
{
  "id": 123,
  "name": "<string>",
  "phone": "<string>",
  "email": "",
  "status": "new",
  "accountId": "<string>",
  "source": "api",
  "tags": [
    "<string>"
  ],
  "assignedAgentId": "<string>",
  "abTestId": "<string>",
  "agentAssignedBy": "auto",
  "customFields": {},
  "lastContactedAt": "2023-11-07T05:31:56Z",
  "importBatchId": "<string>",
  "externalId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-API-Key
string
header
required

API key prefixed with nl_live_ or nl_test_

Path Parameters

id
integer
required

Account-scoped sequential lead ID

Body

application/json
assignedAgentId
string | null
required

AgentConfig ObjectId or null to unassign

Response

Updated lead

id
integer
required

Sequential, account-scoped identifier

name
string
required
phone
string
required

Unique per account

email
string
default:""
required
status
enum<string>
required
Available options:
new,
contacted,
qualified,
disqualified
accountId
string
required
source
string
default:api
tags
string[]
assignedAgentId
string

ObjectId reference to AgentConfig

abTestId
string

ObjectId reference to AbTest

agentAssignedBy
enum<string>
default:auto
Available options:
manual,
ab_test,
auto
customFields
object

Key-value string map of custom fields

lastContactedAt
string<date-time>
importBatchId
string
externalId
string
createdAt
string<date-time>
updatedAt
string<date-time>