curl -X POST "https://server.smartlead.ai/api/v1/master-inbox/create-task?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_lead_map_id": 2433664091,
"name": "Schedule demo call",
"description": "Lead interested in enterprise plan",
"priority": "HIGH",
"due_date": "2025-01-25T14:00:00Z"
}'
import requests
from datetime import datetime, timedelta
API_KEY = "YOUR_API_KEY"
def create_task(lead_map_id, name, description="", priority="MEDIUM", due_date=None):
"""Create a task for lead follow-up"""
payload = {
"email_lead_map_id": lead_map_id,
"name": name,
"description": description,
"priority": priority,
"due_date": due_date
}
response = requests.post(
"https://server.smartlead.ai/api/v1/master-inbox/create-task",
params={"api_key": API_KEY},
json=payload
)
return response.json()
# Create high-priority task due tomorrow
tomorrow = (datetime.now() + timedelta(days=1)).replace(hour=14, minute=0).isoformat() + 'Z'
create_task(
lead_map_id=2433664091,
name="Schedule demo call",
description="Lead expressed interest in enterprise features",
priority="HIGH",
due_date=tomorrow
)
const API_KEY = 'YOUR_API_KEY';
async function createTask(leadMapId, name, options = {}) {
const payload = {
email_lead_map_id: leadMapId,
name: name,
description: options.description || '',
priority: options.priority || 'MEDIUM',
due_date: options.dueDate || null
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/create-task?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
return response.json();
}
// Create task
await createTask(2433664091, 'Follow up on pricing', {
description: 'Lead requested custom pricing',
priority: 'HIGH',
dueDate: '2025-01-25T14:00:00Z'
});
{
"success": true,
"message": "Task created successfully",
"data": {
"task_id": 789,
"email_lead_map_id": 2433664091,
"name": "Schedule demo call",
"priority": "HIGH",
"due_date": "2025-01-25T14:00:00Z"
}
}
Master Inbox
Create Lead Task
Create a task associated with a lead for follow-up management
POST
/
api
/
v1
/
master-inbox
/
create-task
curl -X POST "https://server.smartlead.ai/api/v1/master-inbox/create-task?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_lead_map_id": 2433664091,
"name": "Schedule demo call",
"description": "Lead interested in enterprise plan",
"priority": "HIGH",
"due_date": "2025-01-25T14:00:00Z"
}'
import requests
from datetime import datetime, timedelta
API_KEY = "YOUR_API_KEY"
def create_task(lead_map_id, name, description="", priority="MEDIUM", due_date=None):
"""Create a task for lead follow-up"""
payload = {
"email_lead_map_id": lead_map_id,
"name": name,
"description": description,
"priority": priority,
"due_date": due_date
}
response = requests.post(
"https://server.smartlead.ai/api/v1/master-inbox/create-task",
params={"api_key": API_KEY},
json=payload
)
return response.json()
# Create high-priority task due tomorrow
tomorrow = (datetime.now() + timedelta(days=1)).replace(hour=14, minute=0).isoformat() + 'Z'
create_task(
lead_map_id=2433664091,
name="Schedule demo call",
description="Lead expressed interest in enterprise features",
priority="HIGH",
due_date=tomorrow
)
const API_KEY = 'YOUR_API_KEY';
async function createTask(leadMapId, name, options = {}) {
const payload = {
email_lead_map_id: leadMapId,
name: name,
description: options.description || '',
priority: options.priority || 'MEDIUM',
due_date: options.dueDate || null
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/create-task?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
return response.json();
}
// Create task
await createTask(2433664091, 'Follow up on pricing', {
description: 'Lead requested custom pricing',
priority: 'HIGH',
dueDate: '2025-01-25T14:00:00Z'
});
{
"success": true,
"message": "Task created successfully",
"data": {
"task_id": 789,
"email_lead_map_id": 2433664091,
"name": "Schedule demo call",
"priority": "HIGH",
"due_date": "2025-01-25T14:00:00Z"
}
}
Create actionable tasks linked to leads. Essential for managing follow-ups, tracking action items, and team collaboration.
Overview
Creates a task associated with a specific lead to track follow-up actions and ensure nothing falls through the cracks.Query Parameters
Your SmartLead API key
Request Body
Lead-campaign mapping ID
Task title/name
Detailed task notes (optional)
Task priority:
LOW, MEDIUM, or HIGHDue date in ISO 8601 format (optional)
curl -X POST "https://server.smartlead.ai/api/v1/master-inbox/create-task?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"email_lead_map_id": 2433664091,
"name": "Schedule demo call",
"description": "Lead interested in enterprise plan",
"priority": "HIGH",
"due_date": "2025-01-25T14:00:00Z"
}'
import requests
from datetime import datetime, timedelta
API_KEY = "YOUR_API_KEY"
def create_task(lead_map_id, name, description="", priority="MEDIUM", due_date=None):
"""Create a task for lead follow-up"""
payload = {
"email_lead_map_id": lead_map_id,
"name": name,
"description": description,
"priority": priority,
"due_date": due_date
}
response = requests.post(
"https://server.smartlead.ai/api/v1/master-inbox/create-task",
params={"api_key": API_KEY},
json=payload
)
return response.json()
# Create high-priority task due tomorrow
tomorrow = (datetime.now() + timedelta(days=1)).replace(hour=14, minute=0).isoformat() + 'Z'
create_task(
lead_map_id=2433664091,
name="Schedule demo call",
description="Lead expressed interest in enterprise features",
priority="HIGH",
due_date=tomorrow
)
const API_KEY = 'YOUR_API_KEY';
async function createTask(leadMapId, name, options = {}) {
const payload = {
email_lead_map_id: leadMapId,
name: name,
description: options.description || '',
priority: options.priority || 'MEDIUM',
due_date: options.dueDate || null
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/master-inbox/create-task?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}
);
return response.json();
}
// Create task
await createTask(2433664091, 'Follow up on pricing', {
description: 'Lead requested custom pricing',
priority: 'HIGH',
dueDate: '2025-01-25T14:00:00Z'
});
Response Example
{
"success": true,
"message": "Task created successfully",
"data": {
"task_id": 789,
"email_lead_map_id": 2433664091,
"name": "Schedule demo call",
"priority": "HIGH",
"due_date": "2025-01-25T14:00:00Z"
}
}
Related Endpoints
⌘I
