Skip to content

feat(inboxes): match the latest inboxes API - #397

Merged
felipefreitag merged 4 commits into
preview-inboxesfrom
feat-inboxes-latest-api-changes
Oct 2, 2026
Merged

felipefreitag merged 4 commits into
preview-inboxesfrom
feat-inboxes-latest-api-changes

Conversation

@felipefreitag

@felipefreitag felipefreitag commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

The inbox commands now work with the current Inboxes API and the latest SDK preview. Last week's API changes broke some commands, and some flags stopped working without an error. Users can now read the messages of a thread with their own command, get an inbox by its address, and add cc and bcc to replies and forwards.

Breaking for preview users. --friendly_name is now --from_name, threads list has no --from, and threads get no longer returns messages. Each change follows the API.

Webhooks. This branch carries #396 from main, because the new SDK types need the topic events. --events all now also subscribes to the inbox events.


Summary by cubic

The inbox commands now match the current Inboxes API and the latest SDK preview (resend 6.32.1). Last week's API changes broke several commands, and some flags stopped working without erroring.

Breaking for preview users. All changes follow the API:

  • --friendly_name is now --from_name on inboxes create and inboxes update; pass --from_name "" to clear it.
  • inboxes threads list no longer accepts --from.
  • inboxes threads get returns the thread summary only — messages moved to the new inboxes threads emails list command.

New commands and features.

  • inboxes threads emails list lists the emails in a thread with full bodies and is the default subcommand of inboxes threads emails; email IDs for get, reply, and forward now come from it.
  • inboxes get accepts an email address in addition to an inbox UUID.
  • reply and forward support --cc and --bcc; combined recipients are capped at 50 for replies, forwards, and drafts.
  • Reply drafts no longer copy recipients from the source email, so set --to before sending.
  • webhooks listen now summarizes inbox events: sender and recipient for email events, subject for draft and thread events, and address for inbox lifecycle events.
  • Webhook events grow from 19 to 37 with new topic and inbox events; --events all subscribes to them. This branch carries feat(webhooks): add topic and contact.topics.updated webhook events #396 from main since the new SDK types require the topic events.

Written for commit 9c486c8. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 35 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="README.md">

<violation number="1" location="README.md:430">
P2: The event table still omits `suppression.added` and `suppression.removed`, so readers cannot discover how to subscribe to these supported events individually. Add a Suppression row.</violation>
</file>

<file name="src/commands/inboxes/get.ts">

<violation number="1" location="src/commands/inboxes/get.ts:33">
P3: `Name:` is now printed unconditionally, but this same PR keeps `"name":"<name>|null"` in list.ts's help output, so `name` is still nullable — a null name prints "Name: null". Guard the print as before, or align the list.ts output format if the API now guarantees a name.</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread README.md
| Contact | `contact.created`, `contact.updated`, `contact.deleted` |
| Contact | `contact.created`, `contact.updated`, `contact.deleted`, `contact.topics.updated` |
| Domain | `domain.created`, `domain.updated`, `domain.deleted` |
| Topic | `topic.created`, `topic.updated`, `topic.deleted` |

@cubic-dev-ai cubic-dev-ai Bot Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The event table still omits suppression.added and suppression.removed, so readers cannot discover how to subscribe to these supported events individually. Add a Suppression row.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At README.md, line 430:

<comment>The event table still omits `suppression.added` and `suppression.removed`, so readers cannot discover how to subscribe to these supported events individually. Add a Suppression row.</comment>

<file context>
@@ -425,8 +425,10 @@ For example, you can:
-| Contact  | `contact.created`, `contact.updated`, `contact.deleted`                                                                                                                                                  |
+| Contact  | `contact.created`, `contact.updated`, `contact.deleted`, `contact.topics.updated`                                                                                                                        |
 | Domain   | `domain.created`, `domain.updated`, `domain.deleted`                                                                                                                                                     |
+| Topic    | `topic.created`, `topic.updated`, `topic.deleted`                                                                                                                                                        |
+| Inbox    | `inbox.created`, `inbox.updated`, `inbox.deleted`, `inbox.thread.created`, `inbox.email.received`, `inbox.email.sent`, `inbox.thread.folder.updated`, `inbox.thread.assigned`, `inbox.thread.unassigned`, `inbox.thread.labels.updated`, `inbox.draft.created`, `inbox.draft.updated`, `inbox.draft.sent`, `inbox.draft.deleted` (beta) |
 
</file context>
Suggested change
| Topic | `topic.created`, `topic.updated`, `topic.deleted` |
| Suppression | `suppression.added`, `suppression.removed` |
| Topic | `topic.created`, `topic.updated`, `topic.deleted` |
Fix with cubic

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope here; this row comes in when the preview branch rebases on main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues remain. Requires human review: Matches inbox commands to the latest Inboxes API/SDK: flag renames, thread messages moved to emails list, cc/bcc, and webhook --events all expanded to 37 events. Breaking CLI changes and wider default webhook subscriptions need human sign-off.

Comment thread src/commands/inboxes/update.ts Outdated
Comment thread src/commands/inboxes/create.ts Outdated
Comment thread src/commands/inboxes/get.ts
Comment thread src/commands/webhooks/listen.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 13 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread tests/commands/inboxes/threads/emails/forward.test.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 7 files (changes from recent commits).

Requires human review: Auto-approval blocked by 2 unresolved issues from previous reviews.

Re-trigger cubic

@felipefreitag
felipefreitag merged commit 7533a3c into preview-inboxes Oct 2, 2026
6 of 8 checks passed
@felipefreitag
felipefreitag deleted the feat-inboxes-latest-api-changes branch October 2, 2026 18:59
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.

2 participants