Create a campaign draft
create_campaignCreate a campaign as a draft: which active flow it sends, from which number or mailbox, and to whom:
leads by id, everyone with some tags, a pasted list, or the people of an earlier campaign
(copy_from_campaign_id with copy_scope). Nothing is sent. An email campaign needs a subject. A
goal is any card outcome of the flow except failed, with an optional target; without one it uses
the flow's booking, if it books.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"flow_id": "<flow_id>",
"channel_id": "<channel_id>"
},
"name": "create_campaign"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | `card_id` and `outcome` from `read_flow`, optional `target`. | |
| name | Yes | Shown on the Campaigns page. | |
| flow_id | Yes | An active flow with a campaign trigger. | |
| subject | No | Email only: the first email's subject. | |
| tag_ids | No | Up to 10. | |
| lead_ids | No | From `list_leads`. | |
| tag_match | No | With several tags: leads with `any` (default) or `all` of them. | |
| channel_id | Yes | The number or mailbox it sends from, from `list_channels`. | |
| copy_scope | No | Who of that campaign: everyone, those not reached, or those who never replied. | |
| pasted_recipients | No | One recipient per line. | |
| copy_from_campaign_id | No | Run a finished campaign again. Not with lead_ids or pasted_recipients. |