Change a campaign draft
updateCampaignChange a campaign that has not gone out (a draft or a scheduled one): its name, subject, the second subject it tests (null stops the test), the preview line, the audience, or its body. blocks replaces the body with exactly those blocks: readCampaign gives them as saved, so change the ones asked and send them all back. A new brief, or new productIds, writes the body again from the brief instead, as draftCampaign does; every other field changes only itself. Takes the campaign's broadcastId (readCampaigns lists them). It replaces what was there; sendTestCampaign shows the result in an inbox.
Only for a workspace with subscribed email contacts.
A change inside Kooga: it runs at once, as the person.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | A new internal name | |
| brief | No | A new goal and angle: the body is written again from it. Never invent discounts, prices, stock or urgency | |
| blocks | No | The body, top to bottom, exactly as it should read. No footer: the sender line and the unsubscribe link are added under every email. readCampaign shows a body as it is saved | |
| subject | No | Merge tags are filled per reader: {{first_name}} or {{first_name|fallback}}, with first_name, last_name, name, city, country | |
| subjectB | No | A new second subject to test; null stops the test | |
| preheader | No | The line shown after the subject in the inbox | |
| productIds | No | Products to feature instead, by the store's own id; the body is written again around them | |
| segmentKey | No | Which audience: 'all', a segment's key, or a segment's id, exactly as readSegments gives them | |
| abTestHours | No | How long the test runs | |
| broadcastId | Yes | The campaign, by its id in Kooga | |
| workspaceId | No | The workspace, as listWorkspaces gives it (its id or slug). Leave it out when this connection reaches one workspace. | |
| campaignName | No | What it is called now, so the change is recorded by name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| changed | Yes | The fields that changed | |
| subject | Yes | ||
| subjectB | Yes | ||
| broadcastId | Yes | ||
| productsLeftOut | Yes | Chosen products that are not in the new body: unknown here, out of stock, without a page or not on sale |