Skip to main content
POST
/
api
/
v1
/
campaigns
/
{campaign_id}
/
leads
/
{lead_id}
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/leads/456?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "company_name": "Acme Corp",
    "custom_fields": {
      "job_title": "CTO",
      "department": "Engineering"
    }
  }'
{
  "ok": true
}
Updating a lead modifies the lead record globally across all campaigns. The email field is required even if not being changed.

Path Parameters

campaign_id
number
required
The campaign ID (used for validation and audit logging)
lead_id
number
required
The lead ID to update

Query Parameters

api_key
string
required
Your SmartLead API key

Request Body

email
string
required
Lead’s email address (required field, even if not being changed)
first_name
string
Lead’s first name
last_name
string
Lead’s last name
phone_number
string
Lead’s phone number
company_name
string
Company name
website
string
Company website
location
string
Lead’s location
linkedin_profile
string
LinkedIn profile URL
company_url
string
Company URL
custom_fields
object
Custom fields object (maximum 200 key-value pairs). Custom fields are merged with existing fields, not replaced.
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/leads/456?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "john@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "company_name": "Acme Corp",
    "custom_fields": {
      "job_title": "CTO",
      "department": "Engineering"
    }
  }'

Response Codes

200
Success
Lead updated successfully
401
Unauthorized
Invalid or missing API key
404
Not Found
Campaign or lead not found, or you don’t have access
422
Validation Error
Missing required email field or invalid custom_fields object size
500
Internal Server Error
Server error occurred
{
  "ok": true
}