feat(broadcasts): add duplicate endpoint

Merged
GA
2mo ago
+40-5

This ports resend.broadcasts.duplicate(id) from the Node SDK: POST /broadcasts/{id}/duplicate, added to the spec in resend/resend-openapi#115, which is still open. The method sits next to cancel and returns DuplicateBroadcastResponse { id }, the id of the new draft copy. The release carries 0.33.0 in its own commit, with the CHANGELOG entry and its link reference alongside the version, the way #109 shipped.

Claude called the new method against staging from a scratch project pointed at https://api.resend-staging.com, confirmed the returned id differs from the source, then fetched and deleted the copy over HTTP.

source id:     e6bd3843-3cc7-4c0d-b7fd-e01cbb514a16
duplicated id: 3a7fa0a0-f285-431b-88ed-2a47c1b4b082
differs:       true
DuplicateBroadcastResponse { id: BroadcastId("3a7fa0a0-f285-431b-88ed-2a47c1b4b082") }
GET /broadcasts/3a7fa0a0-f285-431b-88ed-2a47c1b4b082
{"object":"broadcast","id":"3a7fa0a0-f285-431b-88ed-2a47c1b4b082","name":"Untitled (copy)","audience_id":"7ce6a143-b076-4291-80c3-445042a4b7d9","from":"Test <test@resend.cloud>","subject":"Another day another test","reply_to":null,"preview_text":null,"status":"draft","created_at":"2026-09-11 17:43:06.097983+00","scheduled_at":null,"sent_at":null,"html":"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html dir=\"ltr\" lang=\"en\"><head><meta content=\"width=device-width\" name=\"viewport\"/><meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\"/><meta name=\"x-apple-disable-message-reformatting\"/><meta content=\"IE=edge\" http-equiv=\"X-UA-Compatible\"/><meta name=\"x-apple-disable-message-reformatting\"/><meta content=\"telephone=no,address=no,email=no,date=no,url=no\" name=\"format-detection\"/><style>@media (prefers-color-scheme: dark){li::marker{color:#c4c4c4}}</style></head><body dir=\"ltr\" lang=\"en\"><!--$--><!--html--><!--head--><!--body--><table border=\"0\" width=\"100%\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\" align=\"center\"><tbody><tr><td dir=\"ltr\" lang=\"en\" style=\"font-family:-apple-system, BlinkMacSystemFont, &#x27;Segoe UI&#x27;, &#x27;Roboto&#x27;, &#x27;Oxygen&#x27;, &#x27;Ubuntu&#x27;, &#x27;Cantarell&#x27;, &#x27;Fira Sans&#x27;, &#x27;Droid Sans&#x27;, &#x27;Helvetica Neue&#x27;, sans-serif;font-size:1em;min-height:100%;line-height:155%\"><table align=\"center\" width=\"100%\" border=\"0\" cellPadding=\"0\" cellSpacing=\"0\" role=\"presentation\" style=\"max-width:600px;align:center;width:100%;border-radius:0px;line-height:155%\"><tbody><tr style=\"width:100%\"><td style=\"padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px\"><p style=\"margin:0;padding:0;font-size:1em;padding-top:0.5em;padding-bottom:0.5em\">what&#x27;s up my friend!</p><p style=\"margin:0;padding:0;font-size:1em;padding-top:0.5em;padding-bottom:0.5em\">something here</p><p style=\"margin:0;padding:0;font-size:1em;padding-top:0.5em;padding-bottom:0.5em\">another there</p></td></tr></tbody></table></td></tr></tbody></table><!--/$--></body></html>","text":"what's up my friend!\n\nsomething here\n\nanother there","topic_id":null,"segment_id":"7ce6a143-b076-4291-80c3-445042a4b7d9","headers":null}
DELETE /broadcasts/3a7fa0a0-f285-431b-88ed-2a47c1b4b082
HTTP/1.1 200 OK
{"object":"broadcast","id":"3a7fa0a0-f285-431b-88ed-2a47c1b4b082","deleted":true}

🤖 Generated with Claude Code