PUT
/
campaign
/
{campaignId}
Edit Campaign
curl --request PUT \
  --url https://api.sendx.io/api/v1/rest/campaign/{campaignId} \
  --header 'Content-Type: application/json' \
  --header 'X-Team-ApiKey: <api-key>' \
  --data '{
  "name": "New Year Promotion",
  "htmlCode": "<html><body><h1>Happy New Year!</h1></body></html>",
  "subject": "New Year Offer",
  "sender": "sender_123",
  "previewText": "Exclusive New Year promotions inside",
  "scheduleType": 1,
  "scheduleCondition": "2025-01-21",
  "timeCondition": "10:00 AM",
  "timezone": "America/New_York",
  "preferredTimezone": "America/New_York",
  "preferredTimeCondition": "10:00 AM",
  "sendInContactsTimezone": true,
  "smartSend": true,
  "includedSegments": [
    "segment_1",
    "segment_2"
  ],
  "includedLists": [
    "list_1",
    "list_2"
  ],
  "includedTags": [
    "tag_1",
    "tag_2"
  ],
  "excludedSegments": [
    "segment_3"
  ],
  "excludedLists": [
    "list_3"
  ],
  "excludedTags": [
    "tag_3"
  ]
}'
{
  "id": "campaign123xyz",
  "name": "New Year Promotion",
  "trackReply": false,
  "subject": "New Year Promotion",
  "status": 1,
  "scheduleType": 0,
  "scheduleCondition": "2024-12-30",
  "timeCondition": "9:00 AM",
  "timezone": "America/New_York",
  "preferredTimeCondition": "Send during work hours",
  "preferredTimezone": "America/Los_Angeles",
  "strategy": "Batch sending",
  "sendInContactsTimezone": true,
  "smartSend": false,
  "isArchived": false,
  "sender": "marketing@company.com",
  "campaignScreenshotUrl": "https://example.com/screenshot.png",
  "includedSegments": [
    "VIP Customers",
    "New Subscribers"
  ],
  "includedLists": [
    "List 1",
    "List 2"
  ],
  "includedTags": [
    "Tag 1",
    "Tag 2"
  ],
  "excludedSegments": [
    "Unsubscribed Users",
    "Bounced Emails"
  ],
  "excludedLists": [
    "List 3",
    "List 4"
  ],
  "excludedTags": [
    "Tag 3",
    "Tag 4"
  ]
}

Authorizations

X-Team-ApiKey
string
header
required

Path Parameters

campaignId
string
required

The ID of the campaign to edit

Body

application/json

Response

200
application/json

Campaign edited successfully

The response is of type object.