create_campaign
Draft an email campaign with AI-generated or custom content. Configure subject, tracking, segment, and labels for targeted marketing.
Instructions
Create a new campaign (as draft)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyId | No | Company ID to create the campaign in. If not provided, uses the currently selected company. | |
| name | Yes | Campaign name | |
| subject | No | Email subject line. Optional when `prompt` is provided because the generated subject will be used. | |
| trackingCode | No | Optional campaign tracking code for UTM templates. Use only when explicitly requested. | |
| html | No | Email HTML content. Mutually exclusive with `blocks`. | |
| blocks | No | Sequenzy email blocks. Use `styles` for per-block background, background opacity, text color, padding, border radius, border width, and border color. Top-level style aliases such as `backgroundColor`, `backgroundOpacity`, `borderColor`, `borderWidth`, and `borderRadius` are also accepted and saved under `styles`. Use this for editor-compatible content, including conditional and repeat blocks. Repeat blocks use { type: 'repeat', source: 'items', itemAlias: 'item', children: [...] }. | |
| prompt | No | Generate campaign blocks from a prompt. Mutually exclusive with `html`, `blocks`, and `templateId`. | |
| style | No | Prompt generation style: minimal, branded, promotional. Only used with `prompt`. | |
| tone | No | Prompt generation tone: professional, casual, friendly. Only used with `prompt`. | |
| templateId | No | Use a template instead of html | |
| segmentId | No | Target segment ID | |
| campaignData | No | Optional campaign-scoped JSON data for repeat blocks and personalization. | |
| computedLists | No | Optional computed list definitions derived from campaignData at send time. | |
| labels | No | Optional label names to assign. Missing labels are created automatically. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | Whether the Sequenzy operation succeeded. | |
| message | No | Human-readable status, confirmation, or next-step message. | |
| note | No | Additional context about the result. | |
| items | No | Fallback array wrapper used only when a tool returns a bare array. | |
| value | No | Fallback object wrapper used only when a tool returns a non-object value. | |
| campaign | No | The campaign record returned by Sequenzy. | |
| appUrls | No | Dashboard URLs for relevant Sequenzy resources. | |
| url | No | Primary dashboard URL for this result. | |
| settingsUrl | No | Company settings URL when available. |