Skip to main content
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>"
}
'
{
  "success": true,
  "message": "<string>",
  "variants": [
    {
      "id": "<string>",
      "body": "<string>",
      "order": 123,
      "isDisabled": true,
      "icpDefinitionRaw": "<string>",
      "stepId": "<string>",
      "aiTools": [
        {
          "name": "<string>",
          "key": "<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}}
Custom Variables (defined per lead):
  • Any custom fields you’ve added to your leads
  • Example: {{industry}}, {{location}}, {{painPoint}}

Character Limit

The body 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:
  1. Let each variant run for at least 100 leads before analyzing results
  2. Only change one element at a time (message hook, CTA, length, etc.)
  3. 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

x-api-key
string
header
required

API key for authentication. Generate from your WaLead dashboard.

Path Parameters

id
string
required

Campaign ID

stepId
string
required

Step ID

variantId
string
required

Variant ID

Body

application/json

Variant update data

body
string

Message template body

Maximum string length: 8000
isDisabled
boolean

Whether this variant is disabled

icpDefinitionRaw
string

ICP (Ideal Customer Profile) definition for targeting

Response

Variant updated successfully

success
boolean
message
string
variants
object[]