Skip to content

feat: add the inbound.rejected webhook event - #72

Merged
bjarn merged 1 commit into
mainfrom
feat/inbound-rejected-webhook-event
Oct 28, 2026
Merged

bjarn merged 1 commit into
mainfrom
feat/inbound-rejected-webhook-event

Conversation

@bjarn

@bjarn bjarn commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

What changed

Non-breaking; a minor release.

The API has a new webhook event, inbound.rejected, sent when an inbound message is rejected during SMTP. The regenerated types add it to WebhookEvent, so you can subscribe a webhook to it and compare a received payload's event() with it. WebhookEvent is open: SDK versions without the constant already decode the event and keep its raw name.

No hand-written code changes; the PR only regenerates src/main/java/co/lettermint/types.

API changes in the regenerated types

Type Change
WebhookEvent New value inbound.rejected as WebhookEvent.INBOUND_REJECTED (also in WebhookEvent.values())

The spec's openapi version string moved from 3.1.0 to 3.1.2. That has no effect on the SDK.

Usage

WebhookSecretResponse created = lettermint.webhooks().create(StoreWebhookData.builder()
        .name("Rejected inbound mail")
        .url("https://example.com/webhooks/lettermint")
        .events(List.of(WebhookEvent.INBOUND_REJECTED))
        .build());

// In the webhook handler:
WebhookPayload event = webhook.verify(rawBody, headers);
if (WebhookEvent.INBOUND_REJECTED.equals(event.event())) {
    // handle the rejected inbound message
}

Checks

  • ./gradlew generateTypes with the latest spec: 217 files rewritten; the diff is the spec header in every file plus the new WebhookEvent constant
  • ./gradlew checkGeneratedTypes with the latest spec: up to date (217 files)
  • ./gradlew checkGeneratedTypes in header-only mode (as in CI): passed (217 files)
  • ./gradlew build --no-daemon on JDK 24: passed
  • ./gradlew clean build --no-daemon on JDK 17: passed (103 tests, 0 failures, 0 skipped)
  • CI build-output checks on the jar: Automatic-Module-Name: co.lettermint present, no okhttp bundled

Not run locally

  • JDK 21 and 25 and Windows (CI matrix).
  • ./gradlew checkstyleMain checkstyleTest: the build has no checkstyle tasks, and the workflow ignores the result (|| true).

Suggested release tag

v3.3.0 (latest tag: v3.2.0).

@bjarn
bjarn requested a review from a team as a code owner October 28, 2026 14:39
@bjarn
bjarn merged commit e493578 into main Oct 28, 2026
8 checks passed
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