curl -X PATCH "https://server.smartlead.ai/api/v1/master-inbox/update-revenue?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"email_lead_map_id": 2433664091, "revenue": 50000}'
import requests
API_KEY = "YOUR_API_KEY"
def update_lead_revenue(lead_map_id, revenue_amount):
"""Update revenue for a lead"""
payload = {
"email_lead_map_id": lead_map_id,
"revenue": revenue_amount
}
response = requests.patch(
"https://server.smartlead.ai/api/v1/master-inbox/update-revenue",
params={"api_key": API_KEY},
json=payload
)
if response.status_code == 200:
print(f"✅ Revenue updated: ${revenue_amount:,.2f}")
return response.json()
# Record $50k deal
update_lead_revenue(2433664091, 50000)
const API_KEY = 'YOUR_API_KEY';
async function updateRevenue(leadMapId, revenue) {
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/update-revenue?api_key=${API_KEY}`,
{
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email_lead_map_id: leadMapId,
revenue: revenue
})
}
);
return response.json();
}
// Update to $50k
await updateRevenue(2433664091, 50000);
{
"success": true,
"message": "Revenue updated successfully",
"data": {
"email_lead_map_id": 2433664091,
"revenue": 50000,
"updated_at": "2025-01-20T15:30:00Z"
}
}
{
"error": "revenue must be non-negative",
"field": "revenue",
"provided_value": -1000
}
Master Inbox
Update Lead Revenue
Update the revenue value associated with a lead for ROI tracking
PATCH
/
api
/
v1
/
master-inbox
/
update-revenue
curl -X PATCH "https://server.smartlead.ai/api/v1/master-inbox/update-revenue?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"email_lead_map_id": 2433664091, "revenue": 50000}'
import requests
API_KEY = "YOUR_API_KEY"
def update_lead_revenue(lead_map_id, revenue_amount):
"""Update revenue for a lead"""
payload = {
"email_lead_map_id": lead_map_id,
"revenue": revenue_amount
}
response = requests.patch(
"https://server.smartlead.ai/api/v1/master-inbox/update-revenue",
params={"api_key": API_KEY},
json=payload
)
if response.status_code == 200:
print(f"✅ Revenue updated: ${revenue_amount:,.2f}")
return response.json()
# Record $50k deal
update_lead_revenue(2433664091, 50000)
const API_KEY = 'YOUR_API_KEY';
async function updateRevenue(leadMapId, revenue) {
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/update-revenue?api_key=${API_KEY}`,
{
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email_lead_map_id: leadMapId,
revenue: revenue
})
}
);
return response.json();
}
// Update to $50k
await updateRevenue(2433664091, 50000);
{
"success": true,
"message": "Revenue updated successfully",
"data": {
"email_lead_map_id": 2433664091,
"revenue": 50000,
"updated_at": "2025-01-20T15:30:00Z"
}
}
{
"error": "revenue must be non-negative",
"field": "revenue",
"provided_value": -1000
}
Track deal values and revenue per lead. Essential for calculating campaign ROI and measuring sales performance.
Overview
Updates the revenue value for a lead. Critical for ROI calculations, performance tracking, and determining high-value leads.Query Parameters
string
required
Your SmartLead API key
Request Body
number
required
Lead-campaign mapping ID
number
required
Revenue amount (must be non-negative). Currency based on account settings.
curl -X PATCH "https://server.smartlead.ai/api/v1/master-inbox/update-revenue?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"email_lead_map_id": 2433664091, "revenue": 50000}'
import requests
API_KEY = "YOUR_API_KEY"
def update_lead_revenue(lead_map_id, revenue_amount):
"""Update revenue for a lead"""
payload = {
"email_lead_map_id": lead_map_id,
"revenue": revenue_amount
}
response = requests.patch(
"https://server.smartlead.ai/api/v1/master-inbox/update-revenue",
params={"api_key": API_KEY},
json=payload
)
if response.status_code == 200:
print(f"✅ Revenue updated: ${revenue_amount:,.2f}")
return response.json()
# Record $50k deal
update_lead_revenue(2433664091, 50000)
const API_KEY = 'YOUR_API_KEY';
async function updateRevenue(leadMapId, revenue) {
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/update-revenue?api_key=${API_KEY}`,
{
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email_lead_map_id: leadMapId,
revenue: revenue
})
}
);
return response.json();
}
// Update to $50k
await updateRevenue(2433664091, 50000);
Response Example
{
"success": true,
"message": "Revenue updated successfully",
"data": {
"email_lead_map_id": 2433664091,
"revenue": 50000,
"updated_at": "2025-01-20T15:30:00Z"
}
}
{
"error": "revenue must be non-negative",
"field": "revenue",
"provided_value": -1000
}
Related Endpoints
⌘I
