curl --request POST \
--url http://localhost/public/v1/email/campaigns \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"template_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"mail_account_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"events": [
"contact.saved"
]
}
'{
"ok": true,
"campaign": {
"id": "<string>",
"team_id": "<string>",
"name": "<string>",
"delivery_type": "<string>",
"campaign_type": "<string>",
"meta": [
"<unknown>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"draft_data": {
"last_sent_at": "<string>",
"send_data": {
"campaign_type": "broadcast",
"template_ids": [
"<string>"
],
"mail_account_ids": [
"<string>"
],
"from_name": "<string>",
"reply_to_name": "<string>",
"reply_to_email": "<string>",
"broadcast_send": {
"send_amount": 123,
"scheduled_send_time": "<string>"
},
"automation_send": {
"send_amount": 123,
"iteration_send_amount": 200,
"min_delivery_rate": 92,
"send_interval": 10,
"scheduled_send_time": "<string>",
"is_incremental_send": true,
"max_iterations": 0,
"max_iteration_send_amount": 1000
},
"event_triggered_send": {
"events": [
"contact.saved"
],
"contact_cooldown_interval": 3600,
"contact_daily_email_cap": 3,
"enabled": true
},
"segment_query": {
"condition": "AND",
"type": "builder",
"rules": [
"<string>"
]
},
"open_tracking": true,
"click_tracking": true,
"verification_data": {
"acceptable_statuses": [
"valid"
],
"active": false,
"max_budget": 1,
"age_threshold": 2
},
"contact_cache_level": "campaign",
"user_platform_role": "member"
}
},
"campaign_sends": [
{
"id": "<string>",
"campaign_id": "<string>",
"campaign_type": "<string>",
"status": "<string>",
"next_send_at": "2023-11-07T05:31:56Z",
"next_send_countdown": {
"total": 123,
"remaining": 123
},
"send_data": {
"campaign_type": "broadcast",
"template_ids": [
"<string>"
],
"mail_account_ids": [
"<string>"
],
"from_name": "<string>",
"reply_to_name": "<string>",
"reply_to_email": "<string>",
"broadcast_send": {
"send_amount": 123,
"scheduled_send_time": "<string>"
},
"automation_send": {
"send_amount": 123,
"iteration_send_amount": 200,
"min_delivery_rate": 92,
"send_interval": 10,
"scheduled_send_time": "<string>",
"is_incremental_send": true,
"max_iterations": 0,
"max_iteration_send_amount": 1000
},
"event_triggered_send": {
"events": [
"contact.saved"
],
"contact_cooldown_interval": 3600,
"contact_daily_email_cap": 3,
"enabled": true
},
"segment_query": {
"condition": "AND",
"type": "builder",
"rules": [
"<string>"
]
},
"open_tracking": true,
"click_tracking": true,
"verification_data": {
"acceptable_statuses": [
"valid"
],
"active": false,
"max_budget": 1,
"age_threshold": 2
},
"contact_cache_level": "campaign",
"user_platform_role": "member"
},
"send_progress": {
"total_sent": 0,
"total_bounced": 0,
"delivery_rate": 0,
"current_iteration": 0,
"reason": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}Creates a campaign that automatically sends emails when specific events occur.
curl --request POST \
--url http://localhost/public/v1/email/campaigns \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"template_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"mail_account_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"events": [
"contact.saved"
]
}
'{
"ok": true,
"campaign": {
"id": "<string>",
"team_id": "<string>",
"name": "<string>",
"delivery_type": "<string>",
"campaign_type": "<string>",
"meta": [
"<unknown>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"draft_data": {
"last_sent_at": "<string>",
"send_data": {
"campaign_type": "broadcast",
"template_ids": [
"<string>"
],
"mail_account_ids": [
"<string>"
],
"from_name": "<string>",
"reply_to_name": "<string>",
"reply_to_email": "<string>",
"broadcast_send": {
"send_amount": 123,
"scheduled_send_time": "<string>"
},
"automation_send": {
"send_amount": 123,
"iteration_send_amount": 200,
"min_delivery_rate": 92,
"send_interval": 10,
"scheduled_send_time": "<string>",
"is_incremental_send": true,
"max_iterations": 0,
"max_iteration_send_amount": 1000
},
"event_triggered_send": {
"events": [
"contact.saved"
],
"contact_cooldown_interval": 3600,
"contact_daily_email_cap": 3,
"enabled": true
},
"segment_query": {
"condition": "AND",
"type": "builder",
"rules": [
"<string>"
]
},
"open_tracking": true,
"click_tracking": true,
"verification_data": {
"acceptable_statuses": [
"valid"
],
"active": false,
"max_budget": 1,
"age_threshold": 2
},
"contact_cache_level": "campaign",
"user_platform_role": "member"
}
},
"campaign_sends": [
{
"id": "<string>",
"campaign_id": "<string>",
"campaign_type": "<string>",
"status": "<string>",
"next_send_at": "2023-11-07T05:31:56Z",
"next_send_countdown": {
"total": 123,
"remaining": 123
},
"send_data": {
"campaign_type": "broadcast",
"template_ids": [
"<string>"
],
"mail_account_ids": [
"<string>"
],
"from_name": "<string>",
"reply_to_name": "<string>",
"reply_to_email": "<string>",
"broadcast_send": {
"send_amount": 123,
"scheduled_send_time": "<string>"
},
"automation_send": {
"send_amount": 123,
"iteration_send_amount": 200,
"min_delivery_rate": 92,
"send_interval": 10,
"scheduled_send_time": "<string>",
"is_incremental_send": true,
"max_iterations": 0,
"max_iteration_send_amount": 1000
},
"event_triggered_send": {
"events": [
"contact.saved"
],
"contact_cooldown_interval": 3600,
"contact_daily_email_cap": 3,
"enabled": true
},
"segment_query": {
"condition": "AND",
"type": "builder",
"rules": [
"<string>"
]
},
"open_tracking": true,
"click_tracking": true,
"verification_data": {
"acceptable_statuses": [
"valid"
],
"active": false,
"max_budget": 1,
"age_threshold": 2
},
"contact_cache_level": "campaign",
"user_platform_role": "member"
},
"send_progress": {
"total_sent": 0,
"total_bounced": 0,
"delivery_rate": 0,
"current_iteration": 0,
"reason": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}Required. Name of the campaign.
Required. Array of email template IDs to use in rotation.
1Required. Each template ID must be a valid UUID.
Required. Array of mail account IDs to use for sending.
1Required. Each mail account ID must be a valid UUID of an active account.
Required. Array of event names that trigger this campaign.
1Required. Event name must be one of: contact_saved, lead_created, sale_created.
contact.saved, lead.created, sale.created