Skip to main content

Update step version

Use this request to update a step version. You can change the subject line, message, signature settings, and open tracking settings. This endpoint supports partial updates.

Only campaigns with a status of DRAFT or EDITED can be updated. To change the campaign status to EDITED use the /make_editable endpoint.

Request

Endpoint

PATCH https://api.woodpecker.co/rest/v2/campaigns/{campaign_id}/steps/{step_id}/versions/{version_id}

Headers

x-api-key: {YOUR_API_KEY}
Content-type: application/json

For details on how to authenticate your requests, please see the authentication guide.

Body

The request body is a simplified version of the campaign body object. You can update each parameter individually without impacting others, as the API supports partial updates. You can fetch the step_id and version_id using the GET /campaigns structure endpoint.

{
"subject": "New subject line",
"message": "Engaging message",
"signature": "SENDER",
"track_opens": true
}

Body schema

The versions object defines the email content, open tracking, and signature settings. Each of these can be configured individually, as the endpoint supports partial updates.

FieldTypeDescription
subjectstring/nullEmail subject line. This field is required if the version is part of the first EMAIL step in the sequence. If the step is not the first EMAIL step and the subject field is null, the message will be sent as a follow-up in the same thread. Supports snippets like {{FIRST_NAME}} and spintax
messagestringEmail body content in HTML format. Supports snippets like {{FIRST_NAME}} and spintax
signaturestringWhether to use the sender's email account signature. The available options are: SENDER or NO_SIGNATURE
track_opensbooleanWhether to track email opens for this email version

Request sample

Update step version

curl --request PATCH \
--url "https://api.woodpecker.co/rest/v2/campaigns/{campaign_id}/steps/{step_id}/versions/{version_id}" \
--header "x-api-key: {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data '{
"message": "Engaging message"
}'

Response

Response examples

The step version has been updated.

{
"id": "2a72ca821042bb4baf6f815b8427772a1a13969164c6bcfcab9c0c085994edf9",
"version": "A",
"subject": "New subject line",
"message": "Engaging message",
"signature": "SENDER",
"track_opens": false
}

Body schema

FieldTypeDescription
idstringUnique ID of the version
versionstringIndicator of A/B version of the updated version
subjectstring/nullCurrent subject line
messagestringCurrent message
signaturestringSignature setting. The available options are: SENDER or NO_SIGNATURE
track_opensbooleanWhether to track email opens for this email version