Create an email campaign draft
Create an email campaign draft from a template, with subject and recipients.
MCP tool privy_write → create_email_campaign
write
Does what Campaigns > Send email does up to the Review step. The design is the template as saved, so a Saved Template you update each week carries the content. From name, From Email and Reply To use your Settings defaults. The draft sends nothing, reaches no one and can be deleted from the Campaigns menu, so it does not wait for your OK.
Parameters
| Name | Type | Description |
|---|---|---|
| name string required | string | Campaign name |
| template string required | string | Name of a Privy Template or Saved Template as shown in the template picker |
| subject_line string required | string | Subject line |
| preview_text string | string | Preview text |
| segment_ids array required | array | Segments to send to (ids from list_segments) |
| exclude_segment_ids array | array | Segments to leave out |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "privy_write",
"arguments": {
"operation": "create_email_campaign",
"arguments": {
"name": "Weekly picks, 27 Oct",
"template": "Weekly picks",
"subject_line": "Five picks for your weekend",
"preview_text": "New arrivals and one restock",
"segment_ids": [
"seg_2b11"
]
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"campaign_id": "cmp_6c15",
"title": "Weekly picks, 27 Oct",
"status": "draft",
"template": "Weekly picks",
"subject_line": "Five picks for your weekend",
"audience": {
"included_segments": [
"Engaged Contacts"
],
"excluded_segments": []
}
},
"isError": false
}