Skip to content

feat: add message_id to Email type#232

Merged
cpenned merged 4 commits into
mainfrom
cursor/add-message-id-typing-24c2
Jul 8, 2026
Merged

feat: add message_id to Email type#232
cpenned merged 4 commits into
mainfrom
cursor/add-message-id-typing-24c2

Conversation

@cpenned

@cpenned cpenned commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds message_id to the Email type for GET /emails/:id and list responses, matching the updated Resend API and Node.js SDK.

Changes

  • resend.Email now includes message_id: str
  • Updated email tests to cover the new field

Note: message_id was already typed on inbound/received email types (ReceivedEmail, ListReceivedEmail) used by receiving webhooks.

Open in Web Open in Cursor 

Summary by cubic

Adds message_id to the Email type so GET /emails/:id and list responses include the RFC Message-ID. This makes it easy to link SDK results to SMTP headers and external systems.

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

Review in cubic

cursoragent and others added 2 commits July 8, 2026 18:59
Add message_id to the Email type for GET /emails/:id and list responses.
Introduce typed webhook event payloads (WebhookEventPayload) matching the
Node.js SDK, including message_id on all outbound email webhook events.
Update Webhooks.verify to return the parsed and verified event payload.

Co-authored-by: cpenned <cpenned@users.noreply.github.com>
Co-authored-by: cpenned <cpenned@users.noreply.github.com>
@cpenned cpenned marked this pull request as ready for review July 8, 2026 19:04

@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 1 file (changes from recent commits).

Requires human review: This PR modifies the public API by changing the return type of Webhooks.verify() from None to a typed payload and adding message_id to the Email model. Such changes risk breaking existing code and require human review for backward compatibility.

Re-trigger cubic

Remove webhook event payload types and Webhooks.verify return type change.
Received email types already include message_id.

Co-authored-by: cpenned <cpenned@users.noreply.github.com>
@cursor cursor Bot changed the title feat: add message_id typing for emails and webhook events feat: add message_id to Email type Jul 8, 2026

@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 4 files (changes from recent commits).

Auto-approved: Adds a new message_id field to the Email model and updates tests. Low-risk additive change with no logic, config, or infrastructure impact.

Re-trigger cubic

Co-authored-by: cpenned <cpenned@users.noreply.github.com>

@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 1 file (changes from recent commits).

Auto-approved: Adds a new response field to the Email type to match the Resend API. No logic changes, only model and test updates.

Re-trigger cubic

@hermesresend hermesresend left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — typed on _EmailDefaultAttrs so both get and list benefit, docstring updated, tests cover both paths.

@cpenned cpenned merged commit 4dbfd93 into main Jul 8, 2026
22 checks passed
@cpenned cpenned deleted the cursor/add-message-id-typing-24c2 branch July 8, 2026 21:25
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.

3 participants