Skip to main content
PATCH
/
v1
/
campaigns
/
{id}
/
steps
/
{step_id}
Update Campaign Step
curl --request PATCH \
  --url https://api.example.com/v1/campaigns/{id}/steps/{step_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "subject": "<string>",
  "body": "<string>",
  "delay_days": 123,
  "delay_hours": 123,
  "send_condition": "<string>"
}
'
{
  "data": {
    "step": {}
  }
}

Request

Path Parameters

id
string
required
The campaign’s unique ID (UUID)
step_id
string
required
The step’s unique ID (UUID)

Headers

Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json
Requires an API key with the campaigns:write permission. All body fields are optional — include only fields you want to change.

Body Parameters

subject
string
Email subject line
body
string
Email body
delay_days
integer
Days to wait after previous step
delay_hours
integer
Additional hours (0–23)
send_condition
string
always, if_no_reply, if_no_open, if_opened, or if_clicked
Updating a step only affects future sends. Contacts who have already received this step under the previous configuration are unaffected.

Response

data
object
curl -X PATCH https://data.leadlex.com/functions/v1/api-gateway/v1/campaigns/cmp_abc123/steps/step_2 \
  -H "Authorization: Bearer wbk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"delay_days": 5}'

Example Response

{
  "data": {
    "step": {
      "id": "step_2",
      "index": 1,
      "subject": "Re: {{company_name}}",
      "body": "Just circling back on my note from last week...",
      "delay_days": 5,
      "delay_hours": 0,
      "send_condition": "if_no_reply"
    }
  }
}

Errors

StatusCodeDescription
400invalid_send_conditionUnrecognized send_condition
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing campaigns:write permission
404campaign_not_foundNo campaign with this ID
404step_not_foundNo step with this ID in the campaign
429rate_limitedRate limit exceeded