set_campaign_content
Set the full HTML body of a draft campaign, replacing existing content. Use after creating the campaign to add the email body before sending.
Instructions
Set the full HTML body of a campaign draft, replacing any existing content entirely.
Use after create_campaign to add the email body before sending. The campaign must be in 'save' (draft) status. Overwrites all previous content. Typical workflow: create_campaign -> set_campaign_content -> send_test_email -> send_campaign. Use update_campaign to change settings (subject, sender) instead of content.
Authenticated via API key. Subject to Mailchimp API rate limits (max 10 concurrent requests). Respects read-only and dry-run modes.
Args: campaign_id: The campaign ID (e.g. 'abc123def4'). Obtain from create_campaign or list_campaigns(status='save'). html: Complete HTML content for the email body. Must be valid HTML. Use inline CSS for email client compatibility. Mailchimp merge tags (e.g. |FNAME|, |UNSUB|) are supported. Large HTML payloads may time out; keep under 200KB.
Returns: JSON with fields: status ("content_set"), campaign_id. Returns error if campaign is not in draft status.
Example: set_campaign_content(campaign_id="abc123", html="Hello |FNAME|!") -> {"status": "content_set", "campaign_id": "abc123"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | ||
| html | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |