Update Variant
curl --request PUT \
--url https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"body": "<string>",
"isDisabled": true,
"icpDefinitionRaw": "<string>"
}
'import requests
url = "https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId}"
payload = {
"body": "<string>",
"isDisabled": True,
"icpDefinitionRaw": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
isDisabled: true,
icpDefinitionRaw: '<string>'
})
};
fetch('https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId}', 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/{stepId}/variants/{variantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'isDisabled' => true,
'icpDefinitionRaw' => '<string>'
]),
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/{stepId}/variants/{variantId}"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"isDisabled\": true,\n \"icpDefinitionRaw\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"isDisabled\": true,\n \"icpDefinitionRaw\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"isDisabled\": true,\n \"icpDefinitionRaw\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<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>"
}{
"statusCode": 123,
"message": "<string>"
}Sequences
Update Variant
Updates a message variant’s content, enabled status, or ICP definition
PUT
/
v1
/
campaigns
/
{id}
/
steps
/
{stepId}
/
variants
/
{variantId}
Update Variant
curl --request PUT \
--url https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"body": "<string>",
"isDisabled": true,
"icpDefinitionRaw": "<string>"
}
'import requests
url = "https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId}"
payload = {
"body": "<string>",
"isDisabled": True,
"icpDefinitionRaw": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
isDisabled: true,
icpDefinitionRaw: '<string>'
})
};
fetch('https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId}', 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/{stepId}/variants/{variantId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'isDisabled' => true,
'icpDefinitionRaw' => '<string>'
]),
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/{stepId}/variants/{variantId}"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"isDisabled\": true,\n \"icpDefinitionRaw\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"isDisabled\": true,\n \"icpDefinitionRaw\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app-api.walead.ai/api/v1/campaigns/{id}/steps/{stepId}/variants/{variantId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"isDisabled\": true,\n \"icpDefinitionRaw\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<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>"
}{
"statusCode": 123,
"message": "<string>"
}Overview
Updates a message variant’s content, enabled status, or ICP targeting configuration. This allows you to refine your messaging and A/B test different approaches.Updatable Fields
body
The message template content. Supports WaLead variables and can be up to 8000 characters. Example:{
"body": "Hi {{firstName}},\n\nI noticed you're working on {{companyName}}'s growth..."
}
isDisabled
Whether this variant should be used in the rotation. Disabled variants are skipped when assigning messages to leads. Example:{
"isDisabled": true
}
You cannot disable the last enabled variant in a step. At least one variant must remain active.
icpDefinitionRaw
ICP (Ideal Customer Profile) definition that determines which leads receive this variant. Allows for sophisticated targeting based on lead attributes. Example:{
"icpDefinitionRaw": "C-level executives at companies with 50-200 employees in the SaaS industry"
}
Template Variables
The message body supports these variable types: Core Variables (from the lead profile):{{firstName}},{{lastName}},{{name}}{{companyName}},{{headline}},{{website}}{{email}},{{phone}}
- Any custom fields you’ve added to your leads
- Example:
{{industry}},{{location}},{{painPoint}}
Character Limit
Thebody field has a maximum length of 8000 characters to ensure deliverability and comply with LinkedIn’s message limits.
A/B Testing Strategy
When updating variants for A/B testing:
- Let each variant run for at least 100 leads before analyzing results
- Only change one element at a time (message hook, CTA, length, etc.)
- Use the campaign analytics to compare variant performance
Response
Returns the updated array of all variants for the step, allowing you to see the changes in context.Use Cases
- Refine message copy based on response rates
- Temporarily disable underperforming variants
- Apply different messages to different ICP segments
- Update personalization variables as you gather more lead data
Authorizations
API key for authentication. Generate from your WaLead dashboard.
Path Parameters
Campaign ID
Step ID
Variant ID
Body
application/json
Variant update data