Skip to main content
PATCH
/
v1
/
leads
/
{id}
/
status
curl -X PATCH https://api.sendpilot.ai/v1/leads/lead_abc123/status \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "OPPORTUNITY",
    "note": "Interested in enterprise plan"
  }'
const response = await fetch('https://api.sendpilot.ai/v1/leads/lead_abc123/status', {
  method: 'PATCH',
  headers: {
    'X-API-Key': process.env.SENDPILOT_API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    status: 'OPPORTUNITY',
    note: 'Interested in enterprise plan'
  })
});
const result = await response.json();
import requests

response = requests.patch(
    'https://api.sendpilot.ai/v1/leads/lead_abc123/status',
    headers={
        'X-API-Key': 'YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'status': 'OPPORTUNITY',
        'note': 'Interested in enterprise plan'
    }
)
result = response.json()
{
  "success": true,
  "leadId": "lead_abc123",
  "status": "OPPORTUNITY",
  "message": "Lead status updated to 'OPPORTUNITY'"
}
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Invalid status value"
}
{
  "statusCode": 404,
  "error": "Not Found",
  "code": "LEAD_NOT_FOUND",
  "message": "Lead with ID 'lead_abc123' not found in this workspace"
}
Manually update a lead’s status. This is useful for marking leads as opportunities or not interested based on external information. You can update either the campaign status, custom lead status, or both in a single request.

Request

X-API-Key
string
required
Your API key
id
string
required
The lead ID
status
string
The campaign status for the lead. Options:
  • MEETING_BOOKED - Mark as meeting booked
  • OPPORTUNITY - Mark as a sales opportunity
  • NOT_INTERESTED - Mark as not interested
  • DONE - Mark as completed
customLeadStatus
string
The custom lead status for CRM categorization. Options:
  • LEAD - New lead (default)
  • INTERESTED - Lead has shown interest
  • MEETING_BOOKED - Meeting has been scheduled
  • MEETING_COMPLETE_NOT_CLOSED - Meeting completed but deal not closed
  • CLOSED - Deal closed/won
  • WRONG_PERSON - Wrong contact/person
  • NOT_INTERESTED - Lead is not interested
  • NO_RESPONSE - No response received
note
string
Optional note to add to the lead’s history
At least one of status or customLeadStatus must be provided. You can update both in a single request.

Response

success
boolean
Whether the update was successful
leadId
string
Lead identifier
status
string
The new status
message
string
Confirmation message
curl -X PATCH https://api.sendpilot.ai/v1/leads/lead_abc123/status \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "OPPORTUNITY",
    "note": "Interested in enterprise plan"
  }'
const response = await fetch('https://api.sendpilot.ai/v1/leads/lead_abc123/status', {
  method: 'PATCH',
  headers: {
    'X-API-Key': process.env.SENDPILOT_API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    status: 'OPPORTUNITY',
    note: 'Interested in enterprise plan'
  })
});
const result = await response.json();
import requests

response = requests.patch(
    'https://api.sendpilot.ai/v1/leads/lead_abc123/status',
    headers={
        'X-API-Key': 'YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'status': 'OPPORTUNITY',
        'note': 'Interested in enterprise plan'
    }
)
result = response.json()
{
  "success": true,
  "leadId": "lead_abc123",
  "status": "OPPORTUNITY",
  "message": "Lead status updated to 'OPPORTUNITY'"
}
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Invalid status value"
}
{
  "statusCode": 404,
  "error": "Not Found",
  "code": "LEAD_NOT_FOUND",
  "message": "Lead with ID 'lead_abc123' not found in this workspace"
}
When a lead’s status is updated, a lead.updated webhook event will be sent to your registered webhook endpoints.

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

id
string
required

Lead ID

Body

application/json
status
enum<string>
required

New status for the lead

Available options:
PENDING,
CONNECTION_SENT,
CONNECTION_ACCEPTED,
MESSAGE_SENT,
REPLY_RECEIVED,
DONE
note
string

Optional note for the status change

Response

Lead status updated

success
boolean
required
leadId
string
required
status
string
required
message
string
required