Conversation
Reject only when |now - timestamp| exceeds the tolerance, so small clock skew between Lettermint and the receiver no longer fails every webhook.
src/main/java/co/lettermint/types is generated by the SDK generator (emit java, profile next, spec 80d8ab2a2d). ./gradlew generateTypes regenerates it with LETTERMINT_SDK_GENERATOR or ../sdk-generator; checkGeneratedTypes, part of check, verifies it or, without the generator, its headers. The build compiles with --release 17 on Gradle 9.6.1, and the version comes from -PreleaseVersion instead of a 2.0.0 placeholder.
… tokens One thread-safe client replaces Lettermint.email(), Lettermint.api(), ApiClient and LettermintClient: Lettermint.builder().sendingToken(...) .teamToken(...).build(), or Lettermint.of(token) with prefix detection. emails() uses the sending token, every other part the team token, and ping, messages.reschedule and messages.cancel accept either. A missing token is a LettermintConfigException that names the option. Sending holds no state: emails().send(EmailMessage, SendOptions), sendBatch and an immutable compose() builder whose setters return new builders. The Idempotency-Key is a per-call option. Tags are validated before any request. The transport uses java.net.http with redirects never followed (a 3xx is a RedirectException), no retries, a timeout that covers the whole request, cancellation by thread interrupt, typed exceptions for every outcome and no tokens in toString or exception messages. OkHttp is removed. Lists return CursorPage<T> and iterate() follows next_cursor. Webhook verification requires X-Lettermint-Signature and X-Lettermint-Delivery, accepts any matching v1, rejects a negative tolerance and reports a WebhookVerificationException.Reason. BREAKING CHANGE: every 2.x entry point, model and exception is replaced; Java 17 or later is required. See UPGRADE.md.
The release workflow passes -PreleaseVersion instead of editing build.gradle and the removed pom.xml, and checks the jar manifest and BuildInfo before publishing. CI runs ./gradlew build, which includes javadoc and the generated-header check.
UPGRADE.md has before/after examples for every changed call, the full type rename table, the removed classes and types, and a ready-to-copy instruction for upgrading with a coding agent.
The spec at lettermint/lettermint@0b4ecbdd23 (main, the #2582 merge) is identical to the previous pin; only the generated file headers change.
Bjornftw
approved these changes
Oct 4, 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.
Summary
A new major version, following the Lettermint SDK design agreed for all languages. The reference is the Node.js SDK 3.0 (lettermint/lettermint-node#36). Sending holds no state on the client, types are generated from the published API spec, and every SDK passes the same conformance suite.
What changes
sendingTokenand/orteamToken. A single token string is detected by prefix:lm_team_is a team token,lm_plus letters and digits is a sending token, and anything else is a config error. Each part uses its own token and never falls back to the other.emails.send(message, options),emails.sendBatch(…)and an immutable per-messagecompose()builder. The idempotency key is a per-call option. Attachments are objects.0b4ecbdd23) using its names. Enums are open, so new API values never break decoding.verify(rawBody, headers)requires bothX-Lettermint-SignatureandX-Lettermint-Delivery, accepts any matchingv1, uses a ±300 s tolerance, and keys the HMAC on the secret as-is. Reason codes are the same in every SDK.Specific to this SDK
java.net.http, which actually aborts on timeout. CI tests 17, 21 and 25.Lettermint.builder()orLettermint.of(token).compose()returns an immutable builder.-PreleaseVersionfrom the tag and refuses SNAPSHOT versions. The brokenpom.xmlis removed.Verification
--strict. 2.7.0 fails 9, including the token following a redirect to another host.Release
Publish a GitHub release
v3.0.0. It publishes to Maven Central.Docs for all SDK majors: lettermint/lettermint#2594 (stacked on lettermint/lettermint#2590). Merge it after the releases.
🤖 Generated with Claude Code