@cakemail-org/cakemail-cli 1.5.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +12 -0
- package/.env.example +40 -0
- package/.env.test.example +45 -0
- package/CHANGELOG.md +1031 -0
- package/README.md +319 -15
- package/audit-formats.js +128 -0
- package/cakemail.rb +20 -0
- package/dist/cli.js +27 -10
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +16 -6
- package/dist/client.js.map +1 -1
- package/dist/commands/account.js +1 -1
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/attributes.js +1 -1
- package/dist/commands/attributes.js.map +1 -1
- package/dist/commands/campaigns.d.ts.map +1 -1
- package/dist/commands/campaigns.js +103 -8
- package/dist/commands/campaigns.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +63 -4
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/contacts.d.ts.map +1 -1
- package/dist/commands/contacts.js +91 -12
- package/dist/commands/contacts.js.map +1 -1
- package/dist/commands/emails.js +1 -1
- package/dist/commands/emails.js.map +1 -1
- package/dist/commands/interests.d.ts +5 -0
- package/dist/commands/interests.d.ts.map +1 -0
- package/dist/commands/interests.js +172 -0
- package/dist/commands/interests.js.map +1 -0
- package/dist/commands/lists.d.ts.map +1 -1
- package/dist/commands/lists.js +6 -8
- package/dist/commands/lists.js.map +1 -1
- package/dist/commands/logs.d.ts +5 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +237 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/reports.js +1 -1
- package/dist/commands/reports.js.map +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/segments.js.map +1 -1
- package/dist/commands/senders.d.ts.map +1 -1
- package/dist/commands/senders.js +11 -8
- package/dist/commands/senders.js.map +1 -1
- package/dist/commands/suppressed.js +1 -1
- package/dist/commands/suppressed.js.map +1 -1
- package/dist/commands/tags.d.ts +5 -0
- package/dist/commands/tags.d.ts.map +1 -0
- package/dist/commands/tags.js +124 -0
- package/dist/commands/tags.js.map +1 -0
- package/dist/commands/templates.js +1 -1
- package/dist/commands/templates.js.map +1 -1
- package/dist/commands/transactional-templates.d.ts +5 -0
- package/dist/commands/transactional-templates.d.ts.map +1 -0
- package/dist/commands/transactional-templates.js +354 -0
- package/dist/commands/transactional-templates.js.map +1 -0
- package/dist/commands/webhooks.js +1 -1
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/utils/auth.d.ts +8 -1
- package/dist/utils/auth.d.ts.map +1 -1
- package/dist/utils/auth.js +39 -11
- package/dist/utils/auth.js.map +1 -1
- package/dist/utils/config-file.d.ts +7 -0
- package/dist/utils/config-file.d.ts.map +1 -1
- package/dist/utils/config-file.js +15 -0
- package/dist/utils/config-file.js.map +1 -1
- package/dist/utils/config.d.ts +2 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +12 -4
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/errors.js +1 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/list-defaults.d.ts +33 -0
- package/dist/utils/list-defaults.d.ts.map +1 -0
- package/dist/utils/list-defaults.js +52 -0
- package/dist/utils/list-defaults.js.map +1 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +36 -13
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/progress.d.ts.map +1 -1
- package/dist/utils/progress.js +32 -4
- package/dist/utils/progress.js.map +1 -1
- package/dist/utils/spinner.d.ts +17 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +43 -0
- package/dist/utils/spinner.js.map +1 -0
- package/docs/DOCUMENTATION-STANDARD.md +1068 -0
- package/docs/README.md +161 -0
- package/docs/developer/ARCHITECTURE.md +516 -0
- package/docs/developer/AUTH.md +204 -0
- package/docs/developer/CONTRIBUTING.md +227 -0
- package/docs/developer/DOCUMENTATION_SUMMARY.md +346 -0
- package/docs/developer/PROJECT_INDEX.md +365 -0
- package/docs/planning/API_COVERAGE.md +1045 -0
- package/docs/planning/BACKLOG.md +1159 -0
- package/docs/planning/PROFILE_SYSTEM_TASKS.md +287 -0
- package/docs/planning/UX_IMPLEMENTATION_PLAN.md +691 -0
- package/docs/planning/archive/RELEASE_CHECKLIST_v1.3.0.md +332 -0
- package/docs/planning/archive/RELEASE_v1.3.0.md +428 -0
- package/docs/planning/archive/cakemail-cli-ux-improvements.md +438 -0
- package/docs/planning/cakemail-profile-system-plan.md +1121 -0
- package/docs/testing/AI_USER_SIMULATION_DESIGN.md +1342 -0
- package/docs/testing/KENOGAMI_BIDIRECTIONAL_FLOW.md +1517 -0
- package/docs/testing/KENOGAMI_TRUTH_RECONCILIATION_SYSTEM.md +1369 -0
- package/docs/user-manual/.obsidian/app.json +1 -0
- package/docs/user-manual/.obsidian/appearance.json +1 -0
- package/docs/user-manual/.obsidian/core-plugins.json +33 -0
- package/docs/user-manual/.obsidian/workspace.json +167 -0
- package/docs/user-manual/01-getting-started/01-installation.md +214 -0
- package/docs/user-manual/01-getting-started/02-quick-start.md +432 -0
- package/docs/user-manual/01-getting-started/03-authentication.md +448 -0
- package/docs/user-manual/01-getting-started/04-configuration.md +430 -0
- package/docs/user-manual/01-getting-started/05-output-formats.md +447 -0
- package/docs/user-manual/02-core-concepts/01-accounts.md +514 -0
- package/docs/user-manual/02-core-concepts/02-profile-system.md +771 -0
- package/docs/user-manual/02-core-concepts/03-smart-defaults.md +485 -0
- package/docs/user-manual/02-core-concepts/04-authentication-methods.md +435 -0
- package/docs/user-manual/02-core-concepts/05-pagination-filtering.md +600 -0
- package/docs/user-manual/02-core-concepts/06-error-handling.md +718 -0
- package/docs/user-manual/02-core-concepts/07-api-coverage.md +483 -0
- package/docs/user-manual/03-email-operations/01-senders.md +490 -0
- package/docs/user-manual/03-email-operations/02-templates.md +444 -0
- package/docs/user-manual/03-email-operations/03-transactional-emails.md +706 -0
- package/docs/user-manual/03-email-operations/04-email-tracking.md +407 -0
- package/docs/user-manual/04-campaign-management/01-campaigns-basics.md +394 -0
- package/docs/user-manual/04-campaign-management/02-campaign-scheduling.md +630 -0
- package/docs/user-manual/04-campaign-management/03-campaign-testing.md +997 -0
- package/docs/user-manual/04-campaign-management/04-campaign-lifecycle.md +709 -0
- package/docs/user-manual/04-campaign-management/05-campaign-links.md +934 -0
- package/docs/user-manual/05-contact-management/01-lists.md +836 -0
- package/docs/user-manual/05-contact-management/02-contacts.md +1035 -0
- package/docs/user-manual/05-contact-management/03-custom-attributes.md +788 -0
- package/docs/user-manual/05-contact-management/04-segments.md +1028 -0
- package/docs/user-manual/05-contact-management/05-contact-import-export.md +1031 -0
- package/docs/user-manual/06-analytics-reporting/01-campaign-analytics.md +867 -0
- package/docs/user-manual/06-analytics-reporting/02-account-reports.md +227 -0
- package/docs/user-manual/07-integrations/01-webhooks-integration.md +259 -0
- package/docs/user-manual/07-integrations/02-automation.md +326 -0
- package/docs/user-manual/08-advanced-usage/01-scripting-patterns.md +672 -0
- package/docs/user-manual/08-advanced-usage/02-bulk-operations.md +932 -0
- package/docs/user-manual/08-advanced-usage/03-ci-cd-integration.md +892 -0
- package/docs/user-manual/08-advanced-usage/04-performance-optimization.md +766 -0
- package/docs/user-manual/09-command-reference/01-config.md +776 -0
- package/docs/user-manual/09-command-reference/02-account.md +652 -0
- package/docs/user-manual/09-command-reference/03-lists.md +958 -0
- package/docs/user-manual/09-command-reference/04-contacts.md +1408 -0
- package/docs/user-manual/09-command-reference/05-attributes.md +617 -0
- package/docs/user-manual/09-command-reference/06-segments.md +894 -0
- package/docs/user-manual/09-command-reference/07-senders.md +803 -0
- package/docs/user-manual/09-command-reference/08-templates.md +818 -0
- package/docs/user-manual/09-command-reference/09-campaigns.md +1250 -0
- package/docs/user-manual/09-command-reference/10-emails.md +807 -0
- package/docs/user-manual/09-command-reference/11-reports.md +1135 -0
- package/docs/user-manual/09-command-reference/12-webhooks.md +773 -0
- package/docs/user-manual/09-command-reference/13-suppressed.md +797 -0
- package/docs/user-manual/09-command-reference/14-interests.md +630 -0
- package/docs/user-manual/09-command-reference/15-tags.md +584 -0
- package/docs/user-manual/09-command-reference/16-logs.md +656 -0
- package/docs/user-manual/09-command-reference/17-transactional-templates.md +850 -0
- package/docs/user-manual/10-troubleshooting/01-common-errors.md +457 -0
- package/docs/user-manual/10-troubleshooting/02-authentication-issues.md +558 -0
- package/docs/user-manual/10-troubleshooting/03-connection-problems.md +634 -0
- package/docs/user-manual/10-troubleshooting/04-debugging.md +725 -0
- package/docs/user-manual/11-appendix/04-faq.md +484 -0
- package/docs/user-manual/11-appendix/05-glossary.md +250 -0
- package/docs/user-manual/README.md +0 -0
- package/package.json +13 -47
- package/src/cli.ts +125 -0
- package/src/client.ts +16 -0
- package/src/commands/account.ts +267 -0
- package/src/commands/accounts.ts +78 -0
- package/src/commands/actions.ts +249 -0
- package/src/commands/attributes.ts +139 -0
- package/src/commands/campaign-blueprints.ts +106 -0
- package/src/commands/campaigns.ts +469 -0
- package/src/commands/config.ts +77 -0
- package/src/commands/contacts.ts +612 -0
- package/src/commands/custom-attributes.ts +127 -0
- package/src/commands/dkims.ts +117 -0
- package/src/commands/domains.ts +82 -0
- package/src/commands/email-apis.ts +569 -0
- package/src/commands/emails.ts +197 -0
- package/src/commands/forms.ts +283 -0
- package/src/commands/interests.ts +155 -0
- package/src/commands/links.ts +38 -0
- package/src/commands/lists.ts +406 -0
- package/src/commands/logos.ts +71 -0
- package/src/commands/logs.ts +386 -0
- package/src/commands/reports.ts +306 -0
- package/src/commands/segments.ts +158 -0
- package/src/commands/senders.ts +204 -0
- package/src/commands/sub-accounts.ts +271 -0
- package/src/commands/suppressed-emails.ts +234 -0
- package/src/commands/suppressed.ts +198 -0
- package/src/commands/system-emails.ts +85 -0
- package/src/commands/tags.ts +146 -0
- package/src/commands/tasks.ts +116 -0
- package/src/commands/templates.ts +189 -0
- package/src/commands/tokens.ts +83 -0
- package/src/commands/transactional-emails.ts +374 -0
- package/src/commands/transactional-templates.ts +385 -0
- package/src/commands/users.ts +506 -0
- package/src/commands/webhooks.ts +172 -0
- package/src/commands/workflow-blueprints.ts +123 -0
- package/src/commands/workflows.ts +265 -0
- package/src/types/profile.ts +93 -0
- package/src/utils/auth.ts +272 -0
- package/src/utils/config-file.ts +96 -0
- package/src/utils/config.ts +134 -0
- package/src/utils/confirm.ts +32 -0
- package/src/utils/defaults.ts +99 -0
- package/src/utils/errors.ts +116 -0
- package/src/utils/interactive.ts +91 -0
- package/src/utils/list-defaults.ts +74 -0
- package/src/utils/output.ts +190 -0
- package/src/utils/progress.ts +320 -0
- package/src/utils/spinner.ts +22 -0
- package/tests/IMPLEMENTATION_STATUS.md +258 -0
- package/tests/PTY_SETUP.md +118 -0
- package/tests/PTY_TESTING_GUIDE.md +507 -0
- package/tests/README.md +244 -0
- package/tests/fixtures/api-responses/campaigns.json +34 -0
- package/tests/fixtures/test-config.json +13 -0
- package/tests/helpers/cli-runner.ts +128 -0
- package/tests/helpers/mock-server.ts +301 -0
- package/tests/helpers/pty-runner.ts +181 -0
- package/tests/integration/campaigns-real-api.test.ts +196 -0
- package/tests/integration/setup-integration.ts +50 -0
- package/tests/pty/campaigns.test.ts +241 -0
- package/tests/setup.ts +34 -0
- package/tsconfig.json +15 -0
- package/vitest.config.ts +28 -0
|
@@ -0,0 +1,1250 @@
|
|
|
1
|
+
# Campaign Commands
|
|
2
|
+
|
|
3
|
+
Manage email campaigns for your Cakemail account.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Campaigns are email broadcasts sent to your contact lists. Use these commands to create, manage, schedule, and track email campaigns. Campaigns support templates, personalization, scheduling, and comprehensive lifecycle management.
|
|
8
|
+
|
|
9
|
+
**Available Commands:**
|
|
10
|
+
- [`campaigns list`](#campaigns-list) - List all campaigns
|
|
11
|
+
- [`campaigns get`](#campaigns-get) - Get campaign details
|
|
12
|
+
- [`campaigns create`](#campaigns-create) - Create a new campaign
|
|
13
|
+
- [`campaigns update`](#campaigns-update) - Update campaign properties
|
|
14
|
+
- [`campaigns delete`](#campaigns-delete) - Delete a campaign
|
|
15
|
+
- [`campaigns schedule`](#campaigns-schedule) - Schedule a campaign for sending
|
|
16
|
+
- [`campaigns reschedule`](#campaigns-reschedule) - Change scheduled send time
|
|
17
|
+
- [`campaigns unschedule`](#campaigns-unschedule) - Remove scheduling
|
|
18
|
+
- [`campaigns test`](#campaigns-test) - Send test email
|
|
19
|
+
- [`campaigns cancel`](#campaigns-cancel) - Cancel a scheduled/sending campaign
|
|
20
|
+
- [`campaigns suspend`](#campaigns-suspend) - Suspend a sending campaign
|
|
21
|
+
- [`campaigns resume`](#campaigns-resume) - Resume a suspended campaign
|
|
22
|
+
- [`campaigns archive`](#campaigns-archive) - Archive a campaign
|
|
23
|
+
- [`campaigns unarchive`](#campaigns-unarchive) - Unarchive a campaign
|
|
24
|
+
- [`campaigns links`](#campaigns-links) - List tracked links in campaign
|
|
25
|
+
- [`campaigns render`](#campaigns-render) - Render campaign HTML preview
|
|
26
|
+
- [`campaigns revisions`](#campaigns-revisions) - List campaign revision history
|
|
27
|
+
- [`campaigns blueprints`](#campaigns-blueprints) - List campaign blueprints/templates
|
|
28
|
+
|
|
29
|
+
**Key Features:**
|
|
30
|
+
- Interactive campaign creation with auto-detection
|
|
31
|
+
- Profile-aware confirmations for destructive operations
|
|
32
|
+
- Complete lifecycle management (draft → scheduled → sending → sent)
|
|
33
|
+
- Template support for reusable designs
|
|
34
|
+
- Test emails before sending
|
|
35
|
+
- Link tracking and analytics
|
|
36
|
+
- Revision history tracking
|
|
37
|
+
|
|
38
|
+
**Campaign Statuses:**
|
|
39
|
+
- `draft` - Campaign created but not scheduled
|
|
40
|
+
- `scheduled` - Scheduled for future sending
|
|
41
|
+
- `sending` - Currently being sent
|
|
42
|
+
- `sent` - Successfully sent to all recipients
|
|
43
|
+
- `suspended` - Temporarily paused
|
|
44
|
+
- `canceled` - Canceled before completion
|
|
45
|
+
- `archived` - Archived for historical reference
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## campaigns list
|
|
50
|
+
|
|
51
|
+
List all campaigns in your account.
|
|
52
|
+
|
|
53
|
+
### Usage
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cakemail campaigns list [options]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Options
|
|
60
|
+
|
|
61
|
+
- `-s, --status <status>` - Filter by status (draft, scheduled, sending, sent, etc.)
|
|
62
|
+
- `-l, --limit <number>` - Limit number of results
|
|
63
|
+
- `-p, --page <number>` - Page number for pagination
|
|
64
|
+
- `--sort <sort>` - Sort order (e.g., `+name`, `-created_on`, `+scheduled_for`)
|
|
65
|
+
- `--filter <filter>` - Filter expression (e.g., `"status==sent;name==Newsletter"`)
|
|
66
|
+
|
|
67
|
+
### Examples
|
|
68
|
+
|
|
69
|
+
**List all campaigns:**
|
|
70
|
+
```bash
|
|
71
|
+
$ cakemail campaigns list
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Output (Table format - Balanced profile):**
|
|
75
|
+
```
|
|
76
|
+
┌────┬──────────────────────┬──────────┬─────────────────────┐
|
|
77
|
+
│ ID │ Name │ Status │ Scheduled For │
|
|
78
|
+
├────┼──────────────────────┼──────────┼─────────────────────┤
|
|
79
|
+
│ 789│ Weekly Newsletter │ 🟢 sent │ Oct 11, 2025 9:00am │
|
|
80
|
+
│ 788│ Product Update │ 🟡 draft │ - │
|
|
81
|
+
│ 787│ Flash Sale │ 🔵 scheduled│ Oct 15, 2025 2:00pm│
|
|
82
|
+
└────┴──────────────────────┴──────────┴─────────────────────┘
|
|
83
|
+
|
|
84
|
+
Showing 1-3 of 156 campaigns
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Filter by status:**
|
|
88
|
+
```bash
|
|
89
|
+
$ cakemail campaigns list --status sent
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Sort by scheduled date:**
|
|
93
|
+
```bash
|
|
94
|
+
$ cakemail campaigns list --sort +scheduled_for
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Filter with complex expression:**
|
|
98
|
+
```bash
|
|
99
|
+
$ cakemail campaigns list --filter "status==sent;name==Newsletter"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**JSON output (Developer profile):**
|
|
103
|
+
```bash
|
|
104
|
+
$ cakemail --profile developer campaigns list --limit 2
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Output:**
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"data": [
|
|
111
|
+
{
|
|
112
|
+
"id": 789,
|
|
113
|
+
"name": "Weekly Newsletter",
|
|
114
|
+
"status": "sent",
|
|
115
|
+
"list_id": 123,
|
|
116
|
+
"sender_id": 456,
|
|
117
|
+
"scheduled_for": "2025-10-11T09:00:00Z",
|
|
118
|
+
"sent_at": "2025-10-11T09:00:15Z",
|
|
119
|
+
"created_on": "2025-10-10T14:30:00Z"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"pagination": {
|
|
123
|
+
"page": 1,
|
|
124
|
+
"per_page": 2,
|
|
125
|
+
"total": 156
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Notes
|
|
131
|
+
|
|
132
|
+
- Default sort is by creation date (newest first)
|
|
133
|
+
- Status badges show visual indicators in table/compact formats
|
|
134
|
+
- Use pagination for large result sets
|
|
135
|
+
- Combine `--filter` and `--sort` for precise queries
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## campaigns get
|
|
140
|
+
|
|
141
|
+
Get detailed information about a specific campaign.
|
|
142
|
+
|
|
143
|
+
### Usage
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
cakemail campaigns get <id>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Arguments
|
|
150
|
+
|
|
151
|
+
- `<id>` - Campaign ID (required)
|
|
152
|
+
|
|
153
|
+
### Examples
|
|
154
|
+
|
|
155
|
+
**Get campaign details:**
|
|
156
|
+
```bash
|
|
157
|
+
$ cakemail campaigns get 789
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Output:**
|
|
161
|
+
```
|
|
162
|
+
Campaign: Weekly Newsletter (789)
|
|
163
|
+
|
|
164
|
+
Status: 🟢 sent
|
|
165
|
+
List: Newsletter Subscribers (123)
|
|
166
|
+
Sender: Marketing Team <marketing@company.com> (456)
|
|
167
|
+
|
|
168
|
+
Schedule:
|
|
169
|
+
Scheduled: Oct 11, 2025 at 9:00 AM
|
|
170
|
+
Sent: Oct 11, 2025 at 9:00 AM (15s after scheduled)
|
|
171
|
+
|
|
172
|
+
Statistics:
|
|
173
|
+
Recipients: 1,234
|
|
174
|
+
Delivered: 1,198 (97.1%)
|
|
175
|
+
Opens: 456 (38.1%)
|
|
176
|
+
Clicks: 89 (7.4%)
|
|
177
|
+
Bounces: 36 (2.9%)
|
|
178
|
+
|
|
179
|
+
Created: Oct 10, 2025 at 2:30 PM
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**JSON output:**
|
|
183
|
+
```bash
|
|
184
|
+
$ cakemail -f json campaigns get 789
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Output:**
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"id": 789,
|
|
191
|
+
"name": "Weekly Newsletter",
|
|
192
|
+
"status": "sent",
|
|
193
|
+
"subject": "Your Weekly Update",
|
|
194
|
+
"list_id": 123,
|
|
195
|
+
"sender_id": 456,
|
|
196
|
+
"template_id": 12,
|
|
197
|
+
"scheduled_for": "2025-10-11T09:00:00Z",
|
|
198
|
+
"sent_at": "2025-10-11T09:00:15Z",
|
|
199
|
+
"created_on": "2025-10-10T14:30:00Z",
|
|
200
|
+
"statistics": {
|
|
201
|
+
"recipients": 1234,
|
|
202
|
+
"delivered": 1198,
|
|
203
|
+
"opens": 456,
|
|
204
|
+
"clicks": 89,
|
|
205
|
+
"bounces": 36
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Notes
|
|
211
|
+
|
|
212
|
+
- Returns full campaign details including statistics
|
|
213
|
+
- Statistics only available after campaign is sent
|
|
214
|
+
- Use for verifying campaign configuration before sending
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## campaigns create
|
|
219
|
+
|
|
220
|
+
Create a new email campaign.
|
|
221
|
+
|
|
222
|
+
### Usage
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
cakemail campaigns create [options]
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Options
|
|
229
|
+
|
|
230
|
+
- `-n, --name <name>` - Campaign name (optional - prompts if not provided)
|
|
231
|
+
- `-l, --list-id <id>` - List ID (optional - auto-detects or prompts)
|
|
232
|
+
- `-s, --sender-id <id>` - Sender ID (optional - auto-detects or prompts)
|
|
233
|
+
- `-t, --template-id <id>` - Template ID (optional)
|
|
234
|
+
- `--subject <subject>` - Email subject line (optional)
|
|
235
|
+
|
|
236
|
+
### Examples
|
|
237
|
+
|
|
238
|
+
**Interactive creation (Marketer/Balanced profile):**
|
|
239
|
+
```bash
|
|
240
|
+
$ cakemail campaigns create
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Output:**
|
|
244
|
+
```
|
|
245
|
+
Campaign name: Weekly Newsletter
|
|
246
|
+
|
|
247
|
+
✓ Auto-detected list: 123 (Newsletter Subscribers)
|
|
248
|
+
|
|
249
|
+
Available Confirmed Senders:
|
|
250
|
+
|
|
251
|
+
? Select a sender:
|
|
252
|
+
❯ Marketing Team <marketing@company.com> (Confirmed)
|
|
253
|
+
Support <support@company.com> (Confirmed)
|
|
254
|
+
|
|
255
|
+
✓ Campaign created: 790
|
|
256
|
+
|
|
257
|
+
Campaign: Weekly Newsletter
|
|
258
|
+
ID: 790
|
|
259
|
+
Status: draft
|
|
260
|
+
List: Newsletter Subscribers (1,234 contacts)
|
|
261
|
+
Sender: Marketing Team
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Non-interactive creation:**
|
|
265
|
+
```bash
|
|
266
|
+
$ cakemail campaigns create \
|
|
267
|
+
--name "Product Launch" \
|
|
268
|
+
--list-id 123 \
|
|
269
|
+
--sender-id 456 \
|
|
270
|
+
--subject "Introducing Our New Product"
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**Output:**
|
|
274
|
+
```
|
|
275
|
+
✓ Campaign created: 791
|
|
276
|
+
|
|
277
|
+
Campaign: Product Launch
|
|
278
|
+
ID: 791
|
|
279
|
+
Status: draft
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**With template:**
|
|
283
|
+
```bash
|
|
284
|
+
$ cakemail campaigns create \
|
|
285
|
+
--name "Monthly Newsletter" \
|
|
286
|
+
--list-id 123 \
|
|
287
|
+
--sender-id 456 \
|
|
288
|
+
--template-id 12
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Developer profile (JSON):**
|
|
292
|
+
```bash
|
|
293
|
+
$ cakemail --profile developer campaigns create \
|
|
294
|
+
--name "Newsletter" \
|
|
295
|
+
--list-id 123 \
|
|
296
|
+
--sender-id 456
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**Output:**
|
|
300
|
+
```json
|
|
301
|
+
{
|
|
302
|
+
"id": 792,
|
|
303
|
+
"name": "Newsletter",
|
|
304
|
+
"status": "draft",
|
|
305
|
+
"list_id": 123,
|
|
306
|
+
"sender_id": 456,
|
|
307
|
+
"created_on": "2025-10-11T15:30:00Z"
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### Interactive Behavior
|
|
312
|
+
|
|
313
|
+
**Auto-Detection:**
|
|
314
|
+
- If you have only one list, it's auto-detected
|
|
315
|
+
- If you have only one confirmed sender, it's auto-detected
|
|
316
|
+
- Interactive prompts shown for multiple options (in TTY)
|
|
317
|
+
|
|
318
|
+
**Marketer Profile:**
|
|
319
|
+
- Always shows interactive prompts for name, list, sender
|
|
320
|
+
- Provides helpful selection menus with contact counts
|
|
321
|
+
|
|
322
|
+
**Developer Profile:**
|
|
323
|
+
- No prompts - requires all parameters
|
|
324
|
+
- Fast, scriptable creation
|
|
325
|
+
|
|
326
|
+
**Balanced Profile:**
|
|
327
|
+
- Auto-detects when possible
|
|
328
|
+
- Prompts in interactive terminal
|
|
329
|
+
- No prompts in scripts
|
|
330
|
+
|
|
331
|
+
### Notes
|
|
332
|
+
|
|
333
|
+
- Campaign created in `draft` status
|
|
334
|
+
- Must add content and schedule before sending
|
|
335
|
+
- List and sender are required
|
|
336
|
+
- Template is optional (can design in web UI)
|
|
337
|
+
- See [Smart Defaults](/en/cli/core-concepts/smart-defaults/) for auto-detection details
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## campaigns update
|
|
342
|
+
|
|
343
|
+
Update properties of an existing campaign.
|
|
344
|
+
|
|
345
|
+
### Usage
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
cakemail campaigns update <id> [options]
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Arguments
|
|
352
|
+
|
|
353
|
+
- `<id>` - Campaign ID (required)
|
|
354
|
+
|
|
355
|
+
### Options
|
|
356
|
+
|
|
357
|
+
- `-n, --name <name>` - New campaign name
|
|
358
|
+
- `-l, --list-id <id>` - New list ID
|
|
359
|
+
- `-s, --sender-id <id>` - New sender ID
|
|
360
|
+
- `-t, --template-id <id>` - New template ID
|
|
361
|
+
- `--subject <subject>` - New email subject
|
|
362
|
+
|
|
363
|
+
### Examples
|
|
364
|
+
|
|
365
|
+
**Update campaign name:**
|
|
366
|
+
```bash
|
|
367
|
+
$ cakemail campaigns update 790 --name "Weekly Update - October"
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
**Output:**
|
|
371
|
+
```
|
|
372
|
+
✓ Campaign 790 updated
|
|
373
|
+
|
|
374
|
+
Campaign: Weekly Update - October
|
|
375
|
+
Status: draft
|
|
376
|
+
Last updated: just now
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**Update multiple properties:**
|
|
380
|
+
```bash
|
|
381
|
+
$ cakemail campaigns update 790 \
|
|
382
|
+
--name "Newsletter v2" \
|
|
383
|
+
--subject "Your Weekly Digest" \
|
|
384
|
+
--sender-id 789
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
**Change list:**
|
|
388
|
+
```bash
|
|
389
|
+
$ cakemail campaigns update 790 --list-id 456
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### Notes
|
|
393
|
+
|
|
394
|
+
- Can only update draft campaigns
|
|
395
|
+
- Sent campaigns cannot be modified
|
|
396
|
+
- Changing list ID resets recipient targeting
|
|
397
|
+
- All options are optional (update only what you specify)
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## campaigns delete
|
|
402
|
+
|
|
403
|
+
Delete a campaign permanently.
|
|
404
|
+
|
|
405
|
+
### Usage
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
cakemail campaigns delete <id> [options]
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Arguments
|
|
412
|
+
|
|
413
|
+
- `<id>` - Campaign ID (required)
|
|
414
|
+
|
|
415
|
+
### Options
|
|
416
|
+
|
|
417
|
+
- `-f, --force` - Skip confirmation prompt
|
|
418
|
+
|
|
419
|
+
### Examples
|
|
420
|
+
|
|
421
|
+
**Delete with confirmation (Balanced/Marketer profile):**
|
|
422
|
+
```bash
|
|
423
|
+
$ cakemail campaigns delete 790
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
**Output:**
|
|
427
|
+
```
|
|
428
|
+
⚠ Delete campaign 'Weekly Newsletter'?
|
|
429
|
+
Campaign will be permanently deleted
|
|
430
|
+
This action cannot be undone
|
|
431
|
+
|
|
432
|
+
Delete campaign? (y/N): y
|
|
433
|
+
|
|
434
|
+
✓ Campaign 790 deleted
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**Force delete (skip confirmation):**
|
|
438
|
+
```bash
|
|
439
|
+
$ cakemail campaigns delete 790 --force
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**Developer profile (no confirmation):**
|
|
443
|
+
```bash
|
|
444
|
+
$ cakemail --profile developer campaigns delete 790
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
**Output:**
|
|
448
|
+
```json
|
|
449
|
+
{"success":true,"campaign_id":790}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### Confirmation Behavior
|
|
453
|
+
|
|
454
|
+
**Marketer Profile:**
|
|
455
|
+
- Always confirms, even with `--force`
|
|
456
|
+
- Shows detailed warning
|
|
457
|
+
- Safety-first approach
|
|
458
|
+
|
|
459
|
+
**Balanced Profile:**
|
|
460
|
+
- Confirms in interactive terminal
|
|
461
|
+
- Skips in scripts/CI
|
|
462
|
+
- Respects `--force` flag
|
|
463
|
+
|
|
464
|
+
**Developer Profile:**
|
|
465
|
+
- Never confirms
|
|
466
|
+
- Immediate deletion
|
|
467
|
+
- Trusts you know what you're doing
|
|
468
|
+
|
|
469
|
+
### Important Notes
|
|
470
|
+
|
|
471
|
+
⚠️ **Warning: Deletion is permanent**
|
|
472
|
+
|
|
473
|
+
- Campaign is permanently removed
|
|
474
|
+
- Statistics and reports are lost
|
|
475
|
+
- Cannot be undone
|
|
476
|
+
- Consider archiving instead if you need historical data
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## campaigns schedule
|
|
481
|
+
|
|
482
|
+
Schedule a campaign for sending at a specific date and time.
|
|
483
|
+
|
|
484
|
+
### Usage
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
cakemail campaigns schedule <id> --date <datetime>
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
### Arguments
|
|
491
|
+
|
|
492
|
+
- `<id>` - Campaign ID (required)
|
|
493
|
+
|
|
494
|
+
### Options
|
|
495
|
+
|
|
496
|
+
- `-d, --date <datetime>` - Schedule datetime in ISO 8601 format (required)
|
|
497
|
+
|
|
498
|
+
### Examples
|
|
499
|
+
|
|
500
|
+
**Schedule campaign:**
|
|
501
|
+
```bash
|
|
502
|
+
$ cakemail campaigns schedule 790 --date "2025-10-15T09:00:00Z"
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
**Output:**
|
|
506
|
+
```
|
|
507
|
+
✓ Campaign 790 scheduled for 2025-10-15T09:00:00Z
|
|
508
|
+
|
|
509
|
+
Campaign: Weekly Newsletter
|
|
510
|
+
Status: scheduled
|
|
511
|
+
Scheduled for: Oct 15, 2025 at 9:00 AM
|
|
512
|
+
Recipients: 1,234 contacts
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**Schedule with local timezone:**
|
|
516
|
+
```bash
|
|
517
|
+
$ cakemail campaigns schedule 790 --date "2025-10-15T09:00:00-05:00"
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Date Format
|
|
521
|
+
|
|
522
|
+
Use ISO 8601 format:
|
|
523
|
+
- `2025-10-15T09:00:00Z` - UTC time
|
|
524
|
+
- `2025-10-15T09:00:00-05:00` - With timezone offset
|
|
525
|
+
- `2025-10-15T09:00:00` - Local time (assumes server timezone)
|
|
526
|
+
|
|
527
|
+
### Notes
|
|
528
|
+
|
|
529
|
+
- Campaign must be in `draft` status
|
|
530
|
+
- Date must be in the future
|
|
531
|
+
- Campaign content must be complete
|
|
532
|
+
- Test before scheduling (see `campaigns test`)
|
|
533
|
+
- Changes status from `draft` to `scheduled`
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
## campaigns reschedule
|
|
538
|
+
|
|
539
|
+
Change the scheduled send time for a campaign.
|
|
540
|
+
|
|
541
|
+
### Usage
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
cakemail campaigns reschedule <id> --date <datetime>
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
### Arguments
|
|
548
|
+
|
|
549
|
+
- `<id>` - Campaign ID (required)
|
|
550
|
+
|
|
551
|
+
### Options
|
|
552
|
+
|
|
553
|
+
- `-d, --date <datetime>` - New schedule datetime in ISO 8601 format (required)
|
|
554
|
+
|
|
555
|
+
### Examples
|
|
556
|
+
|
|
557
|
+
**Reschedule campaign:**
|
|
558
|
+
```bash
|
|
559
|
+
$ cakemail campaigns reschedule 790 --date "2025-10-16T10:00:00Z"
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
**Output:**
|
|
563
|
+
```
|
|
564
|
+
✓ Campaign 790 rescheduled for 2025-10-16T10:00:00Z
|
|
565
|
+
|
|
566
|
+
Campaign: Weekly Newsletter
|
|
567
|
+
Old time: Oct 15, 2025 at 9:00 AM
|
|
568
|
+
New time: Oct 16, 2025 at 10:00 AM
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### Notes
|
|
572
|
+
|
|
573
|
+
- Campaign must be in `scheduled` status
|
|
574
|
+
- Cannot reschedule campaigns that are already sending
|
|
575
|
+
- New date must be in the future
|
|
576
|
+
- Use `unschedule` then `schedule` to change significantly
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
## campaigns unschedule
|
|
581
|
+
|
|
582
|
+
Remove scheduling from a campaign (returns to draft status).
|
|
583
|
+
|
|
584
|
+
### Usage
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
cakemail campaigns unschedule <id>
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
### Arguments
|
|
591
|
+
|
|
592
|
+
- `<id>` - Campaign ID (required)
|
|
593
|
+
|
|
594
|
+
### Examples
|
|
595
|
+
|
|
596
|
+
**Unschedule campaign:**
|
|
597
|
+
```bash
|
|
598
|
+
$ cakemail campaigns unschedule 790
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
**Output:**
|
|
602
|
+
```
|
|
603
|
+
✓ Campaign 790 unscheduled
|
|
604
|
+
|
|
605
|
+
Campaign: Weekly Newsletter
|
|
606
|
+
Status: draft (was scheduled)
|
|
607
|
+
Previous schedule: Oct 15, 2025 at 9:00 AM
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
### Notes
|
|
611
|
+
|
|
612
|
+
- Campaign must be in `scheduled` status
|
|
613
|
+
- Returns campaign to `draft` status
|
|
614
|
+
- Does not delete campaign
|
|
615
|
+
- Can be rescheduled later
|
|
616
|
+
|
|
617
|
+
---
|
|
618
|
+
|
|
619
|
+
## campaigns test
|
|
620
|
+
|
|
621
|
+
Send a test email to verify campaign appearance and content.
|
|
622
|
+
|
|
623
|
+
### Usage
|
|
624
|
+
|
|
625
|
+
```bash
|
|
626
|
+
cakemail campaigns test <id> --email <email>
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
### Arguments
|
|
630
|
+
|
|
631
|
+
- `<id>` - Campaign ID (required)
|
|
632
|
+
|
|
633
|
+
### Options
|
|
634
|
+
|
|
635
|
+
- `-e, --email <email>` - Recipient email address (required)
|
|
636
|
+
|
|
637
|
+
### Examples
|
|
638
|
+
|
|
639
|
+
**Send test email:**
|
|
640
|
+
```bash
|
|
641
|
+
$ cakemail campaigns test 790 --email test@company.com
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
**Output:**
|
|
645
|
+
```
|
|
646
|
+
✓ Test email sent to test@company.com
|
|
647
|
+
|
|
648
|
+
Campaign: Weekly Newsletter
|
|
649
|
+
Status: draft
|
|
650
|
+
Test sent: just now
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
**Send to multiple testers:**
|
|
654
|
+
```bash
|
|
655
|
+
$ cakemail campaigns test 790 --email qa@company.com
|
|
656
|
+
$ cakemail campaigns test 790 --email stakeholder@company.com
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
### Notes
|
|
660
|
+
|
|
661
|
+
- Campaign must have content (not empty)
|
|
662
|
+
- Test emails don't count toward statistics
|
|
663
|
+
- Personalization fields show placeholder values
|
|
664
|
+
- Links are tracked (so you can test tracking)
|
|
665
|
+
- Always test before scheduling!
|
|
666
|
+
|
|
667
|
+
### Best Practice
|
|
668
|
+
|
|
669
|
+
```bash
|
|
670
|
+
# Complete test workflow
|
|
671
|
+
cakemail campaigns create --name "Newsletter" --list-id 123 --sender-id 456
|
|
672
|
+
# [Design content in web UI]
|
|
673
|
+
cakemail campaigns test 790 --email test@company.com
|
|
674
|
+
# [Review test email]
|
|
675
|
+
cakemail campaigns schedule 790 --date "2025-10-15T09:00:00Z"
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
---
|
|
679
|
+
|
|
680
|
+
## campaigns cancel
|
|
681
|
+
|
|
682
|
+
Cancel a scheduled or sending campaign.
|
|
683
|
+
|
|
684
|
+
### Usage
|
|
685
|
+
|
|
686
|
+
```bash
|
|
687
|
+
cakemail campaigns cancel <id>
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
### Arguments
|
|
691
|
+
|
|
692
|
+
- `<id>` - Campaign ID (required)
|
|
693
|
+
|
|
694
|
+
### Examples
|
|
695
|
+
|
|
696
|
+
**Cancel scheduled campaign:**
|
|
697
|
+
```bash
|
|
698
|
+
$ cakemail campaigns cancel 790
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
**Output:**
|
|
702
|
+
```
|
|
703
|
+
✓ Campaign 790 canceled
|
|
704
|
+
|
|
705
|
+
Campaign: Weekly Newsletter
|
|
706
|
+
Status: canceled (was scheduled)
|
|
707
|
+
Was scheduled for: Oct 15, 2025 at 9:00 AM
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
**Cancel sending campaign:**
|
|
711
|
+
```bash
|
|
712
|
+
$ cakemail campaigns cancel 791
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
**Output:**
|
|
716
|
+
```
|
|
717
|
+
✓ Campaign 791 canceled
|
|
718
|
+
|
|
719
|
+
Campaign: Product Launch
|
|
720
|
+
Status: canceled (was sending)
|
|
721
|
+
Sent to: 234 of 1,234 contacts (19%)
|
|
722
|
+
Canceled: Oct 11, 2025 at 9:05 AM
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
### Notes
|
|
726
|
+
|
|
727
|
+
- Can cancel `scheduled` or `sending` campaigns
|
|
728
|
+
- Cannot cancel `sent` campaigns (already delivered)
|
|
729
|
+
- Canceling during sending stops immediately
|
|
730
|
+
- Recipients who already received email keep it
|
|
731
|
+
- Campaign status changes to `canceled`
|
|
732
|
+
- Consider `suspend` for temporary pause
|
|
733
|
+
|
|
734
|
+
---
|
|
735
|
+
|
|
736
|
+
## campaigns suspend
|
|
737
|
+
|
|
738
|
+
Temporarily pause a sending campaign.
|
|
739
|
+
|
|
740
|
+
### Usage
|
|
741
|
+
|
|
742
|
+
```bash
|
|
743
|
+
cakemail campaigns suspend <id>
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
### Arguments
|
|
747
|
+
|
|
748
|
+
- `<id>` - Campaign ID (required)
|
|
749
|
+
|
|
750
|
+
### Examples
|
|
751
|
+
|
|
752
|
+
**Suspend campaign:**
|
|
753
|
+
```bash
|
|
754
|
+
$ cakemail campaigns suspend 790
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
**Output:**
|
|
758
|
+
```
|
|
759
|
+
✓ Campaign 790 suspended
|
|
760
|
+
|
|
761
|
+
Campaign: Weekly Newsletter
|
|
762
|
+
Status: suspended (was sending)
|
|
763
|
+
Sent: 345 of 1,234 contacts (28%)
|
|
764
|
+
Suspended: Oct 11, 2025 at 9:10 AM
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
### Notes
|
|
768
|
+
|
|
769
|
+
- Can only suspend `sending` campaigns
|
|
770
|
+
- Sending stops immediately
|
|
771
|
+
- Use `resume` to continue sending
|
|
772
|
+
- Recipients already sent to keep email
|
|
773
|
+
- Useful for addressing issues mid-send
|
|
774
|
+
|
|
775
|
+
---
|
|
776
|
+
|
|
777
|
+
## campaigns resume
|
|
778
|
+
|
|
779
|
+
Resume a suspended campaign.
|
|
780
|
+
|
|
781
|
+
### Usage
|
|
782
|
+
|
|
783
|
+
```bash
|
|
784
|
+
cakemail campaigns resume <id>
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
### Arguments
|
|
788
|
+
|
|
789
|
+
- `<id>` - Campaign ID (required)
|
|
790
|
+
|
|
791
|
+
### Examples
|
|
792
|
+
|
|
793
|
+
**Resume campaign:**
|
|
794
|
+
```bash
|
|
795
|
+
$ cakemail campaigns resume 790
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
**Output:**
|
|
799
|
+
```
|
|
800
|
+
✓ Campaign 790 resumed
|
|
801
|
+
|
|
802
|
+
Campaign: Weekly Newsletter
|
|
803
|
+
Status: sending (was suspended)
|
|
804
|
+
Progress: 345 of 1,234 contacts (28%)
|
|
805
|
+
Resumed: Oct 11, 2025 at 9:20 AM
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
### Notes
|
|
809
|
+
|
|
810
|
+
- Can only resume `suspended` campaigns
|
|
811
|
+
- Sending continues from where it stopped
|
|
812
|
+
- No duplicate sends to recipients
|
|
813
|
+
- Statistics continue accumulating
|
|
814
|
+
|
|
815
|
+
---
|
|
816
|
+
|
|
817
|
+
## campaigns archive
|
|
818
|
+
|
|
819
|
+
Archive a campaign for historical reference.
|
|
820
|
+
|
|
821
|
+
### Usage
|
|
822
|
+
|
|
823
|
+
```bash
|
|
824
|
+
cakemail campaigns archive <id>
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
### Arguments
|
|
828
|
+
|
|
829
|
+
- `<id>` - Campaign ID (required)
|
|
830
|
+
|
|
831
|
+
### Examples
|
|
832
|
+
|
|
833
|
+
**Archive campaign:**
|
|
834
|
+
```bash
|
|
835
|
+
$ cakemail campaigns archive 790
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
**Output:**
|
|
839
|
+
```
|
|
840
|
+
✓ Campaign 790 archived
|
|
841
|
+
|
|
842
|
+
Campaign: Weekly Newsletter
|
|
843
|
+
Status: archived
|
|
844
|
+
Original status: sent
|
|
845
|
+
Archived: Oct 11, 2025
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
### Notes
|
|
849
|
+
|
|
850
|
+
- Can archive campaigns in any status
|
|
851
|
+
- Archived campaigns don't appear in default lists
|
|
852
|
+
- Statistics and reports remain available
|
|
853
|
+
- Use for cleanup while preserving history
|
|
854
|
+
- Can be unarchived later
|
|
855
|
+
|
|
856
|
+
---
|
|
857
|
+
|
|
858
|
+
## campaigns unarchive
|
|
859
|
+
|
|
860
|
+
Restore an archived campaign.
|
|
861
|
+
|
|
862
|
+
### Usage
|
|
863
|
+
|
|
864
|
+
```bash
|
|
865
|
+
cakemail campaigns unarchive <id>
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
### Arguments
|
|
869
|
+
|
|
870
|
+
- `<id>` - Campaign ID (required)
|
|
871
|
+
|
|
872
|
+
### Examples
|
|
873
|
+
|
|
874
|
+
**Unarchive campaign:**
|
|
875
|
+
```bash
|
|
876
|
+
$ cakemail campaigns unarchive 790
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
**Output:**
|
|
880
|
+
```
|
|
881
|
+
✓ Campaign 790 unarchived
|
|
882
|
+
|
|
883
|
+
Campaign: Weekly Newsletter
|
|
884
|
+
Status: sent (restored from archive)
|
|
885
|
+
Unarchived: Oct 11, 2025
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
---
|
|
889
|
+
|
|
890
|
+
## campaigns links
|
|
891
|
+
|
|
892
|
+
List all tracked links in a campaign.
|
|
893
|
+
|
|
894
|
+
### Usage
|
|
895
|
+
|
|
896
|
+
```bash
|
|
897
|
+
cakemail campaigns links <id> [options]
|
|
898
|
+
```
|
|
899
|
+
|
|
900
|
+
### Arguments
|
|
901
|
+
|
|
902
|
+
- `<id>` - Campaign ID (required)
|
|
903
|
+
|
|
904
|
+
### Options
|
|
905
|
+
|
|
906
|
+
- `-l, --limit <number>` - Limit number of results
|
|
907
|
+
- `-p, --page <number>` - Page number
|
|
908
|
+
|
|
909
|
+
### Examples
|
|
910
|
+
|
|
911
|
+
**List campaign links:**
|
|
912
|
+
```bash
|
|
913
|
+
$ cakemail campaigns links 790
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
**Output:**
|
|
917
|
+
```
|
|
918
|
+
Campaign: Weekly Newsletter (790)
|
|
919
|
+
|
|
920
|
+
┌────┬────────────────────────────────┬────────┬─────────────┐
|
|
921
|
+
│ ID │ URL │ Clicks │ Unique │
|
|
922
|
+
├────┼────────────────────────────────┼────────┼─────────────┤
|
|
923
|
+
│ 1 │ https://example.com/product │ 123 │ 98 │
|
|
924
|
+
│ 2 │ https://example.com/blog │ 67 │ 54 │
|
|
925
|
+
│ 3 │ https://example.com/contact │ 12 │ 11 │
|
|
926
|
+
└────┴────────────────────────────────┴────────┴─────────────┘
|
|
927
|
+
|
|
928
|
+
Total: 3 links, 202 total clicks, 163 unique clicks
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
### Notes
|
|
932
|
+
|
|
933
|
+
- Only available after campaign is sent
|
|
934
|
+
- Shows click statistics per link
|
|
935
|
+
- Unique clicks = distinct contacts who clicked
|
|
936
|
+
- Total clicks = all clicks (including repeats)
|
|
937
|
+
|
|
938
|
+
---
|
|
939
|
+
|
|
940
|
+
## campaigns render
|
|
941
|
+
|
|
942
|
+
Render campaign HTML preview with optional personalization.
|
|
943
|
+
|
|
944
|
+
### Usage
|
|
945
|
+
|
|
946
|
+
```bash
|
|
947
|
+
cakemail campaigns render <id> [options]
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
### Arguments
|
|
951
|
+
|
|
952
|
+
- `<id>` - Campaign ID (required)
|
|
953
|
+
|
|
954
|
+
### Options
|
|
955
|
+
|
|
956
|
+
- `-c, --contact-id <id>` - Contact ID for personalization (optional)
|
|
957
|
+
|
|
958
|
+
### Examples
|
|
959
|
+
|
|
960
|
+
**Render campaign HTML:**
|
|
961
|
+
```bash
|
|
962
|
+
$ cakemail campaigns render 790
|
|
963
|
+
```
|
|
964
|
+
|
|
965
|
+
**Output:**
|
|
966
|
+
```
|
|
967
|
+
✓ Campaign 790 rendered successfully
|
|
968
|
+
|
|
969
|
+
Subject: Your Weekly Newsletter
|
|
970
|
+
|
|
971
|
+
HTML Preview:
|
|
972
|
+
<html>
|
|
973
|
+
<head><title>Weekly Newsletter</title></head>
|
|
974
|
+
<body>
|
|
975
|
+
<h1>Hello {{first_name}}!</h1>
|
|
976
|
+
<p>Here's your weekly update...</p>
|
|
977
|
+
</body>
|
|
978
|
+
</html>
|
|
979
|
+
```
|
|
980
|
+
|
|
981
|
+
**Render with contact personalization:**
|
|
982
|
+
```bash
|
|
983
|
+
$ cakemail campaigns render 790 --contact-id 456
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
**Output:**
|
|
987
|
+
```
|
|
988
|
+
✓ Campaign rendered with contact data
|
|
989
|
+
|
|
990
|
+
Contact: john@example.com (456)
|
|
991
|
+
first_name: John
|
|
992
|
+
last_name: Doe
|
|
993
|
+
|
|
994
|
+
Subject: Your Weekly Newsletter
|
|
995
|
+
|
|
996
|
+
HTML:
|
|
997
|
+
<html>
|
|
998
|
+
<body>
|
|
999
|
+
<h1>Hello John!</h1>
|
|
1000
|
+
...
|
|
1001
|
+
</body>
|
|
1002
|
+
</html>
|
|
1003
|
+
```
|
|
1004
|
+
|
|
1005
|
+
### Use Cases
|
|
1006
|
+
|
|
1007
|
+
- Preview campaign before sending
|
|
1008
|
+
- Test personalization with real contact data
|
|
1009
|
+
- Save HTML for external review
|
|
1010
|
+
- Debug rendering issues
|
|
1011
|
+
|
|
1012
|
+
---
|
|
1013
|
+
|
|
1014
|
+
## campaigns revisions
|
|
1015
|
+
|
|
1016
|
+
List revision history for a campaign.
|
|
1017
|
+
|
|
1018
|
+
### Usage
|
|
1019
|
+
|
|
1020
|
+
```bash
|
|
1021
|
+
cakemail campaigns revisions <id> [options]
|
|
1022
|
+
```
|
|
1023
|
+
|
|
1024
|
+
### Arguments
|
|
1025
|
+
|
|
1026
|
+
- `<id>` - Campaign ID (required)
|
|
1027
|
+
|
|
1028
|
+
### Options
|
|
1029
|
+
|
|
1030
|
+
- `-p, --page <number>` - Page number
|
|
1031
|
+
- `--per-page <number>` - Results per page
|
|
1032
|
+
- `--with-count` - Include total count
|
|
1033
|
+
|
|
1034
|
+
### Examples
|
|
1035
|
+
|
|
1036
|
+
**List campaign revisions:**
|
|
1037
|
+
```bash
|
|
1038
|
+
$ cakemail campaigns revisions 790
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
**Output:**
|
|
1042
|
+
```
|
|
1043
|
+
Campaign: Weekly Newsletter (790)
|
|
1044
|
+
|
|
1045
|
+
┌────────┬──────────────────────┬───────────────┬─────────────────────┐
|
|
1046
|
+
│ Rev ID │ Changed By │ Changes │ Timestamp │
|
|
1047
|
+
├────────┼──────────────────────┼───────────────┼─────────────────────┤
|
|
1048
|
+
│ 5 │ user@company.com │ Subject │ Oct 11, 2025 3:15pm │
|
|
1049
|
+
│ 4 │ user@company.com │ Content │ Oct 11, 2025 2:45pm │
|
|
1050
|
+
│ 3 │ user@company.com │ Template │ Oct 11, 2025 2:30pm │
|
|
1051
|
+
│ 2 │ user@company.com │ Sender │ Oct 11, 2025 2:00pm │
|
|
1052
|
+
│ 1 │ user@company.com │ Created │ Oct 10, 2025 2:30pm │
|
|
1053
|
+
└────────┴──────────────────────┴───────────────┴─────────────────────┘
|
|
1054
|
+
|
|
1055
|
+
Total: 5 revisions
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
### Notes
|
|
1059
|
+
|
|
1060
|
+
- Tracks all campaign modifications
|
|
1061
|
+
- Shows who made changes and when
|
|
1062
|
+
- Useful for audit trail
|
|
1063
|
+
- Cannot restore old revisions (view only)
|
|
1064
|
+
|
|
1065
|
+
---
|
|
1066
|
+
|
|
1067
|
+
## campaigns blueprints
|
|
1068
|
+
|
|
1069
|
+
List campaign blueprints (templates) available.
|
|
1070
|
+
|
|
1071
|
+
### Usage
|
|
1072
|
+
|
|
1073
|
+
```bash
|
|
1074
|
+
cakemail campaigns blueprints [options]
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
### Options
|
|
1078
|
+
|
|
1079
|
+
- `-p, --page <number>` - Page number
|
|
1080
|
+
- `--per-page <number>` - Results per page
|
|
1081
|
+
- `--with-count` - Include total count
|
|
1082
|
+
- `--filter <filter>` - Filter (e.g., `"name==Template;is_owner"`)
|
|
1083
|
+
- `--sort <sort>` - Sort order (e.g., `+name`, `-created_on`)
|
|
1084
|
+
|
|
1085
|
+
### Examples
|
|
1086
|
+
|
|
1087
|
+
**List all blueprints:**
|
|
1088
|
+
```bash
|
|
1089
|
+
$ cakemail campaigns blueprints
|
|
1090
|
+
```
|
|
1091
|
+
|
|
1092
|
+
**Output:**
|
|
1093
|
+
```
|
|
1094
|
+
┌────┬──────────────────────┬───────────┬─────────────────────┐
|
|
1095
|
+
│ ID │ Name │ Type │ Created │
|
|
1096
|
+
├────┼──────────────────────┼───────────┼─────────────────────┤
|
|
1097
|
+
│ 12 │ Newsletter Template │ Custom │ Oct 1, 2025 │
|
|
1098
|
+
│ 45 │ Product Launch │ Custom │ Sep 15, 2025 │
|
|
1099
|
+
│ 78 │ Welcome Series │ System │ Aug 20, 2025 │
|
|
1100
|
+
└────┴──────────────────────┴───────────┴─────────────────────┘
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1103
|
+
**Filter to your templates:**
|
|
1104
|
+
```bash
|
|
1105
|
+
$ cakemail campaigns blueprints --filter "is_owner" --sort "+name"
|
|
1106
|
+
```
|
|
1107
|
+
|
|
1108
|
+
### Notes
|
|
1109
|
+
|
|
1110
|
+
- Blueprints are reusable campaign templates
|
|
1111
|
+
- Can be used when creating campaigns (`--template-id`)
|
|
1112
|
+
- System blueprints provided by Cakemail
|
|
1113
|
+
- Custom blueprints created by you
|
|
1114
|
+
|
|
1115
|
+
---
|
|
1116
|
+
|
|
1117
|
+
## Common Workflows
|
|
1118
|
+
|
|
1119
|
+
### Workflow 1: Create and Send Campaign
|
|
1120
|
+
|
|
1121
|
+
```bash
|
|
1122
|
+
# 1. Create campaign
|
|
1123
|
+
cakemail campaigns create \
|
|
1124
|
+
--name "Weekly Newsletter" \
|
|
1125
|
+
--list-id 123 \
|
|
1126
|
+
--sender-id 456
|
|
1127
|
+
|
|
1128
|
+
# Campaign created with ID 790
|
|
1129
|
+
|
|
1130
|
+
# 2. [Design content in web UI or via API]
|
|
1131
|
+
|
|
1132
|
+
# 3. Send test email
|
|
1133
|
+
cakemail campaigns test 790 --email test@company.com
|
|
1134
|
+
|
|
1135
|
+
# 4. Schedule for sending
|
|
1136
|
+
cakemail campaigns schedule 790 --date "2025-10-15T09:00:00Z"
|
|
1137
|
+
|
|
1138
|
+
# 5. Verify scheduling
|
|
1139
|
+
cakemail campaigns get 790
|
|
1140
|
+
```
|
|
1141
|
+
|
|
1142
|
+
---
|
|
1143
|
+
|
|
1144
|
+
### Workflow 2: Emergency Campaign Handling
|
|
1145
|
+
|
|
1146
|
+
```bash
|
|
1147
|
+
# Issue discovered during send
|
|
1148
|
+
cakemail campaigns suspend 790
|
|
1149
|
+
|
|
1150
|
+
# Fix the issue (update content, etc.)
|
|
1151
|
+
cakemail campaigns update 790 --subject "Corrected: Newsletter"
|
|
1152
|
+
|
|
1153
|
+
# Resume sending
|
|
1154
|
+
cakemail campaigns resume 790
|
|
1155
|
+
```
|
|
1156
|
+
|
|
1157
|
+
---
|
|
1158
|
+
|
|
1159
|
+
### Workflow 3: Campaign Performance Review
|
|
1160
|
+
|
|
1161
|
+
```bash
|
|
1162
|
+
# Get campaign details
|
|
1163
|
+
cakemail campaigns get 790
|
|
1164
|
+
|
|
1165
|
+
# View link clicks
|
|
1166
|
+
cakemail campaigns links 790
|
|
1167
|
+
|
|
1168
|
+
# Export detailed logs for analysis
|
|
1169
|
+
cakemail logs campaign 790 --filter "type==click"
|
|
1170
|
+
```
|
|
1171
|
+
|
|
1172
|
+
---
|
|
1173
|
+
|
|
1174
|
+
## Best Practices
|
|
1175
|
+
|
|
1176
|
+
### 1. Always Test Before Scheduling
|
|
1177
|
+
|
|
1178
|
+
```bash
|
|
1179
|
+
# Good workflow
|
|
1180
|
+
cakemail campaigns create --name "Newsletter" --list-id 123 --sender-id 456
|
|
1181
|
+
cakemail campaigns test 790 --email test@company.com
|
|
1182
|
+
# [Review test email]
|
|
1183
|
+
cakemail campaigns schedule 790 --date "2025-10-15T09:00:00Z"
|
|
1184
|
+
```
|
|
1185
|
+
|
|
1186
|
+
### 2. Use Descriptive Names
|
|
1187
|
+
|
|
1188
|
+
```bash
|
|
1189
|
+
# Good
|
|
1190
|
+
cakemail campaigns create --name "October Newsletter - Product Updates"
|
|
1191
|
+
|
|
1192
|
+
# Avoid
|
|
1193
|
+
cakemail campaigns create --name "Campaign 1"
|
|
1194
|
+
```
|
|
1195
|
+
|
|
1196
|
+
### 3. Archive Old Campaigns
|
|
1197
|
+
|
|
1198
|
+
```bash
|
|
1199
|
+
# Keep workspace clean
|
|
1200
|
+
cakemail campaigns list --status sent | jq -r '.data[].id' | \
|
|
1201
|
+
xargs -I {} cakemail campaigns archive {}
|
|
1202
|
+
```
|
|
1203
|
+
|
|
1204
|
+
### 4. Monitor Sending Progress
|
|
1205
|
+
|
|
1206
|
+
```bash
|
|
1207
|
+
# For large campaigns
|
|
1208
|
+
cakemail campaigns get 790
|
|
1209
|
+
# Check statistics during send
|
|
1210
|
+
```
|
|
1211
|
+
|
|
1212
|
+
---
|
|
1213
|
+
|
|
1214
|
+
## Troubleshooting
|
|
1215
|
+
|
|
1216
|
+
### Campaign Not Scheduling
|
|
1217
|
+
|
|
1218
|
+
**Problem:** `Error: Campaign cannot be scheduled`
|
|
1219
|
+
|
|
1220
|
+
**Solutions:**
|
|
1221
|
+
1. Verify campaign has content
|
|
1222
|
+
2. Check campaign is in `draft` status
|
|
1223
|
+
3. Ensure date is in future
|
|
1224
|
+
4. Verify list has contacts
|
|
1225
|
+
|
|
1226
|
+
---
|
|
1227
|
+
|
|
1228
|
+
### Test Email Not Received
|
|
1229
|
+
|
|
1230
|
+
**Problem:** Test email doesn't arrive
|
|
1231
|
+
|
|
1232
|
+
**Solutions:**
|
|
1233
|
+
1. Check spam folder
|
|
1234
|
+
2. Verify sender is confirmed
|
|
1235
|
+
3. Wait a few minutes (sending can be delayed)
|
|
1236
|
+
4. Check email address spelling
|
|
1237
|
+
|
|
1238
|
+
---
|
|
1239
|
+
|
|
1240
|
+
### Cannot Update Campaign
|
|
1241
|
+
|
|
1242
|
+
**Problem:** `Error: Campaign cannot be modified`
|
|
1243
|
+
|
|
1244
|
+
**Solutions:**
|
|
1245
|
+
1. Check campaign status (only `draft` can be updated)
|
|
1246
|
+
2. Use `unschedule` first if scheduled
|
|
1247
|
+
3. Cannot modify sent campaigns
|
|
1248
|
+
|
|
1249
|
+
---
|
|
1250
|
+
|