curl -X PATCH "https://server.smartlead.ai/api/v1/master-inbox/update-category?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_lead_map_id": 2433664091,
"category_id": 1
}'
import requests
API_KEY = "YOUR_API_KEY"
# Mark lead as interested
payload = {
"email_lead_map_id": 2433664091,
"category_id": 1 # Interested
}
response = requests.patch(
"https://server.smartlead.ai/api/v1/master-inbox/update-category",
params={"api_key": API_KEY},
json=payload
)
if response.status_code == 200:
print("Lead categorized as Interested")
const API_KEY = 'YOUR_API_KEY';
// Mark lead as interested
const payload = {
email_lead_map_id: 2433664091,
category_id: 1 // Interested
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/update-category?api_key=${API_KEY}`,
{
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
console.log('Lead categorized');
{
"success": true,
"message": "Lead category updated successfully"
}
{
"error": "Lead mapping not found"
}
{
"error": "category_id must be a valid number or null"
}
Master Inbox
Update Lead Category
Assign or change the category for a lead (Interested, Not Interested, etc.)
PATCH
/
api
/
v1
/
master-inbox
/
update-category
curl -X PATCH "https://server.smartlead.ai/api/v1/master-inbox/update-category?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_lead_map_id": 2433664091,
"category_id": 1
}'
import requests
API_KEY = "YOUR_API_KEY"
# Mark lead as interested
payload = {
"email_lead_map_id": 2433664091,
"category_id": 1 # Interested
}
response = requests.patch(
"https://server.smartlead.ai/api/v1/master-inbox/update-category",
params={"api_key": API_KEY},
json=payload
)
if response.status_code == 200:
print("Lead categorized as Interested")
const API_KEY = 'YOUR_API_KEY';
// Mark lead as interested
const payload = {
email_lead_map_id: 2433664091,
category_id: 1 // Interested
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/update-category?api_key=${API_KEY}`,
{
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
console.log('Lead categorized');
{
"success": true,
"message": "Lead category updated successfully"
}
{
"error": "Lead mapping not found"
}
{
"error": "category_id must be a valid number or null"
}
Categories help organize leads by response type. Common categories: Interested, Not Interested, Meeting Request, Do Not Contact. Get category IDs from the categories endpoint.
Query Parameters
string
required
Your SmartLead API key
Request Body
number
required
The ID of the lead-campaign mapping to update. This is the
campaign_lead_map_id from inbox or campaign leads endpoints.number
required
The category ID to assign. Use
null to remove category assignment.Common Categories:1- Interested2- Meeting Request3- Not Interested4- Do Not Contact5- Information Request- Custom categories (your defined IDs)
curl -X PATCH "https://server.smartlead.ai/api/v1/master-inbox/update-category?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_lead_map_id": 2433664091,
"category_id": 1
}'
import requests
API_KEY = "YOUR_API_KEY"
# Mark lead as interested
payload = {
"email_lead_map_id": 2433664091,
"category_id": 1 # Interested
}
response = requests.patch(
"https://server.smartlead.ai/api/v1/master-inbox/update-category",
params={"api_key": API_KEY},
json=payload
)
if response.status_code == 200:
print("Lead categorized as Interested")
const API_KEY = 'YOUR_API_KEY';
// Mark lead as interested
const payload = {
email_lead_map_id: 2433664091,
category_id: 1 // Interested
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/update-category?api_key=${API_KEY}`,
{
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
console.log('Lead categorized');
Response Codes
Success
Category updated successfully
Unauthorized
Invalid API key
Not Found
Lead mapping not found
Validation Error
Invalid category_id or email_lead_map_id
{
"success": true,
"message": "Lead category updated successfully"
}
{
"error": "Lead mapping not found"
}
{
"error": "category_id must be a valid number or null"
}
Common Use Cases
Mark as Interested
update_category(lead_map_id, category_id=1) # Interested
Mark as Not Interested
update_category(lead_map_id, category_id=3) # Not Interested
Mark as Meeting Request
update_category(lead_map_id, category_id=2) # Meeting Request
Remove Category
update_category(lead_map_id, category_id=None) # Unassign
Getting email_lead_map_id
Theemail_lead_map_id is returned as campaign_lead_map_id from inbox endpoints:
From inbox response
{
"campaign_lead_map_id": "2433664091", // Use this as email_lead_map_id
"lead": {...}
}
