curl --request POST \
--url https://{notifuseDomain}/api/broadcasts.create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"workspace_id": "ws_1234567890",
"name": "Spring Newsletter 2024",
"audience": {
"lists": [
"newsletter",
"customers"
],
"segments": [
"premium_users"
],
"exclude_unsubscribed": true,
"skip_duplicate_emails": true
},
"schedule": {
"is_scheduled": true,
"scheduled_date": "2024-03-15",
"scheduled_time": "10:30",
"timezone": "America/New_York",
"use_recipient_timezone": false
},
"test_settings": {
"enabled": true,
"sample_percentage": 20,
"auto_send_winner": true,
"auto_send_winner_metric": "open_rate",
"test_duration_hours": 24,
"variations": [
{
"variation_name": "Variation A",
"template_id": "template_variant_a",
"metrics": {
"recipients": 123,
"delivered": 123,
"opens": 123,
"clicks": 123,
"bounced": 123,
"complained": 123,
"unsubscribed": 123
},
"template": {}
}
]
},
"tracking_enabled": true,
"utm_parameters": {
"source": "newsletter",
"medium": "email",
"campaign": "spring_2024",
"term": "<string>",
"content": "<string>"
},
"metadata": {}
}'