Create campaign
plunk_create_campaignCreate a draft email campaign for a list, segment, or filtered audience and return its ID; sending is a separate confirmed step.
Instructions
Purpose: Create a campaign as a draft. It is never sent by this call.
Not for: A one-off message to specific people — that is plunk_send_transactional. A campaign targets an audience.
Returns: The created draft including its id.
Use when: Composing a newsletter or announcement for a list, segment or filtered audience.
Note: audienceType ALL reaches every subscribed contact; SEGMENT needs segmentId; FILTERED takes an inline audienceCondition. Sending is a separate, confirmed step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | HTML body | |
| from | Yes | Sender email — must be on a verified domain. | |
| name | Yes | ||
| type | No | ||
| replyTo | No | ||
| subject | Yes | ||
| fromName | No | ||
| segmentId | No | Required when audienceType is SEGMENT. | |
| description | No | ||
| audienceType | Yes | ALL = whole subscribed list, SEGMENT = a segment, FILTERED = ad-hoc filter. | |
| audienceCondition | No | Required when audienceType is FILTERED. |