Skip to main content
POST
/
v1
/
campaigns
/
{id}
/
steps
Add Step to Campaign
curl --request POST \
  --url https://app-api.walead.ai/api/v1/campaigns/{id}/steps \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "order": 123
}'
import requests

url = "https://app-api.walead.ai/api/v1/campaigns/{id}/steps"

payload = { "order": 123 }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({order: 123})
};

fetch('https://app-api.walead.ai/api/v1/campaigns/{id}/steps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app-api.walead.ai/api/v1/campaigns/{id}/steps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://app-api.walead.ai/api/v1/campaigns/{id}/steps"

payload := strings.NewReader("{\n \"order\": 123\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app-api.walead.ai/api/v1/campaigns/{id}/steps")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order\": 123\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app-api.walead.ai/api/v1/campaigns/{id}/steps")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "<string>",
  "steps": [
    {
      "id": "<string>",
      "order": 123,
      "delay": 123,
      "stopOnReply": true,
      "genericBody": "<string>",
      "variants": [
        {
          "id": "<string>",
          "body": "<string>",
          "order": 123,
          "isDisabled": true,
          "icpDefinitionRaw": "<string>",
          "stepId": "<string>",
          "aiTools": [
            {
              "name": "<string>",
              "key": "<string>"
            }
          ]
        }
      ]
    }
  ]
}
{
"statusCode": 123,
"message": "<string>"
}
{
"statusCode": 123,
"message": "<string>"
}

Overview

Adds a new step to a campaign’s sequence at a specified position. This automatically reorders existing steps and updates leads already in the campaign to account for the new step.

Step Types

Sends a LinkedIn connection request to the lead. This is typically the first step in a campaign.
Sends a message to the lead. Can be sent to connections or used for InMail. Supports message variants for A/B testing.
Visits the lead’s LinkedIn profile to increase visibility.
Sends a qualifying message to determine if the lead is a good fit. Supports AI-powered analysis of responses.

Request Body

{
  "type": "message",
  "order": 2
}
The order field determines where in the sequence the step will be inserted (0-based index).

Automatic Handling

When you add a step:
  • Existing steps at or after the specified order are shifted down
  • Leads already in the campaign have their progress adjusted
  • Completed campaigns are reset to “paused” status if new steps are added
  • Message and screener steps automatically get a default variant created

Response

Returns the updated complete array of steps with their IDs, allowing you to immediately reference the new step for adding variants or further configuration.

Authorizations

x-api-key
string
header
required

API key for authentication. Generate from your WaLead dashboard.

Path Parameters

id
string
required

Campaign ID

Body

application/json

Step details

type
enum<string>
required

Type of step to add

Available options:
invitation,
message,
visit_profile,
screener
order
integer
required

Position in the sequence (0-based)

Response

Step added successfully

success
boolean
message
string
steps
object[]