Skip to Content
API referenceCampaigns

Create Campaign Step

POST
/api/v1/campaigns/{campaign_id}/steps

Add a step to a campaign

Required scope: campaigns:write

Authorization

headerAuthorizationBearer <luso8_sk_live_<40 characters>>

A workspace API key, sent as Authorization: Bearer <key>. Create keys in Settings → Developers → API keys.

Path Parameters

campaign_id*Campaign Id

Request Body

application/json
  1. body

Schema for creating a campaign step.

Keywords (step_type, channel, condition_type, review_status) are matched ignoring case, and a blank id is no id.

review_status lets a client that just wrote the copy itself save the step as reviewed in one call (the detail page's step dialog does this). Only pending / reviewed are meaningful here; generated / edited are derived server-side. Leave it unset for AI / template-created steps so they still go through human review before launch.

name*Name
description?string|null
step_type*StepType
Value in"message""ai_message""wait""condition""ai_agent""webhook""update_contact""add_to_list""remove_from_list""end"
order*Order
channel?|null
subject?string|null
content?string|null
content_html?string|null
template_id?string|null
agent_id?string|null
agent_config?|null
ai_message_config?|null
wait_duration?integer|null
wait_unit?string|null
wait_until?|null
condition_type?|null
condition_config?|null
condition_timeout?integer|null
next_step_id?string|null
true_branch_step_id?string|null
false_branch_step_id?string|null
action_config?|null
webhook_url?string|null
webhook_method?|
Default"POST"
webhook_headers?|null
webhook_payload?|null
is_active?Is Active
Defaulttrue
skip_if_contacted?Skip If Contacted
Defaultfalse
retry_on_failure?Retry On Failure
Defaulttrue
max_retries?Max Retries
Default3
include_signature?Include Signature
Defaulttrue
trigger_workflow_id?string|null
ab_test_enabled?Ab Test Enabled
Defaultfalse
ab_variants?array<>|null
review_status?|null

Response Body

Successful Response

application/json
  1. response

Schema for campaign step response

name*Name
description?string|null
step_type*StepType
Value in"message""ai_message""wait""condition""ai_agent""webhook""update_contact""add_to_list""remove_from_list""end"
order*Order
channel?|null
subject?string|null
content?string|null
content_html?string|null
template_id?string|null
agent_id?string|null
agent_config?|null
ai_message_config?|null
wait_duration?integer|null
wait_unit?string|null
wait_until?|null
condition_type?|null
condition_config?|null
condition_timeout?integer|null
next_step_id?string|null
true_branch_step_id?string|null
false_branch_step_id?string|null
action_config?|null
webhook_url?string|null
webhook_method?|
Default"POST"
webhook_headers?|null
webhook_payload?|null
is_active?Is Active
Defaulttrue
skip_if_contacted?Skip If Contacted
Defaultfalse
retry_on_failure?Retry On Failure
Defaulttrue
max_retries?Max Retries
Default3
include_signature?Include Signature
Defaulttrue
trigger_workflow_id?string|null
ab_test_enabled?Ab Test Enabled
Defaultfalse
ab_variants?array<>|null
id*Id
campaign_id*Campaign Id
total_executed?Total Executed
Default0
total_success?Total Success
Default0
total_failed?Total Failed
Default0
review_status?StepReviewStatus

Per-step review state for the generate-copy → review → launch flow.

Default"pending"
Value in"pending""generated""reviewed""edited"
reviewed_by?string|null
reviewed_at?|null
generated_at?|null
generation_job_id?string|null
created_at*Created At
Formatdate-time
updated_at?|null
Example Request
curl -X POST 'https://api.luso8.rexplore.ai/api/v1/campaigns/string/steps' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "step_type": "message",  "order": 0}'
Example Response
{  "name": "string",  "description": "string",  "step_type": "message",  "order": 0,  "channel": "email",  "subject": "string",  "content": "string",  "content_html": "string",  "template_id": "string",  "agent_id": "string",  "agent_config": {},  "ai_message_config": {},  "wait_duration": 0,  "wait_unit": "string",  "wait_until": {},  "condition_type": "email_opened",  "condition_config": {},  "condition_timeout": 0,  "next_step_id": "string",  "true_branch_step_id": "string",  "false_branch_step_id": "string",  "action_config": {},  "webhook_url": "string",  "webhook_method": "POST",  "webhook_headers": {    "property1": "string",    "property2": "string"  },  "webhook_payload": {},  "is_active": true,  "skip_if_contacted": false,  "retry_on_failure": true,  "max_retries": 3,  "include_signature": true,  "trigger_workflow_id": "string",  "ab_test_enabled": false,  "ab_variants": [    {}  ],  "id": "string",  "campaign_id": "string",  "total_executed": 0,  "total_success": 0,  "total_failed": 0,  "review_status": "pending",  "reviewed_by": "string",  "reviewed_at": "2019-08-24T14:15:22Z",  "generated_at": "2019-08-24T14:15:22Z",  "generation_job_id": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}