Broadcasts
Send Broadcast
Send now, or schedule with scheduled_at.
POST
/broadcasts/{broadcast_id}/sendPath Parameters
broadcast_idstringrequiredBroadcast ID.
Body Parameters
scheduled_atstringWhen to send, e.g.
in 1 hour.import { Resend } from 'resend';
const client = new Resend('pw_xxxxxxxxx');
const { data, error } = await client.broadcasts.send('{broadcast_id}', { scheduledAt: 'in 1 hour' });import requests
res = requests.post(
"https://post-waves.com/broadcasts/{broadcast_id}/send",
headers={"Authorization": "Bearer pw_xxxxxxxxx"},
json={
"scheduled_at": "in 1 hour"
},
)
print(res.json())<?php
$ch = curl_init('https://post-waves.com/broadcasts/{broadcast_id}/send');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer pw_xxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'scheduled_at' => 'in 1 hour',
]),
]);
$response = json_decode(curl_exec($ch), true);require "net/http"
require "json"
uri = URI("https://post-waves.com/broadcasts/{broadcast_id}/send")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer pw_xxxxxxxxx"
req["Content-Type"] = "application/json"
req.body = {
scheduled_at: "in 1 hour"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
puts JSON.parse(res.body)package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"scheduled_at":"in 1 hour"}`)
req, _ := http.NewRequest("POST", "https://post-waves.com/broadcasts/{broadcast_id}/send", body)
req.Header.Set("Authorization", "Bearer pw_xxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}curl -X POST 'https://post-waves.com/broadcasts/{broadcast_id}/send' \
-H 'Authorization: Bearer pw_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{"scheduled_at":"in 1 hour"}'Try itPOST
/broadcasts/%7Bbroadcast_id%7D/sendNo key yet? Create one in the dashboard.