Repository navigation
feat: add messages resend - #63
Merged
Merged
Conversation
- Add the POST /messages/{messageId}/resend operation with the
ResendMessageRequest body; it returns a PendingSendMailResponse.
- MessageData gains resent_from_message_id.
- POST /send/batch items are now SendBatchMailItem: the send request
fields plus an optional per-email idempotency_key.
- A batch 409 can now also be an ApiError.
Co-Authored-By: Claude <noreply@anthropic.com>
Add messages().resend(messageId[, ResendMessageRequest[, SendOptions]]), which sends a sent message again as a new message with its own ID. Leave out the recipients to resend to every original recipient. Like reschedule and cancel, it uses the team token if configured, otherwise the sending token, and it accepts an Idempotency-Key through SendOptions. Co-Authored-By: Claude <noreply@anthropic.com>
The field stays nullable and is now documented as optional: it is null when the API leaves it out. Co-Authored-By: Claude <noreply@anthropic.com>
bjarn
added this pull request to stack #65
October 18, 2026 17:20
bjornftw
approved these changes
Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Non-breaking for SDK users; suggested bump: minor (3.1.0 → 3.2.0).
co.lettermint.typesfrom the latest API spec.messages().resend(messageId[, ResendMessageRequest[, SendOptions]]). It sends the stored content of a sent message again, as a new message with its own ID. Leave out the recipients (or passnull) to resend to every original recipient. When no body is given, the SDK sends no request body. Likerescheduleandcancel, it uses the team token if one is configured and otherwise the sending token. It accepts anIdempotency-KeythroughSendOptions, the same way asmessages().process().ApiException. 401/403/404/409/422/429 map to the existing exception subclasses.resendin the Team API method table and the token section, and adds a short "Resending" section.Note:
MessageDatais a generated response record and gains an optional, nullableresentFromMessageIdcomponent. Its canonical constructor therefore takes one more argument. That only affects code that callsnew MessageData(...)directly, for example in test fixtures. Reading responses, the accessors andMessageData.builder()are unchanged, and JSON without the field still parses.API changes in the regenerated types
messages.resendendpointPOST /messages/{messageId}/resend→Operations.RESEND_MESSAGE. OptionalResendMessageRequest { recipients }body (1-150 unique emails), optionalIdempotency-Keyheader. 202 →PendingSendMailResponse. Errors: 401, 403, 404, 409, 410, 422, 429, 500. At most 5 resends in 24 hours.resent_from_message_idMessageData.resentFromMessageId(), optional and nullable: the ID of the message this one resent, ornullwhen the field is absent or null (the message is not a resend).POST /send/batchitems are nowSendBatchMailItem(everySendMailRequestfield plus an optionalidempotencyKey, 1-255 characters, unique within a batch).settingsreusesSendMailRequestSettings.ApiError({"error":{"code","message","details"}}, for exampleIDEMPOTENCY_CONFLICT).Usage
Checks
./gradlew generateTypeswith the SDK generator, then./gradlew checkGeneratedTypes: up to date, 205 files (including the follow-up that documentsresent_from_message_idas optional)../gradlew clean build(JDK 24, with the generator): BUILD SUCCESSFUL, 89 tests passed. This includes the surface-coverage test, which now reachesPOST /messages/{messageId}/resend../gradlew clean build(JDK 17, without the generator, as in CI): BUILD SUCCESSFUL. The generated headers of 205 files were checked.Automatic-Module-Name: co.lettermintis in the manifest, and okhttp is not bundled.javap -public) againstmain: 67 lines added, and 1 removed (the oldMessageDatacanonical constructor noted above).Not run locally
Suggested release tag
v3.2.0🤖 Generated with Claude Code