Skip to main content

PATCH /api/v1/public/campaigns//steps//

Updates a campaign step’s properties including A/B testing variants. Auth: X-API-Key

Path Parameters

  • id (integer, required): Campaign ID
  • step_id (integer, required): Step ID

Request Body

{
  "delay_in_hours": 48,
  "subject_line": "Updated subject line",
  "message_template": "Updated message template with {{first_name}} and {{company_name}}",
  "subject_line_b": "Alternative subject line",
  "message_template_b": "Alternative message template",
  "add_unsubscribe": false,
  "parent_step_id": 123,
  "child_step_id": 456
}

Flow Management Fields

  • parent_step_id (integer, optional): ID of the step that comes before this one
  • parent_condition_id (integer, optional): ID of the condition that comes before this one
  • child_step_id (integer, optional): ID of the step that comes after this one
  • child_condition_id (integer, optional): ID of the condition that comes after this one
Note: You can only specify one parent (either parent_step_id OR parent_condition_id) and one child (either child_step_id OR child_condition_id).

Available Variables

You can use these variables in message templates and subject lines with double brackets {{}}:
  • {{first_name}} - Prospect’s first name
  • {{last_name}} - Prospect’s last name
  • {{job_title}} - Job title
  • {{company_name}} - Company name
  • {{location}} - Location
A/B Testing:
  • subject_line_b - Alternative subject line for A/B testing
  • message_template_b - Alternative message template for A/B testing

Response

{
  "success": true,
  "step": {
    "id": 456,
    "step_type": "EMAIL",
    "subject_line": "Updated subject line",
    "message_template": "Updated message template with {{first_name}} and {{company_name}}",
    "subject_line_b": "Alternative subject line",
    "message_template_b": "Alternative message template",
    "delay_in_hours": 48,
    "add_unsubscribe": false,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T11:45:00Z"
  },
  "campaign": {...}
}

Example

curl -X PATCH -H "X-API-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{
    "delay_in_hours": 48,
    "subject_line": "Updated subject line",
    "message_template": "Updated message template with {{first_name}} and {{company_name}}"
  }' \
  "https://api.seleqt.ai/api/v1/public/campaigns/123/steps/456/"