Skip to content

fix(inboxes): type create responses as object and id - #1143

Merged
joaopcm merged 1 commit into
preview-inboxesfrom
fix/simplify-inbox-create-responses
Oct 9, 2026
Merged

joaopcm merged 1 commit into
preview-inboxesfrom
fix/simplify-inbox-create-responses

Conversation

@joaopcm

@joaopcm joaopcm commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

POST /inboxes, POST /inboxes/:inbox_id/labels and POST /inboxes/:inbox_id/drafts now return only the object type and the id, like every other create endpoint (resend/resend-monorepo#12282). the preview types still describe the full resource, so data.email_address, data.color or data.type type-check and come back undefined.

MES-2144

what changed

-export type CreateInboxResponseSuccess = GetInboxResponseSuccess;
+export interface CreateInboxResponseSuccess {
+  object: 'inbox';
+  id: string;
+}

same for CreateInboxLabelResponseSuccess (inbox_label) and CreateInboxDraftResponseSuccess (inbox_draft). to read receiving_address after creating a forwarding inbox, call resend.inboxes.get(id).

the create tests now mock the { object, id } response.

release

this bumps to 6.32.1-preview-inboxes.5, which also ships #1142 (not published yet, npm still has .4). after merge, push the v6.32.1-preview-inboxes.5 tag to publish under the preview-inboxes dist-tag.


Summary by cubic

POST /inboxes, POST /inboxes/:inbox_id/labels, and POST /inboxes/:inbox_id/drafts now return only the object type and id, matching the other create endpoints. The preview types still describe the full resource, so data.email_address, data.color, and data.type type-check but come back undefined. To read receiving_address after creating a forwarding inbox, call resend.inboxes.get(id).

Release

  • Bumps the package to 6.32.1-preview-inboxes.5, which also includes unpublished changes; npm still has .4. After merge, push the v6.32.1-preview-inboxes.5 tag to publish under the preview-inboxes dist-tag.

Written for commit ad20372. Summary will update on new commits.

View guided diff

@joaopcm
joaopcm requested a review from a team as a code owner October 9, 2026 14:54
@joaopcm
joaopcm requested review from cassiozen and removed request for a team October 9, 2026 14:54
@pkg-pr-new

pkg-pr-new Bot commented Oct 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/resend@1143

commit: ad20372

@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.

No issues found across 7 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Narrows public SDK response types for three inbox create endpoints to object/id. A human should confirm this breaking type change and that the backend actually returns only these fields.

View guided diff | Re-trigger cubic

@joaopcm joaopcm self-assigned this Oct 9, 2026
@joaopcm
joaopcm requested review from isabellaaquino and removed request for cassiozen October 9, 2026 15:09
@joaopcm
joaopcm merged commit b4c603f into preview-inboxes Oct 9, 2026
10 checks passed
@joaopcm
joaopcm deleted the fix/simplify-inbox-create-responses branch October 9, 2026 15:14
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