Skip to content

feat(broadcasts): add duplicate endpoint - #160

Merged
dielduarte merged 3 commits into
mainfrom
feature/dev-2095-net-sdk-internal-squad-devtools
Sep 14, 2026
Merged

dielduarte merged 3 commits into
mainfrom
feature/dev-2095-net-sdk-internal-squad-devtools

Conversation

@gabrielmfern

@gabrielmfern gabrielmfern commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

This ports resend.broadcasts.duplicate(id) from the Node SDK as BroadcastDuplicateAsync, for the POST /broadcasts/{id}/duplicate endpoint added in resend/resend-openapi#115, plus a broadcast duplicate command in the deprecated CLI. It is a hand port, since the tools/dotnet-gen generator refuses Broadcasts. The release carries 0.18.0.

Claude called the new method against staging from a scratch console app and ran the CLI command once, then deleted both copies with httpie. The test keeps Assert.NotEqual( broadcastId, resp.Content ) on purpose: it is the assertion that separates a duplicate from an update against the fake server.

Success:   True
Source id: e6bd3843-3cc7-4c0d-b7fd-e01cbb514a16
New id:    b696b590-6c4c-43b1-b45d-9cbcf9eb6912
Differs:   True
GET /broadcasts/b696b590-6c4c-43b1-b45d-9cbcf9eb6912 -> HTTP/1.1 200 OK
{"object":"broadcast","id":"b696b590-6c4c-43b1-b45d-9cbcf9eb6912","name":"Untitled (copy)","status":"draft",...}

DELETE /broadcasts/b696b590-6c4c-43b1-b45d-9cbcf9eb6912 -> HTTP/1.1 200 OK
{"object":"broadcast","id":"b696b590-6c4c-43b1-b45d-9cbcf9eb6912","deleted":true}
$ resend broadcast duplicate e6bd3843-3cc7-4c0d-b7fd-e01cbb514a16
01b8fc5c-3023-40bf-b641-324325ee1a77

DELETE /broadcasts/01b8fc5c-3023-40bf-b641-324325ee1a77 -> HTTP/1.1 200 OK
{"object":"broadcast","id":"01b8fc5c-3023-40bf-b641-324325ee1a77","deleted":true}

🤖 Generated with Claude Code


Summary by cubic

Adds the ability to duplicate a broadcast through the .NET SDK and the deprecated CLI, porting the Node SDK's resend.broadcasts.duplicate(id).

Changes

  • Adds BroadcastDuplicateAsync to IResend and ResendClient, calling POST /broadcasts/{id}/duplicate.
  • Adds the broadcast duplicate CLI command.
  • Adds a fake-server route and a test asserting the duplicate ID differs from the source.
  • Bumps the package version to 0.18.0.

Written for commit c8c6332. Summary will update on new commits.

Review in cubic

gabrielmfern and others added 3 commits September 11, 2026 14:58
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 8 files

Confidence score: 4/5

  • src/Resend/IResend.cs adds a duplicate-operation API call whose production authorization requirements are not yet confirmed; broadcast API keys may be rejected at runtime if they lack permission for the endpoint—verify the required key permissions and restrictions before merging.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/Resend/IResend.cs">

<violation number="1" location="src/Resend/IResend.cs:864">
P2: Custom agent: **API Key Permission Check SDK Methods**

This adds a new Resend API operation. Confirm that the production API keys used for broadcasts have permission to call the duplicate endpoint, including any restricted keys, before release.</violation>
</file>

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

Re-trigger cubic

Comment thread src/Resend/IResend.cs
@gabrielmfern
gabrielmfern marked this pull request as ready for review September 11, 2026 19:18
@dielduarte
dielduarte merged commit 6e8ad92 into main Sep 14, 2026
3 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.

3 participants