Skip to content

feat(broadcasts): add duplicate endpoint - #142

Merged
kewynakshlley merged 2 commits into
mainfrom
feature/dev-2099-java-sdk-external-kewyn-via-slack-team-sdks
Sep 14, 2026
Merged

kewynakshlley merged 2 commits into
mainfrom
feature/dev-2099-java-sdk-external-kewyn-via-slack-team-sdks

Conversation

@gabrielmfern

@gabrielmfern gabrielmfern commented Sep 11, 2026

Copy link
Copy Markdown
Member

Ports resend.broadcasts.duplicate(id) from the Node SDK: Broadcasts.duplicate(String id) posts to /broadcasts/{id}/duplicate, the endpoint added in resend/resend-openapi#115, and returns a DuplicateBroadcastResponseSuccess carrying the id of the new draft. The method matches Templates.duplicate and Automations.duplicate; the response type follows the broadcasts package and extends BaseBroadcastResponse like CancelBroadcastResponseSuccess instead of being a flat DTO like theirs. The release carries 4.25.0.

Staging call through Broadcasts.duplicate from the 4.25.0 jar in Maven local. HttpClient.BASE_API is a hardcoded constant, so the call went through a HttpClient subclass with perform overridden to hit https://api.resend-staging.com; the copy was deleted afterwards.

source id: e6bd3843-3cc7-4c0d-b7fd-e01cbb514a16
getObject(): broadcast
getId():     8adc9b5a-65ff-43c5-b0b5-f4517912927f
id differs from source: true

Left open on purpose: object is now duplicated across CancelBroadcastResponseSuccess, RemoveBroadcastResponseSuccess, and DuplicateBroadcastResponseSuccess and could be hoisted into BaseBroadcastResponse. That touches the sibling models, so it stays out of this single-endpoint port.

🤖 Generated with Claude Code


Summary by cubic

Adds Broadcasts.duplicate(id) to the Java SDK, matching the Node SDK's resend.broadcasts.duplicate and the endpoint from resend/resend-openapi#115.

The new method posts to /broadcasts/{id}/duplicate and returns a DuplicateBroadcastResponseSuccess with the new draft's ID. The version bumps to 4.25.0.

Refactors

  • object is now duplicated across CancelBroadcastResponseSuccess, RemoveBroadcastResponseSuccess, and DuplicateBroadcastResponseSuccess; hoisting it into BaseBroadcastResponse is left for a future PR to keep this change focused.

Written for commit 291c2f1. Summary will update on new commits.

Review in cubic

gabrielmfern and others added 2 commits September 11, 2026 14:46
Ports resend.broadcasts.duplicate(id) from the Node SDK for
POST /broadcasts/{id}/duplicate, added in resend/resend-openapi#115.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/main/java/com/resend/services/broadcasts/Broadcasts.java
@gabrielmfern
gabrielmfern marked this pull request as ready for review September 11, 2026 19:22
@kewynakshlley
kewynakshlley merged commit 6119f8e into main Sep 14, 2026
4 checks passed
@kewynakshlley
kewynakshlley deleted the feature/dev-2099-java-sdk-external-kewyn-via-slack-team-sdks branch September 14, 2026 11:44
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