Skip to main content
Updates an existing lead. Only the fields you provide in the request body are changed.

Endpoint

PUT /user/leads/{id}

Path parameters

id
integer
required
ID of the lead to update.

Request

campaign_id
integer
ID of the campaign to assign the lead to. Must belong to your account.
phone_number
string
New phone number for the lead. Automatically formatted to E.164.
status
string
New status. Allowed values: created, completed, reached-max-retries.
Only a subset of statuses can be set manually. Statuses like processing and scheduled are assigned automatically by the system.
variables
object
Variables to merge with existing lead variables. Existing keys are updated; new keys are added.

Response

message
string
Confirmation that the lead was updated.

Example

curl -X PUT "https://portal.intellixent.ai/api/user/leads/123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+1234567890",
    "variables": {
      "customer_name": "John Doe",
      "company": "Acme Corp"
    }
  }'
200 Success
{
  "message": "Lead updated successfully"
}
404 Not found
{
  "message": "Lead not found"
}
422 Validation error
{
  "message": "Validation failed",
  "errors": {
    "status": ["This status is assigned automatically and cannot be set manually"]
  }
}