curl -X POST "https://server.smartlead.ai/api/v1/campaigns/create-subsequence?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"parent_campaign_id": 123,
"name": "Follow-up Sequence",
"conditionEvents": [
{"eventType": "CATEGORY", "categoryId": 6},
{"eventType": "REPLY_MESSAGE_BODY_TEXT", "text": "pricing"}
]
}'
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://server.smartlead.ai/api/v1/campaigns/create-subsequence",
params={"api_key": API_KEY},
json={
"parent_campaign_id": 123,
"name": "Follow-up Sequence",
"conditionEvents": [
{"eventType": "CATEGORY", "categoryId": 6},
{"eventType": "REPLY_MESSAGE_BODY_TEXT", "text": "pricing"}
]
}
)
result = response.json()
print(f"Subsequence created with ID: {result['id']}")
const API_KEY = 'YOUR_API_KEY';
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/create-subsequence?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
parent_campaign_id: 123,
name: 'Follow-up Sequence',
conditionEvents: [
{ eventType: 'CATEGORY', categoryId: 6 },
{ eventType: 'REPLY_MESSAGE_BODY_TEXT', text: 'pricing' }
]
})
}
);
const result = await response.json();
console.log(`Subsequence created with ID: ${result.id}`);
{
"ok": true,
"id": 456,
"name": "Follow-up Sequence",
"parent_campaign_id": 123,
"created_at": "2026-08-19T10:29:20.609Z"
}
{
"statusCode": 400,
"error": "Bad Request",
"message": "\"condition_events\" is not allowed",
"validation": {
"source": "body",
"keys": ["condition_events"]
}
}
{
"message": "Invalid API Key"
}
Campaign Management
Create Subsequence Campaign
Create a child campaign (subsequence) with conditional trigger logic
POST
/
api
/
v1
/
campaigns
/
create-subsequence
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/create-subsequence?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"parent_campaign_id": 123,
"name": "Follow-up Sequence",
"conditionEvents": [
{"eventType": "CATEGORY", "categoryId": 6},
{"eventType": "REPLY_MESSAGE_BODY_TEXT", "text": "pricing"}
]
}'
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://server.smartlead.ai/api/v1/campaigns/create-subsequence",
params={"api_key": API_KEY},
json={
"parent_campaign_id": 123,
"name": "Follow-up Sequence",
"conditionEvents": [
{"eventType": "CATEGORY", "categoryId": 6},
{"eventType": "REPLY_MESSAGE_BODY_TEXT", "text": "pricing"}
]
}
)
result = response.json()
print(f"Subsequence created with ID: {result['id']}")
const API_KEY = 'YOUR_API_KEY';
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/create-subsequence?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
parent_campaign_id: 123,
name: 'Follow-up Sequence',
conditionEvents: [
{ eventType: 'CATEGORY', categoryId: 6 },
{ eventType: 'REPLY_MESSAGE_BODY_TEXT', text: 'pricing' }
]
})
}
);
const result = await response.json();
console.log(`Subsequence created with ID: ${result.id}`);
{
"ok": true,
"id": 456,
"name": "Follow-up Sequence",
"parent_campaign_id": 123,
"created_at": "2026-08-19T10:29:20.609Z"
}
{
"statusCode": 400,
"error": "Bad Request",
"message": "\"condition_events\" is not allowed",
"validation": {
"source": "body",
"keys": ["condition_events"]
}
}
{
"message": "Invalid API Key"
}
Create branching campaign logic by defining subsequences that trigger based on lead behavior. Essential for sophisticated nurture workflows.
Query Parameters
string
required
Your SmartLead API key
Request Body
number
required
ID of the parent campaign this subsequence belongs to
string
Name for the subsequence campaign. Defaults to
"Untitled Subsequence" if not provided.array
Array of trigger conditions that move a lead into this subsequence. Pass
[] to create a subsequence with no conditions.Show Condition event properties
Show Condition event properties
string
required
The trigger event type. Must be one of:
OPEN_AN_EMAIL— Lead opened an emailCLICK_ON_AN_EMAIL_LINK— Lead clicked a link in an emailREPLY_AN_EMAIL— Lead replied to an emailREPLY_MESSAGE_BODY_TEXT— Lead replied with specific text in the bodyCATEGORY— Lead was categorized into a specific category
number
Category ID. Required when
eventType is CATEGORY.string
Text to match in the reply body. Used when
eventType is REPLY_MESSAGE_BODY_TEXT.string
Optional sub-type for the event.
number
Client ID (for agency/white-label accounts)
The top-level body keys use
snake_case (parent_campaign_id, client_id) while the nested condition keys use camelCase (eventType, categoryId, eventSubType). The conditionEvents key itself is also camelCase.The API supports 5 event types listed above. Additional event types visible in the UI (such as re-engagement, bounce-based, opens/clicks counters, and LinkedIn events) are not available through this endpoint.
curl -X POST "https://server.smartlead.ai/api/v1/campaigns/create-subsequence?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"parent_campaign_id": 123,
"name": "Follow-up Sequence",
"conditionEvents": [
{"eventType": "CATEGORY", "categoryId": 6},
{"eventType": "REPLY_MESSAGE_BODY_TEXT", "text": "pricing"}
]
}'
import requests
API_KEY = "YOUR_API_KEY"
response = requests.post(
"https://server.smartlead.ai/api/v1/campaigns/create-subsequence",
params={"api_key": API_KEY},
json={
"parent_campaign_id": 123,
"name": "Follow-up Sequence",
"conditionEvents": [
{"eventType": "CATEGORY", "categoryId": 6},
{"eventType": "REPLY_MESSAGE_BODY_TEXT", "text": "pricing"}
]
}
)
result = response.json()
print(f"Subsequence created with ID: {result['id']}")
const API_KEY = 'YOUR_API_KEY';
const response = await fetch(
`https://server.smartlead.ai/api/v1/campaigns/create-subsequence?api_key=${API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
parent_campaign_id: 123,
name: 'Follow-up Sequence',
conditionEvents: [
{ eventType: 'CATEGORY', categoryId: 6 },
{ eventType: 'REPLY_MESSAGE_BODY_TEXT', text: 'pricing' }
]
})
}
);
const result = await response.json();
console.log(`Subsequence created with ID: ${result.id}`);
Response Fields
boolean
true on successful creationnumber
Unique identifier for the newly created subsequence campaign
string
Subsequence name (either provided or
"Untitled Subsequence")number
ID of the parent campaign
string
ISO 8601 timestamp when the subsequence was created
Response Codes
Success
Subsequence campaign created successfully
Bad Request
Invalid request body. The endpoint validates body keys strictly — unrecognized keys are rejected.
Unauthorized
Invalid or missing API key
Validation Error
Request validation failed. Check parameter types and required fields.
Internal Server Error
Server error occurred
{
"ok": true,
"id": 456,
"name": "Follow-up Sequence",
"parent_campaign_id": 123,
"created_at": "2026-08-19T10:29:20.609Z"
}
{
"statusCode": 400,
"error": "Bad Request",
"message": "\"condition_events\" is not allowed",
"validation": {
"source": "body",
"keys": ["condition_events"]
}
}
{
"message": "Invalid API Key"
}
