Skip to main content
Retrieves detailed information about a specific broadcast.

Methods

Get

Get(broadcastId string) (Broadcast, error)
Retrieves a broadcast using the default background context.

GetWithContext

GetWithContext(ctx context.Context, broadcastId string) (Broadcast, error)
Retrieves a broadcast with a custom context for cancellation and timeout control.

Parameters

broadcastId
string
required
The unique identifier of the broadcast to retrieve.

Response

object
string
The object type, always broadcast.
id
string
The unique identifier for the broadcast.
name
string
The name of the broadcast.
segment_id
string
The ID of the segment this broadcast is sent to.
from
string
The sender email address.
subject
string
The email subject line.
reply_to
string[]
An array of reply-to email addresses.
html
string
The HTML content of the email.
text
string
The plain text content of the email.
preview_text
string
The preview text that appears in email clients.
status
string
The current status of the broadcast (e.g., “draft”, “scheduled”, “sent”).
created_at
string
ISO 8601 timestamp of when the broadcast was created.
scheduled_at
string
ISO 8601 timestamp of when the broadcast is scheduled to be sent.
sent_at
string
ISO 8601 timestamp of when the broadcast was sent.
audience_id
string
deprecated
Deprecated. Use segment_id instead.

Example

package main

import (
    "fmt"
    "github.com/resend/resend-go/v2"
)

func main() {
    client := resend.NewClient("re_123456789")

    broadcast, err := client.Broadcasts.Get("brd_123456")
    if err != nil {
        panic(err)
    }

    fmt.Println("Broadcast Name:", broadcast.Name)
    fmt.Println("Status:", broadcast.Status)
    fmt.Println("Created At:", broadcast.CreatedAt)
    
    if broadcast.ScheduledAt != "" {
        fmt.Println("Scheduled At:", broadcast.ScheduledAt)
    }
    
    if broadcast.SentAt != "" {
        fmt.Println("Sent At:", broadcast.SentAt)
    }
}

Build docs developers (and LLMs) love