Skip to content

feat(broadcasts): list filters, account-wide stats, and link clicks - #17

Merged
imjohnbo merged 1 commit into
catchup/03-posts-snippetsfrom
catchup/04-broadcasts
Aug 20, 2026
Merged

feat(broadcasts): list filters, account-wide stats, and link clicks#17
imjohnbo merged 1 commit into
catchup/03-posts-snippetsfrom
catchup/04-broadcasts

Conversation

@imjohnbo

@imjohnbo imjohnbo commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Part 4 of 8. Base: #16.

What this adds

List filters:

kit broadcasts list --status <draft|scheduled|sending|completed|aborted>
kit broadcasts list --sent-after <yyyy-mm-dd> --sent-before <yyyy-mm-dd>

Account-wide stats. The stats subcommand now takes an optional ID:

kit broadcasts stats 12     # GET /v4/broadcasts/12/stats, as before
kit broadcasts stats        # GET /v4/broadcasts/stats, one row per broadcast

Without an ID it accepts --status, --sent-after, --sent-before, --include-total-count, and the pagination flags.

Link clicks:

kit broadcasts clicks <id>

Design notes

Single-broadcast stats output gains unsubscribe_rate, progress, and the two tracking flags. The spec documents all four. The CLI dropped them.

Tracking prints as enabled or disabled instead of as the raw *_disabled booleans. The JSON shape does not change, so existing scripts keep working. A test covers this.

broadcasts create now parses --tag-ids and --segment-ids with parseIdList from part 1.

Review notes

One subcommand covers both stats endpoints. An optional argument reads better than a second subcommand, and it keeps kit broadcasts stats <id> working exactly as before.

Tests: 232 before, 264 after.

Closes #4
Closes #7
Closes #11
Part of #13


The stack

Merge from the top down. Each part builds on the one above it.

PR Contents
1 #14 Client query support and shared helpers
2 #15 Sequence CRUD and sequence emails
3 #16 Posts and snippets
4 #17 (this one) Broadcast filters, account-wide stats, link clicks
5 #18 Subscriber slim listing, warnings, filter
6 #19 Tag rename, remove-by-email, bulk delete
7 #20 Account endpoints and purchase create
8 #21 Spec coverage map and its tests

Base branch: main for part 1, the previous part's branch for the rest.
GitHub retargets each base to main as the part below it merges.

Three spec changes the CLI had not caught up with.

List filters (issues #4 and #11):
  kit broadcasts list --status <draft|scheduled|sending|completed|aborted>
  kit broadcasts list --sent-after <yyyy-mm-dd> --sent-before <yyyy-mm-dd>

Account-wide stats (issues #7, #11, #13). The stats subcommand now takes an
optional ID. With an ID it hits /broadcasts/{id}/stats as before. Without one it
hits /broadcasts/stats and prints a row per broadcast, accepting --status,
--sent-after, --sent-before, --include-total-count, and the pagination flags.

Link clicks (issue #13):
  kit broadcasts clicks <id>

Single-broadcast stats output gains unsubscribe_rate, progress, and the two
tracking flags, which the spec documents but the CLI dropped. Tracking prints as
enabled or disabled rather than as the raw *_disabled booleans. The JSON shape is
unchanged.

Broadcast create now parses --tag-ids and --segment-ids with parseIdList.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kit API spec update: 2 changed Kit API spec update: 15 changed Kit API spec update: 4 added, 1 changed

1 participant