curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/schedule?api_key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schedule": {
"timezone": "America/New_York",
"days": [1, 2, 3, 4, 5],
"start_hour": "09:00",
"end_hour": "17:00",
"min_time_btw_emails": 120
}
}'
import requests
API_KEY = "YOUR_API_KEY"
campaign_id = 123
schedule = {
"schedule": {
"timezone": "America/New_York",
"days": [1, 2, 3, 4, 5], # Monday-Friday
"start_hour": "09:00",
"end_hour": "17:00",
"min_time_btw_emails": 120 # 2 hours between emails
}
}
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/schedule",
params={"api_key": API_KEY},
json=schedule
)
const API_KEY = 'YOUR_API_KEY';
const campaignId = 123;
const schedule = {
schedule: {
timezone: 'America/New_York',
days: [1, 2, 3, 4, 5],
start_hour: '09:00',
end_hour: '17:00',
min_time_btw_emails: 120
}
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/schedule?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(schedule)
}
);
{
"success": true,
"data": {
"message": "Schedule updated successfully",
"schedule": {
"timezone": "America/New_York",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00",
"min_time_between_emails": 120
}
}
}
{
"message": "Invalid API Key"
}
{
"error": "Resource not found"
}
{
"error": "Invalid parameters provided"
}
Campaign Management
Update Campaign Schedule
Configures when and how frequently campaign emails are sent.
POST
/
api
/
v1
/
campaigns
/
{campaign_id}
/
schedule
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/schedule?api_key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schedule": {
"timezone": "America/New_York",
"days": [1, 2, 3, 4, 5],
"start_hour": "09:00",
"end_hour": "17:00",
"min_time_btw_emails": 120
}
}'
import requests
API_KEY = "YOUR_API_KEY"
campaign_id = 123
schedule = {
"schedule": {
"timezone": "America/New_York",
"days": [1, 2, 3, 4, 5], # Monday-Friday
"start_hour": "09:00",
"end_hour": "17:00",
"min_time_btw_emails": 120 # 2 hours between emails
}
}
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/schedule",
params={"api_key": API_KEY},
json=schedule
)
const API_KEY = 'YOUR_API_KEY';
const campaignId = 123;
const schedule = {
schedule: {
timezone: 'America/New_York',
days: [1, 2, 3, 4, 5],
start_hour: '09:00',
end_hour: '17:00',
min_time_btw_emails: 120
}
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/schedule?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(schedule)
}
);
{
"success": true,
"data": {
"message": "Schedule updated successfully",
"schedule": {
"timezone": "America/New_York",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00",
"min_time_between_emails": 120
}
}
}
{
"message": "Invalid API Key"
}
{
"error": "Resource not found"
}
{
"error": "Invalid parameters provided"
}
Configures when and how frequently campaign emails are sent Sets timezone (IANA format), sending hours (start/end in 24-hour format), active days of week (0=Sunday through 6=Saturday), and minimum time between consecutive emails (in minutes)
Overview
Configures when and how frequently campaign emails are sent Key Features:- Validates timezone string and time format before saving
Path Parameters
number
required
The ID of the campaign to update
Query Parameters
string
required
Your SmartLead API key
Request Body
object
required
Sending schedule configuration
Show Schedule Object
Show Schedule Object
string
required
IANA timezone (e.g., “America/New_York”, “Europe/London”)
array
required
Days of week to send (0=Sunday, 1=Monday, …, 6=Saturday)Example:
[1, 2, 3, 4, 5] for Monday-Fridaystring
required
Start sending time (24-hour format, e.g., “09:00”)
string
required
Stop sending time (24-hour format, e.g., “17:00”)
number
Minimum minutes between consecutive emails
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/schedule?api_key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schedule": {
"timezone": "America/New_York",
"days": [1, 2, 3, 4, 5],
"start_hour": "09:00",
"end_hour": "17:00",
"min_time_btw_emails": 120
}
}'
import requests
API_KEY = "YOUR_API_KEY"
campaign_id = 123
schedule = {
"schedule": {
"timezone": "America/New_York",
"days": [1, 2, 3, 4, 5], # Monday-Friday
"start_hour": "09:00",
"end_hour": "17:00",
"min_time_btw_emails": 120 # 2 hours between emails
}
}
response = requests.post(
f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/schedule",
params={"api_key": API_KEY},
json=schedule
)
const API_KEY = 'YOUR_API_KEY';
const campaignId = 123;
const schedule = {
schedule: {
timezone: 'America/New_York',
days: [1, 2, 3, 4, 5],
start_hour: '09:00',
end_hour: '17:00',
min_time_btw_emails: 120
}
};
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/${campaignId}/schedule?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(schedule)
}
);
Response Codes
Success
Request successful
Bad Request
Invalid request parameters or malformed request body
Unauthorized
Invalid or missing API key. Check your authentication.
Not Found
The requested resource (campaign, lead, email account, etc.) does not exist or you don’t have access to it
Validation Error
Request validation failed. Check parameter types, required fields, and value constraints.
Rate Limit Exceeded
Too many requests. Please slow down and retry after the rate limit resets.
Internal Server Error
Server error occurred. Please try again or contact support if the issue persists.
Service Unavailable
API is temporarily unavailable or under maintenance. Please try again later.
{
"success": true,
"data": {
"message": "Schedule updated successfully",
"schedule": {
"timezone": "America/New_York",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00",
"min_time_between_emails": 120
}
}
}
{
"message": "Invalid API Key"
}
{
"error": "Resource not found"
}
{
"error": "Invalid parameters provided"
}
Schedule Best Practices
Business Hours
Send during recipient’s business hours:- B2B: 9 AM - 5 PM local time
- B2C: 10 AM - 8 PM local time
- Global: Consider multiple timezones
Days of Week
Monday-Friday [1,2,3,4,5] - Best for B2B
Tuesday-Thursday [2,3,4] - Highest open rates
All 7 days [0,1,2,3,4,5,6] - For B2C or urgent campaigns
Time Between Emails
- 120+ minutes: Appears more natural
- 60-120 minutes: Moderate pacing
- 30-60 minutes: Aggressive (use carefully)
Longer delays between emails (2-3 hours) result in better deliverability and appear more natural to recipients.
Common Timezones
America/New_York- US EasternAmerica/Los_Angeles- US PacificAmerica/Chicago- US CentralEurope/London- UKEurope/Paris- Central EuropeAsia/Tokyo- JapanAsia/Dubai- UAEAsia/Kolkata- IndiaAustralia/Sydney- Australia
