Home / Companies / Resend / Documentation / Page Details

Create Broadcast - Resend

Documentation page from Resend

Page Details
Company
Word Count
843
Language
English
Contains Code
Unknown
Date Parsed
2026-03-25
Extracted Text

Skip to main content[Resend home page![light logo](https://mintcdn.com/resend/w4S5Jr48MiquhhSH/logo-black.svg?fit=max&auto=format&n=w...

Sign up or sign in to view the full extracted text.

Analysis

Location: In the Node.js code example (both instances), "Create a draft broadcast" section

Context:

// Create a draft broadcast
const { data, error } = await resend.broadcasts.create({...});

// Create and send immediately
const { data, error } = await resend.broadcasts.create({...});

// Create and schedule
const { data, error } = await resend.broadcasts.create({...});

Issue: >>>const { data, error }<<< is declared three times in the same code block using const

Problem: In JavaScript, const declarations cannot be redeclared in the same scope. Declaring const { data, error } three times in the same block will throw a SyntaxError: Identifier 'data' has already been declared at runtime.

Fix: Use unique variable names for each declaration, for example:

const { data: draftData, error: draftError } = await resend.broadcasts.create({...});
const { data: sendData, error: sendError } = await resend.broadcasts.create({...});
const { data: scheduleData, error: scheduleError } = await resend.broadcasts.create({...});

Or use let with separate variable names, or wrap each example in its own block scope with {}.

Product Messaging

No product messaging analysis available for this page.

Competitive Analysis

No competitive analysis available for this page.