CampaignsPause or resume an A/Z variant

Pause or resume an A/Z variant

Pause or resume one A/Z variant of a campaign email step (same behavior as switching a variant off or on in the dashboard sequence builder). Works for variants in the main sequence and in subsequences. Stats are kept either way.

  • pause: the variant stops being sent (status: disabled, enabled: false).
  • resume: the variant is sent again (status: active, enabled: true).

Asking for the state the variant is already in succeeds without changing anything. A step must keep at least one active variant, and a variant auto-paused by A/Z optimization cannot be resumed while optimization is on.

curl -X PATCH "https://api.sendkit.ai/v1/campaigns/example_string/variants/example_string" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -d '{
  "action": "pause"
}'
{
  "success": true,
  "data": {
    "campaignId": "665a1b2c3d4e5f6a7b8c9d0e",
    "variantId": "665a1b2c3d4e5f6a7b8c9d11",
    "label": "B",
    "status": "disabled",
    "enabled": false
  }
}
PATCH
/v1/campaigns/{campaignId}/variants/{variantId}
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
path
variantIdstring
Required

The variant's _id, from sequence[].variants[] or subsequences[].sequence[].variants[] in the campaign response

Content-Typestring
Required

The media type of the request body

Options: application/json
actionstring
Required
Options: pause, resume
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

Path Parameters

variantIdstring
Required

The variant's _id, from sequence[].variants[] or subsequences[].sequence[].variants[] in the campaign response

Body

application/json
actionstring
Required
Allowed values:pauseresume

Responses

successboolean
dataobject