@cakemail-org/cakemail-cli 1.7.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.
Files changed (198) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/.env.example +40 -0
  3. package/.env.test.example +45 -0
  4. package/CHANGELOG.md +1031 -0
  5. package/README.md +41 -37
  6. package/audit-formats.js +128 -0
  7. package/cakemail.rb +20 -0
  8. package/dist/client.js +1 -1
  9. package/dist/client.js.map +1 -1
  10. package/dist/commands/account.js +1 -1
  11. package/dist/commands/account.js.map +1 -1
  12. package/dist/commands/attributes.js +1 -1
  13. package/dist/commands/attributes.js.map +1 -1
  14. package/dist/commands/campaigns.js +1 -1
  15. package/dist/commands/campaigns.js.map +1 -1
  16. package/dist/commands/contacts.js +1 -1
  17. package/dist/commands/contacts.js.map +1 -1
  18. package/dist/commands/emails.js +1 -1
  19. package/dist/commands/emails.js.map +1 -1
  20. package/dist/commands/interests.js +1 -1
  21. package/dist/commands/interests.js.map +1 -1
  22. package/dist/commands/lists.js +1 -1
  23. package/dist/commands/lists.js.map +1 -1
  24. package/dist/commands/logs.js +1 -1
  25. package/dist/commands/logs.js.map +1 -1
  26. package/dist/commands/reports.js +1 -1
  27. package/dist/commands/reports.js.map +1 -1
  28. package/dist/commands/segments.js +1 -1
  29. package/dist/commands/segments.js.map +1 -1
  30. package/dist/commands/senders.js +1 -1
  31. package/dist/commands/senders.js.map +1 -1
  32. package/dist/commands/suppressed.js +1 -1
  33. package/dist/commands/suppressed.js.map +1 -1
  34. package/dist/commands/tags.js +1 -1
  35. package/dist/commands/tags.js.map +1 -1
  36. package/dist/commands/templates.js +1 -1
  37. package/dist/commands/templates.js.map +1 -1
  38. package/dist/commands/transactional-templates.js +1 -1
  39. package/dist/commands/transactional-templates.js.map +1 -1
  40. package/dist/commands/webhooks.js +1 -1
  41. package/dist/commands/webhooks.js.map +1 -1
  42. package/dist/utils/config.js +2 -2
  43. package/dist/utils/config.js.map +1 -1
  44. package/dist/utils/errors.js +1 -1
  45. package/dist/utils/errors.js.map +1 -1
  46. package/dist/utils/progress.d.ts.map +1 -1
  47. package/dist/utils/progress.js +32 -4
  48. package/dist/utils/progress.js.map +1 -1
  49. package/dist/utils/spinner.d.ts +17 -0
  50. package/dist/utils/spinner.d.ts.map +1 -0
  51. package/dist/utils/spinner.js +43 -0
  52. package/dist/utils/spinner.js.map +1 -0
  53. package/docs/DOCUMENTATION-STANDARD.md +1068 -0
  54. package/docs/README.md +161 -0
  55. package/docs/developer/ARCHITECTURE.md +516 -0
  56. package/docs/developer/AUTH.md +204 -0
  57. package/docs/developer/CONTRIBUTING.md +227 -0
  58. package/docs/developer/DOCUMENTATION_SUMMARY.md +346 -0
  59. package/docs/developer/PROJECT_INDEX.md +365 -0
  60. package/docs/planning/API_COVERAGE.md +1045 -0
  61. package/docs/planning/BACKLOG.md +1159 -0
  62. package/docs/planning/PROFILE_SYSTEM_TASKS.md +287 -0
  63. package/docs/planning/UX_IMPLEMENTATION_PLAN.md +691 -0
  64. package/docs/planning/archive/RELEASE_CHECKLIST_v1.3.0.md +332 -0
  65. package/docs/planning/archive/RELEASE_v1.3.0.md +428 -0
  66. package/docs/planning/archive/cakemail-cli-ux-improvements.md +438 -0
  67. package/docs/planning/cakemail-profile-system-plan.md +1121 -0
  68. package/docs/testing/AI_USER_SIMULATION_DESIGN.md +1342 -0
  69. package/docs/testing/KENOGAMI_BIDIRECTIONAL_FLOW.md +1517 -0
  70. package/docs/testing/KENOGAMI_TRUTH_RECONCILIATION_SYSTEM.md +1369 -0
  71. package/docs/user-manual/.obsidian/app.json +1 -0
  72. package/docs/user-manual/.obsidian/appearance.json +1 -0
  73. package/docs/user-manual/.obsidian/core-plugins.json +33 -0
  74. package/docs/user-manual/.obsidian/workspace.json +167 -0
  75. package/docs/user-manual/01-getting-started/01-installation.md +214 -0
  76. package/docs/user-manual/01-getting-started/02-quick-start.md +432 -0
  77. package/docs/user-manual/01-getting-started/03-authentication.md +448 -0
  78. package/docs/user-manual/01-getting-started/04-configuration.md +430 -0
  79. package/docs/user-manual/01-getting-started/05-output-formats.md +447 -0
  80. package/docs/user-manual/02-core-concepts/01-accounts.md +514 -0
  81. package/docs/user-manual/02-core-concepts/02-profile-system.md +771 -0
  82. package/docs/user-manual/02-core-concepts/03-smart-defaults.md +485 -0
  83. package/docs/user-manual/02-core-concepts/04-authentication-methods.md +435 -0
  84. package/docs/user-manual/02-core-concepts/05-pagination-filtering.md +600 -0
  85. package/docs/user-manual/02-core-concepts/06-error-handling.md +718 -0
  86. package/docs/user-manual/02-core-concepts/07-api-coverage.md +483 -0
  87. package/docs/user-manual/03-email-operations/01-senders.md +490 -0
  88. package/docs/user-manual/03-email-operations/02-templates.md +444 -0
  89. package/docs/user-manual/03-email-operations/03-transactional-emails.md +706 -0
  90. package/docs/user-manual/03-email-operations/04-email-tracking.md +407 -0
  91. package/docs/user-manual/04-campaign-management/01-campaigns-basics.md +394 -0
  92. package/docs/user-manual/04-campaign-management/02-campaign-scheduling.md +630 -0
  93. package/docs/user-manual/04-campaign-management/03-campaign-testing.md +997 -0
  94. package/docs/user-manual/04-campaign-management/04-campaign-lifecycle.md +709 -0
  95. package/docs/user-manual/04-campaign-management/05-campaign-links.md +934 -0
  96. package/docs/user-manual/05-contact-management/01-lists.md +836 -0
  97. package/docs/user-manual/05-contact-management/02-contacts.md +1035 -0
  98. package/docs/user-manual/05-contact-management/03-custom-attributes.md +788 -0
  99. package/docs/user-manual/05-contact-management/04-segments.md +1028 -0
  100. package/docs/user-manual/05-contact-management/05-contact-import-export.md +1031 -0
  101. package/docs/user-manual/06-analytics-reporting/01-campaign-analytics.md +867 -0
  102. package/docs/user-manual/06-analytics-reporting/02-account-reports.md +227 -0
  103. package/docs/user-manual/07-integrations/01-webhooks-integration.md +259 -0
  104. package/docs/user-manual/07-integrations/02-automation.md +326 -0
  105. package/docs/user-manual/08-advanced-usage/01-scripting-patterns.md +672 -0
  106. package/docs/user-manual/08-advanced-usage/02-bulk-operations.md +932 -0
  107. package/docs/user-manual/08-advanced-usage/03-ci-cd-integration.md +892 -0
  108. package/docs/user-manual/08-advanced-usage/04-performance-optimization.md +766 -0
  109. package/docs/user-manual/09-command-reference/01-config.md +776 -0
  110. package/docs/user-manual/09-command-reference/02-account.md +652 -0
  111. package/docs/user-manual/09-command-reference/03-lists.md +958 -0
  112. package/docs/user-manual/09-command-reference/04-contacts.md +1408 -0
  113. package/docs/user-manual/09-command-reference/05-attributes.md +617 -0
  114. package/docs/user-manual/09-command-reference/06-segments.md +894 -0
  115. package/docs/user-manual/09-command-reference/07-senders.md +803 -0
  116. package/docs/user-manual/09-command-reference/08-templates.md +818 -0
  117. package/docs/user-manual/09-command-reference/09-campaigns.md +1250 -0
  118. package/docs/user-manual/09-command-reference/10-emails.md +807 -0
  119. package/docs/user-manual/09-command-reference/11-reports.md +1135 -0
  120. package/docs/user-manual/09-command-reference/12-webhooks.md +773 -0
  121. package/docs/user-manual/09-command-reference/13-suppressed.md +797 -0
  122. package/docs/user-manual/09-command-reference/14-interests.md +630 -0
  123. package/docs/user-manual/09-command-reference/15-tags.md +584 -0
  124. package/docs/user-manual/09-command-reference/16-logs.md +656 -0
  125. package/docs/user-manual/09-command-reference/17-transactional-templates.md +850 -0
  126. package/docs/user-manual/10-troubleshooting/01-common-errors.md +457 -0
  127. package/docs/user-manual/10-troubleshooting/02-authentication-issues.md +558 -0
  128. package/docs/user-manual/10-troubleshooting/03-connection-problems.md +634 -0
  129. package/docs/user-manual/10-troubleshooting/04-debugging.md +725 -0
  130. package/docs/user-manual/11-appendix/04-faq.md +484 -0
  131. package/docs/user-manual/11-appendix/05-glossary.md +250 -0
  132. package/docs/user-manual/README.md +0 -0
  133. package/package.json +13 -61
  134. package/src/cli.ts +125 -0
  135. package/src/client.ts +16 -0
  136. package/src/commands/account.ts +267 -0
  137. package/src/commands/accounts.ts +78 -0
  138. package/src/commands/actions.ts +249 -0
  139. package/src/commands/attributes.ts +139 -0
  140. package/src/commands/campaign-blueprints.ts +106 -0
  141. package/src/commands/campaigns.ts +469 -0
  142. package/src/commands/config.ts +77 -0
  143. package/src/commands/contacts.ts +612 -0
  144. package/src/commands/custom-attributes.ts +127 -0
  145. package/src/commands/dkims.ts +117 -0
  146. package/src/commands/domains.ts +82 -0
  147. package/src/commands/email-apis.ts +569 -0
  148. package/src/commands/emails.ts +197 -0
  149. package/src/commands/forms.ts +283 -0
  150. package/src/commands/interests.ts +155 -0
  151. package/src/commands/links.ts +38 -0
  152. package/src/commands/lists.ts +406 -0
  153. package/src/commands/logos.ts +71 -0
  154. package/src/commands/logs.ts +386 -0
  155. package/src/commands/reports.ts +306 -0
  156. package/src/commands/segments.ts +158 -0
  157. package/src/commands/senders.ts +204 -0
  158. package/src/commands/sub-accounts.ts +271 -0
  159. package/src/commands/suppressed-emails.ts +234 -0
  160. package/src/commands/suppressed.ts +198 -0
  161. package/src/commands/system-emails.ts +85 -0
  162. package/src/commands/tags.ts +146 -0
  163. package/src/commands/tasks.ts +116 -0
  164. package/src/commands/templates.ts +189 -0
  165. package/src/commands/tokens.ts +83 -0
  166. package/src/commands/transactional-emails.ts +374 -0
  167. package/src/commands/transactional-templates.ts +385 -0
  168. package/src/commands/users.ts +506 -0
  169. package/src/commands/webhooks.ts +172 -0
  170. package/src/commands/workflow-blueprints.ts +123 -0
  171. package/src/commands/workflows.ts +265 -0
  172. package/src/types/profile.ts +93 -0
  173. package/src/utils/auth.ts +272 -0
  174. package/src/utils/config-file.ts +96 -0
  175. package/src/utils/config.ts +134 -0
  176. package/src/utils/confirm.ts +32 -0
  177. package/src/utils/defaults.ts +99 -0
  178. package/src/utils/errors.ts +116 -0
  179. package/src/utils/interactive.ts +91 -0
  180. package/src/utils/list-defaults.ts +74 -0
  181. package/src/utils/output.ts +190 -0
  182. package/src/utils/progress.ts +320 -0
  183. package/src/utils/spinner.ts +22 -0
  184. package/tests/IMPLEMENTATION_STATUS.md +258 -0
  185. package/tests/PTY_SETUP.md +118 -0
  186. package/tests/PTY_TESTING_GUIDE.md +507 -0
  187. package/tests/README.md +244 -0
  188. package/tests/fixtures/api-responses/campaigns.json +34 -0
  189. package/tests/fixtures/test-config.json +13 -0
  190. package/tests/helpers/cli-runner.ts +128 -0
  191. package/tests/helpers/mock-server.ts +301 -0
  192. package/tests/helpers/pty-runner.ts +181 -0
  193. package/tests/integration/campaigns-real-api.test.ts +196 -0
  194. package/tests/integration/setup-integration.ts +50 -0
  195. package/tests/pty/campaigns.test.ts +241 -0
  196. package/tests/setup.ts +34 -0
  197. package/tsconfig.json +15 -0
  198. package/vitest.config.ts +28 -0
@@ -0,0 +1,797 @@
1
+ # Suppressed Commands
2
+
3
+ Manage the global suppression list to prevent sending emails to specific addresses.
4
+
5
+ ## Overview
6
+
7
+ Suppressed commands allow you to:
8
+ - Add email addresses to the global suppression list
9
+ - List all suppressed email addresses
10
+ - Remove emails from suppression list
11
+ - Export suppression list for backup or analysis
12
+ - Manage suppression list exports
13
+
14
+ The suppression list is a global blocklist that prevents emails from being sent to specific addresses across all lists and campaigns. This is essential for compliance (unsubscribes, bounces, complaints) and sender reputation.
15
+
16
+ ## Commands
17
+
18
+ - [suppressed list](#suppressed-list) - List suppressed emails
19
+ - [suppressed add](#suppressed-add) - Add email to suppression list
20
+ - [suppressed delete](#suppressed-delete) - Remove email from suppression list
21
+ - [suppressed exports](#suppressed-exports) - List exports
22
+ - [suppressed export](#suppressed-export) - Create export
23
+ - [suppressed export-get](#suppressed-export-get) - Get export status
24
+ - [suppressed export-download](#suppressed-export-download) - Download export
25
+ - [suppressed export-delete](#suppressed-export-delete) - Delete export
26
+
27
+ ---
28
+
29
+ ## suppressed list
30
+
31
+ List all email addresses in the global suppression list.
32
+
33
+ ### Usage
34
+
35
+ ```bash
36
+ cakemail suppressed list [options]
37
+ ```
38
+
39
+ ### Options
40
+
41
+ - `-l, --limit <number>` - Limit number of results per page
42
+ - `-p, --page <number>` - Page number (default: 1)
43
+
44
+ ### Examples
45
+
46
+ **List all suppressed emails:**
47
+
48
+ ```bash
49
+ $ cakemail suppressed list
50
+ ```
51
+
52
+ **Output:**
53
+ ```
54
+ ┌──────────────────────┬─────────────────────┬─────────────────────┐
55
+ │ Email │ Reason │ Added │
56
+ ├──────────────────────┼─────────────────────┼─────────────────────┤
57
+ │ bounce@example.com │ hard-bounce │ 2024-01-15 10:30:00 │
58
+ │ spam@example.com │ complaint │ 2024-02-01 14:20:00 │
59
+ │ unsubscribe@ex.com │ unsubscribe │ 2024-03-01 09:00:00 │
60
+ └──────────────────────┴─────────────────────┴─────────────────────┘
61
+ ```
62
+
63
+ **List with pagination:**
64
+
65
+ ```bash
66
+ $ cakemail suppressed list -l 50 -p 1
67
+ ```
68
+
69
+ **Export suppressed list as JSON:**
70
+
71
+ ```bash
72
+ $ cakemail suppressed list -f json > suppressed-list.json
73
+ ```
74
+
75
+ **Output:**
76
+ ```json
77
+ {
78
+ "data": [
79
+ {
80
+ "email": "bounce@example.com",
81
+ "reason": "hard-bounce",
82
+ "added_at": "2024-01-15T10:30:00Z"
83
+ },
84
+ {
85
+ "email": "spam@example.com",
86
+ "reason": "complaint",
87
+ "added_at": "2024-02-01T14:20:00Z"
88
+ }
89
+ ],
90
+ "count": 2
91
+ }
92
+ ```
93
+
94
+ **Count suppressed emails:**
95
+
96
+ ```bash
97
+ $ cakemail suppressed list -f json | jq '.count'
98
+ ```
99
+
100
+ **Output:**
101
+ ```
102
+ 2
103
+ ```
104
+
105
+ **Extract email addresses:**
106
+
107
+ ```bash
108
+ $ cakemail suppressed list -f json | jq -r '.data[].email' > suppressed-emails.txt
109
+ ```
110
+
111
+ ### Suppression Reasons
112
+
113
+ - `hard-bounce` - Email permanently invalid
114
+ - `soft-bounce` - Temporary delivery failure (mailbox full, server down)
115
+ - `complaint` - Recipient marked email as spam
116
+ - `unsubscribe` - Recipient unsubscribed
117
+ - `manual` - Manually added to suppression list
118
+
119
+ ### Notes
120
+
121
+ - Suppression list is global (applies to all lists and campaigns)
122
+ - Emails on this list cannot receive any emails from your account
123
+ - Use pagination for large suppression lists
124
+ - Regular review helps maintain list hygiene
125
+
126
+ ### Related Commands
127
+
128
+ - [suppressed add](#suppressed-add) - Add email to suppression
129
+ - [suppressed export](#suppressed-export) - Export for backup
130
+ - [emails logs](/en/cli/command-reference/emails#emails-logs) - View email bounces
131
+
132
+ ---
133
+
134
+ ## suppressed add
135
+
136
+ Add an email address to the global suppression list.
137
+
138
+ ### Usage
139
+
140
+ ```bash
141
+ cakemail suppressed add <email>
142
+ ```
143
+
144
+ ### Arguments
145
+
146
+ - `email` - Email address to suppress (required)
147
+
148
+ ### Examples
149
+
150
+ **Add email to suppression list:**
151
+
152
+ ```bash
153
+ $ cakemail suppressed add bounce@example.com
154
+ ```
155
+
156
+ **Output:**
157
+ ```
158
+ ✓ Email bounce@example.com added to suppression list
159
+ {
160
+ "email": "bounce@example.com",
161
+ "added_at": "2024-03-15T10:30:00Z"
162
+ }
163
+ ```
164
+
165
+ **Add complaint email:**
166
+
167
+ ```bash
168
+ $ cakemail suppressed add spam@example.com
169
+ ```
170
+
171
+ **Add multiple emails:**
172
+
173
+ ```bash
174
+ $ cakemail suppressed add invalid1@example.com
175
+ $ cakemail suppressed add invalid2@example.com
176
+ $ cakemail suppressed add invalid3@example.com
177
+ ```
178
+
179
+ **Add emails from file:**
180
+
181
+ ```bash
182
+ $ cat bounced-emails.txt | while read email; do
183
+ cakemail suppressed add "$email"
184
+ done
185
+ ```
186
+
187
+ **Add after bounce:**
188
+
189
+ ```bash
190
+ # Check bounced emails
191
+ $ cakemail emails logs --status bounced
192
+
193
+ # Add bounced email to suppression
194
+ $ cakemail suppressed add hardbounce@example.com
195
+ ```
196
+
197
+ ### Common Use Cases
198
+
199
+ 1. **Hard Bounces**: Permanently invalid email addresses
200
+ 2. **Spam Complaints**: Recipients who marked email as spam
201
+ 3. **Legal Requests**: Individuals requesting no further contact
202
+ 4. **Internal Addresses**: Test or employee emails
203
+ 5. **Known Invalid**: Catch-all or disposable addresses
204
+
205
+ ### Notes
206
+
207
+ - Email cannot receive any emails from your account after addition
208
+ - Applies immediately to all lists and campaigns
209
+ - Email validation performed before adding
210
+ - Duplicate additions are ignored (idempotent)
211
+ - No automatic removal (must manually delete)
212
+
213
+ ### Related Commands
214
+
215
+ - [suppressed delete](#suppressed-delete) - Remove from suppression
216
+ - [suppressed list](#suppressed-list) - View suppressed emails
217
+ - [contacts unsubscribe](/en/cli/command-reference/contacts#contacts-unsubscribe) - Unsubscribe from list
218
+
219
+ ---
220
+
221
+ ## suppressed delete
222
+
223
+ Remove an email address from the global suppression list.
224
+
225
+ ### Usage
226
+
227
+ ```bash
228
+ cakemail suppressed delete <email> [options]
229
+ ```
230
+
231
+ ### Arguments
232
+
233
+ - `email` - Email address to remove (required)
234
+
235
+ ### Options
236
+
237
+ - `-f, --force` - Skip confirmation prompt (use in scripts)
238
+
239
+ ### Examples
240
+
241
+ **Delete email with confirmation:**
242
+
243
+ ```bash
244
+ $ cakemail suppressed delete bounce@example.com
245
+ ```
246
+
247
+ **Output:**
248
+ ```
249
+ ⚠ Delete suppressed email bounce@example.com?
250
+
251
+ The following will happen:
252
+ • Email will be removed from the suppression list
253
+ • This email address will be able to receive emails again
254
+
255
+ Type 'yes' to confirm: yes
256
+
257
+ ✓ Email bounce@example.com removed from suppression list
258
+ ```
259
+
260
+ **Force delete without confirmation:**
261
+
262
+ ```bash
263
+ $ cakemail suppressed delete bounce@example.com --force
264
+ ```
265
+
266
+ **Output:**
267
+ ```
268
+ ✓ Email bounce@example.com removed from suppression list
269
+ ```
270
+
271
+ **Delete in script:**
272
+
273
+ ```bash
274
+ $ cakemail suppressed delete test@example.com --force --batch
275
+ ```
276
+
277
+ ### Important Warnings
278
+
279
+ ⚠️ **Use with caution!** Removing emails from suppression list can:
280
+ - Damage sender reputation if email is invalid
281
+ - Violate anti-spam laws if user requested no contact
282
+ - Result in spam complaints if email complained previously
283
+
284
+ **Only remove emails if:**
285
+ - Email was added in error
286
+ - Contact explicitly requests re-subscription
287
+ - You have verified email is valid and deliverable
288
+
289
+ ### Notes
290
+
291
+ - Email can receive emails immediately after removal
292
+ - Applies to all lists and campaigns
293
+ - Confirmation required unless `--force` is used
294
+ - Consider re-subscribing contact to specific list instead
295
+
296
+ ### Related Commands
297
+
298
+ - [suppressed add](#suppressed-add) - Re-add if needed
299
+ - [suppressed list](#suppressed-list) - Verify removal
300
+ - [contacts add](/en/cli/command-reference/contacts#contacts-add) - Re-add to list
301
+
302
+ ---
303
+
304
+ ## suppressed exports
305
+
306
+ List all suppression list exports.
307
+
308
+ ### Usage
309
+
310
+ ```bash
311
+ cakemail suppressed exports [options]
312
+ ```
313
+
314
+ ### Options
315
+
316
+ - `-l, --limit <number>` - Limit number of results
317
+ - `-p, --page <number>` - Page number
318
+
319
+ ### Examples
320
+
321
+ **List all exports:**
322
+
323
+ ```bash
324
+ $ cakemail suppressed exports
325
+ ```
326
+
327
+ **Output:**
328
+ ```
329
+ ┌──────────────┬──────────┬─────────────────────┬──────────┐
330
+ │ ID │ Status │ Created │ Records │
331
+ ├──────────────┼──────────┼─────────────────────┼──────────┤
332
+ │ export_abc123│ ready │ 2024-03-15 10:30:00 │ 1,234 │
333
+ │ export_def456│ processing│ 2024-03-15 10:35:00│ - │
334
+ └──────────────┴──────────┴─────────────────────┴──────────┘
335
+ ```
336
+
337
+ **List recent exports:**
338
+
339
+ ```bash
340
+ $ cakemail suppressed exports -l 5
341
+ ```
342
+
343
+ ### Notes
344
+
345
+ - Shows all exports regardless of status
346
+ - Exports expire after 30 days
347
+ - Use to find previous exports before creating new one
348
+
349
+ ### Related Commands
350
+
351
+ - [suppressed export](#suppressed-export) - Create new export
352
+ - [suppressed export-download](#suppressed-export-download) - Download export
353
+
354
+ ---
355
+
356
+ ## suppressed export
357
+
358
+ Create a new export of the suppression list.
359
+
360
+ ### Usage
361
+
362
+ ```bash
363
+ cakemail suppressed export
364
+ ```
365
+
366
+ ### Examples
367
+
368
+ **Create export:**
369
+
370
+ ```bash
371
+ $ cakemail suppressed export
372
+ ```
373
+
374
+ **Output:**
375
+ ```
376
+ ✓ Suppressed emails export created
377
+ {
378
+ "id": "export_abc123",
379
+ "status": "processing",
380
+ "created_at": "2024-03-15T10:30:00Z"
381
+ }
382
+ ```
383
+
384
+ **Check export status:**
385
+
386
+ ```bash
387
+ # Create export
388
+ $ cakemail suppressed export
389
+
390
+ # Wait a moment, then check status
391
+ $ cakemail suppressed export-get export_abc123
392
+
393
+ # Download when ready
394
+ $ cakemail suppressed export-download export_abc123
395
+ ```
396
+
397
+ ### Notes
398
+
399
+ - Export includes all suppressed emails with metadata
400
+ - Processing time depends on list size
401
+ - Check status before downloading
402
+ - CSV format suitable for Excel/Google Sheets
403
+
404
+ ### Related Commands
405
+
406
+ - [suppressed export-get](#suppressed-export-get) - Check status
407
+ - [suppressed export-download](#suppressed-export-download) - Download file
408
+ - [suppressed exports](#suppressed-exports) - List all exports
409
+
410
+ ---
411
+
412
+ ## suppressed export-get
413
+
414
+ Get the status and details of a suppression list export.
415
+
416
+ ### Usage
417
+
418
+ ```bash
419
+ cakemail suppressed export-get <export-id>
420
+ ```
421
+
422
+ ### Arguments
423
+
424
+ - `export-id` - Export ID (required)
425
+
426
+ ### Examples
427
+
428
+ **Check export status:**
429
+
430
+ ```bash
431
+ $ cakemail suppressed export-get export_abc123
432
+ ```
433
+
434
+ **Output:**
435
+ ```
436
+ {
437
+ "id": "export_abc123",
438
+ "status": "ready",
439
+ "created_at": "2024-03-15T10:30:00Z",
440
+ "completed_at": "2024-03-15T10:30:45Z",
441
+ "total_records": 1234,
442
+ "download_url": "https://...",
443
+ "expires_at": "2024-04-14T10:30:45Z"
444
+ }
445
+ ```
446
+
447
+ **Monitor processing export:**
448
+
449
+ ```bash
450
+ $ cakemail suppressed export-get export_def456
451
+ ```
452
+
453
+ **Output:**
454
+ ```
455
+ {
456
+ "id": "export_def456",
457
+ "status": "processing",
458
+ "created_at": "2024-03-15T10:35:00Z",
459
+ "progress": 45
460
+ }
461
+ ```
462
+
463
+ ### Status Values
464
+
465
+ - `processing` - Export being generated
466
+ - `ready` - Export ready for download
467
+ - `failed` - Export failed (retry needed)
468
+
469
+ ### Notes
470
+
471
+ - Poll this endpoint to monitor export progress
472
+ - `download_url` only available when status is `ready`
473
+ - Downloads expire after 30 days
474
+
475
+ ### Related Commands
476
+
477
+ - [suppressed export](#suppressed-export) - Create export
478
+ - [suppressed export-download](#suppressed-export-download) - Download ready export
479
+
480
+ ---
481
+
482
+ ## suppressed export-download
483
+
484
+ Download a completed suppression list export.
485
+
486
+ ### Usage
487
+
488
+ ```bash
489
+ cakemail suppressed export-download <export-id>
490
+ ```
491
+
492
+ ### Arguments
493
+
494
+ - `export-id` - Export ID (required)
495
+
496
+ ### Examples
497
+
498
+ **Download export:**
499
+
500
+ ```bash
501
+ $ cakemail suppressed export-download export_abc123
502
+ ```
503
+
504
+ **Output:**
505
+ ```
506
+ ✓ Export downloaded
507
+ {
508
+ "filename": "suppressed_export_abc123.csv",
509
+ "size": 45678,
510
+ "download_url": "https://..."
511
+ }
512
+ ```
513
+
514
+ **Save to specific file:**
515
+
516
+ ```bash
517
+ $ cakemail suppressed export-download export_abc123 -f json | jq -r '.content' > suppressed.csv
518
+ ```
519
+
520
+ ### Notes
521
+
522
+ - Export must have status `ready` before download
523
+ - File format is CSV
524
+ - Contains: email, reason, added_at
525
+ - Download URL expires after 24 hours
526
+
527
+ ### Related Commands
528
+
529
+ - [suppressed export](#suppressed-export) - Create export
530
+ - [suppressed export-get](#suppressed-export-get) - Check if ready
531
+
532
+ ---
533
+
534
+ ## suppressed export-delete
535
+
536
+ Delete a suppression list export file.
537
+
538
+ ### Usage
539
+
540
+ ```bash
541
+ cakemail suppressed export-delete <export-id> [options]
542
+ ```
543
+
544
+ ### Arguments
545
+
546
+ - `export-id` - Export ID (required)
547
+
548
+ ### Options
549
+
550
+ - `-f, --force` - Skip confirmation prompt
551
+
552
+ ### Examples
553
+
554
+ **Delete export with confirmation:**
555
+
556
+ ```bash
557
+ $ cakemail suppressed export-delete export_abc123
558
+ ```
559
+
560
+ **Output:**
561
+ ```
562
+ ⚠ Delete suppressed emails export export_abc123?
563
+
564
+ The following will happen:
565
+ • Export file will be permanently deleted
566
+
567
+ Type 'yes' to confirm: yes
568
+
569
+ ✓ Export export_abc123 deleted
570
+ ```
571
+
572
+ **Force delete:**
573
+
574
+ ```bash
575
+ $ cakemail suppressed export-delete export_abc123 --force
576
+ ```
577
+
578
+ **Output:**
579
+ ```
580
+ ✓ Export export_abc123 deleted
581
+ ```
582
+
583
+ ### Notes
584
+
585
+ - Deletion is permanent
586
+ - Export data cannot be recovered
587
+ - Exports auto-delete after 30 days
588
+
589
+ ### Related Commands
590
+
591
+ - [suppressed exports](#suppressed-exports) - List exports
592
+ - [suppressed export](#suppressed-export) - Create new export
593
+
594
+ ---
595
+
596
+ ## Common Workflows
597
+
598
+ ### Workflow 1: Handle Bounced Emails
599
+
600
+ ```bash
601
+ # Check bounced emails
602
+ $ cakemail emails logs --status bounced --from 2024-03-01
603
+
604
+ # Export bounced emails
605
+ $ cakemail emails logs --status bounced -f json | jq -r '.data[].to' > bounces.txt
606
+
607
+ # Add to suppression list
608
+ $ cat bounces.txt | while read email; do
609
+ cakemail suppressed add "$email"
610
+ done
611
+
612
+ # Verify additions
613
+ $ cakemail suppressed list -l 10
614
+ ```
615
+
616
+ ### Workflow 2: Compliance Management
617
+
618
+ ```bash
619
+ # Export suppression list for records
620
+ $ cakemail suppressed export
621
+
622
+ # Wait for processing
623
+ $ cakemail suppressed export-get export_abc123
624
+
625
+ # Download when ready
626
+ $ cakemail suppressed export-download export_abc123 -f json | jq -r '.content' > suppression-backup-2024-03.csv
627
+
628
+ # Store securely for compliance
629
+ ```
630
+
631
+ ### Workflow 3: List Cleanup
632
+
633
+ ```bash
634
+ # Export suppression list
635
+ $ cakemail suppressed list -f json > current-suppression.json
636
+
637
+ # Analyze suppression reasons
638
+ $ jq '.data | group_by(.reason) | map({reason: .[0].reason, count: length})' current-suppression.json
639
+
640
+ # Example output:
641
+ # [{"reason":"hard-bounce","count":456},
642
+ # {"reason":"complaint","count":12},
643
+ # {"reason":"unsubscribe","count":789}]
644
+
645
+ # Clean up test emails (carefully!)
646
+ $ cakemail suppressed delete test@internal.com --force
647
+ ```
648
+
649
+ ### Workflow 4: Import Suppression List
650
+
651
+ ```bash
652
+ # Import from external source
653
+ $ cat external-suppression.txt | while read email; do
654
+ echo "Adding $email..."
655
+ cakemail suppressed add "$email"
656
+ done
657
+
658
+ # Verify imports
659
+ $ cakemail suppressed list -f json | jq '.count'
660
+ ```
661
+
662
+ ### Workflow 5: Regular Audit
663
+
664
+ ```bash
665
+ #!/bin/bash
666
+ # Monthly suppression audit script
667
+
668
+ # Export current list
669
+ cakemail suppressed export
670
+ sleep 10
671
+ EXPORT_ID=$(cakemail suppressed exports -f json | jq -r '.data[0].id')
672
+
673
+ # Download export
674
+ cakemail suppressed export-get $EXPORT_ID
675
+ cakemail suppressed export-download $EXPORT_ID -f json | jq -r '.content' > "suppression-audit-$(date +%Y-%m).csv"
676
+
677
+ # Generate report
678
+ echo "Suppression List Audit - $(date)"
679
+ echo "Total suppressed: $(cakemail suppressed list -f json | jq '.count')"
680
+ echo "Hard bounces: $(cakemail suppressed list -f json | jq '[.data[] | select(.reason=="hard-bounce")] | length')"
681
+ echo "Complaints: $(cakemail suppressed list -f json | jq '[.data[] | select(.reason=="complaint")] | length')"
682
+ ```
683
+
684
+ ## Best Practices
685
+
686
+ 1. **Automatic Addition**: Auto-add hard bounces and complaints
687
+ 2. **Regular Exports**: Export monthly for compliance records
688
+ 3. **Careful Removal**: Only remove after verification
689
+ 4. **Monitor Reasons**: Track why emails are suppressed
690
+ 5. **Respect Unsubscribes**: Never remove unsubscribe suppressions
691
+ 6. **Legal Compliance**: Maintain suppression list for CAN-SPAM/GDPR
692
+ 7. **Integration**: Sync with CRM suppression lists
693
+ 8. **Audit Regularly**: Review and validate suppression list quarterly
694
+
695
+ ## Troubleshooting
696
+
697
+ ### Error: "Email already suppressed"
698
+
699
+ Email is already on the suppression list.
700
+
701
+ **Solution:**
702
+ ```bash
703
+ # Check if email exists
704
+ $ cakemail suppressed list -f json | jq '.data[] | select(.email == "test@example.com")'
705
+
706
+ # Addition is idempotent (no error on duplicate)
707
+ # No action needed
708
+ ```
709
+
710
+ ### Email Still Receiving Messages
711
+
712
+ Email might not be properly suppressed.
713
+
714
+ **Solution:**
715
+ ```bash
716
+ # Verify email is in suppression list
717
+ $ cakemail suppressed list -f json | jq '.data[] | select(.email == "problem@example.com")'
718
+
719
+ # If not found, add it
720
+ $ cakemail suppressed add problem@example.com
721
+
722
+ # Check for typos in email address
723
+ # Verify in campaign/email logs
724
+ ```
725
+
726
+ ### Cannot Remove Email
727
+
728
+ Removal prevented for compliance.
729
+
730
+ **Solution:**
731
+ ```bash
732
+ # Check suppression reason
733
+ $ cakemail suppressed list -f json | jq '.data[] | select(.email == "user@example.com")'
734
+
735
+ # If reason is "complaint", do not remove
736
+ # If reason is "unsubscribe", obtain explicit consent first
737
+ # Document reason for removal
738
+ ```
739
+
740
+ ### Export Taking Too Long
741
+
742
+ Large suppression lists may take time.
743
+
744
+ **Solution:**
745
+ ```bash
746
+ # Create export
747
+ $ cakemail suppressed export
748
+
749
+ # Check status periodically
750
+ $ watch -n 5 'cakemail suppressed export-get export_abc123 -f json | jq .status'
751
+
752
+ # Download when ready
753
+ $ cakemail suppressed export-download export_abc123
754
+ ```
755
+
756
+ ### Suppression List Too Large
757
+
758
+ Many suppressed emails may indicate issues.
759
+
760
+ **Solution:**
761
+ ```bash
762
+ # Analyze suppression reasons
763
+ $ cakemail suppressed list -f json | jq '.data | group_by(.reason) | map({reason: .[0].reason, count: length})'
764
+
765
+ # High hard-bounce rate may indicate:
766
+ # - Poor list hygiene
767
+ # - Purchased/scraped lists
768
+ # - Old, stale contacts
769
+
770
+ # Solutions:
771
+ # - Implement double opt-in
772
+ # - Regular list cleaning
773
+ # - Email validation before import
774
+ # - Re-engagement campaigns
775
+ ```
776
+
777
+ ### Email Validation Failing
778
+
779
+ Invalid email format.
780
+
781
+ **Solution:**
782
+ ```bash
783
+ # Ensure valid email format
784
+ $ cakemail suppressed add "user@example.com"
785
+
786
+ # Not valid: "user@example" (missing TLD)
787
+ # Not valid: "userexample.com" (missing @)
788
+ # Not valid: "user @example.com" (spaces)
789
+ ```
790
+
791
+ ---
792
+
793
+ **Related Documentation:**
794
+ - [Emails Commands](/en/cli/command-reference/emails/) - Transactional email sending
795
+ - [Campaigns Commands](/en/cli/command-reference/campaigns/) - Campaign sending
796
+ - [Contacts Commands](/en/cli/command-reference/contacts/) - Contact management
797
+ - [Reports Commands](/en/cli/command-reference/reports/) - Bounce analytics