Skip to content

Add logic around domain reputation flow - #143

Merged
odunayoogungbure-rgb merged 1 commit into
mainfrom
feature/msd-15158-add-logic-around-domain-reputation-flow
Oct 28, 2026
Merged

odunayoogungbure-rgb merged 1 commit into
mainfrom
feature/msd-15158-add-logic-around-domain-reputation-flow

Conversation

@odunayoogungbure-rgb

@odunayoogungbure-rgb odunayoogungbure-rgb commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

resolves MSD-15158: Add logic around domain reputation flow

I used AI to generate parts of this PR

Yes

Changelist

  • Add domain and account reputation events

Risks

None

Performance impact

None

Security impact

None

How to QA

1. Create a webhook with the reputation events (API only — no UI)

MailerSend ms = new MailerSend();
ms.setToken("your_token");

Webhook webhook = ms.webhooks().builder()
    .name("Reputation webhook")
    .url("https://webhook.site/your-url")
    .enabled(true)
    .addEvent(WebhookEvents.DOMAIN_REPUTATION_CHANGED)
    .addEvent(WebhookEvents.ACCOUNT_REPUTATION_CHANGED)
    .createWebhook("domain_id");

Then in the app open Webhooks and click the new webhook.

  • Expect: the call succeeds, and the webhook shows domain.reputation_changed and account.reputation_changed as its events.
  • If broken: the builder throws a MailerSendException for an invalid event before calling the API.

Does not need QA:

  • Other webhook events and endpoints (unchanged)

How to release

  • Merge after mailersend/mailersend#8953 is deployed; the API rejects these events until then.
  • Release a new minor version as usual.

Screenshots, recordings

N/A

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@odunayoogungbure-rgb odunayoogungbure-rgb self-assigned this Sep 30, 2026
@odunayoogungbure-rgb
odunayoogungbure-rgb marked this pull request as ready for review September 30, 2026 15:16
@mailerlite-kritika

Copy link
Copy Markdown

Re-runViewConfidence Score: 4/5

[Low risk] The description makes merging conditional on mailersend/mailersend#8953 being deployed, since the API rejects these events until then, and nothing in the account shows that this was met, and the review read no sources outside the repository. The diff itself only adds two public string constants and two allow-list entries, which a revert removes cleanly, so the risk rests on that additive change alone.

Summary

Adds domain and account reputation webhook event constants

Adds DOMAIN_REPUTATION_CHANGED and ACCOUNT_REPUTATION_CHANGED to WebhookEvents and to the events allow-list. WebhooksBuilder.createWebhook and updateWebhook check each event against that list, so both calls now accept the two new events. The string values match the existing naming pattern.

What's good

  • Constants and the validation array are updated together, so the builder accepts the new events.
Review context · 0/5 commands
  • Commands run: none

Reviews (1) · Last reviewed commit: "feat: add domain and account reputation..." · claude-sonnet-5-5

@odunayoogungbure-rgb
odunayoogungbure-rgb merged commit 487b74e into main Oct 28, 2026
4 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