cURL
curl --request POST \
--url https://api.helohq.com/send/broadcast \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": {
"email": "<string>",
"name": "<string>"
},
"template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"inlineStyles": true,
"data": {}
},
"messages": [
{
"to": [
{
"email": "<string>",
"name": "<string>"
}
],
"cc": [
{
"email": "<string>",
"name": "<string>"
}
],
"bcc": [
{
"email": "<string>",
"name": "<string>"
}
],
"tags": [
"<string>"
],
"headers": {},
"metadata": {},
"data": {}
}
],
"replyTo": [
{
"email": "<string>",
"name": "<string>"
}
],
"tracking": {
"opens": true,
"links": true
},
"attachments": [
{
"content": "aSDinaTvuI8gbWludGxpZnk=",
"fileName": "<string>",
"contentId": "<string>",
"contentType": "<string>"
}
],
"tags": [
"<string>"
],
"headers": {},
"metadata": {}
}
'using HeloEmail.Sdk;
using HeloEmail.Sdk.Sending;
var sendBroadcast = await helo.Sending.SendBroadcast(new SendBroadcastRequest
{
From = new MailAddress { Email = "test@example.com", Name = "test-name" },
Template = new SendBroadcastRequestTemplate
{
Subject = "Hello, {{name}}",
Html = "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>",
Text = "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.",
InlineStyles = true,
},
Tags = ["test-tag"],
Messages = [
new SendBroadcastRequestMessage
{
To = [new MailAddress { Email = "test@example.com", Name = "test-name" }],
Tags = ["test-tag"],
},
],
}, channelId: "550e8400-e29b-41d4-a716-446655440000", idempotencyKey: "test-idempotencyKey");Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
send_broadcast_request = Helo::SendBroadcastRequest.new(
from: { email: "test@example.com", name: "test-name" },
reply_to: [{ email: "test@example.com", name: "test-name" }],
template: { subject: "Hello, {{name}}", html: "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>", text: "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.", inline_styles: true, data: {} },
tracking: { opens: true, links: true },
attachments: [{ content: "SGVsbG8gd29ybGQ=", content_id: "test-contentId", content_type: "test-contentType", file_name: "test-fileName", disposition: Helo::AttachmentDisposition::ATTACHMENT }],
tags: ["example1", "example2"],
headers: {},
metadata: {},
messages: [{ to: [{ email: "test@example.com", name: "test-name" }], cc: [{ email: "test@example.com", name: "test-name" }], bcc: [{ email: "test@example.com", name: "test-name" }], tags: ["example1", "example2"], headers: {}, metadata: {}, data: {} }]
)
Helo::Sending.send_broadcast(send_broadcast_request, channel_id: "550e8400-e29b-41d4-a716-446655440000", idempotency_key: "example")import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
send_broadcast = client.sending.send_broadcast(
from_={"email": "test@example.com", "name": "test-name"},
template={
"subject": "Hello, {{name}}",
"html": "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>",
"text": "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.",
"inlineStyles": True,
},
messages=[
{
"to": [{"email": "test@example.com", "name": "test-name"}],
"tags": ["test-tag"],
},
],
reply_to=[{"email": "test@example.com", "name": "test-name"}],
tracking={"opens": True, "links": True},
attachments=[
{
"content": "SGVsbG8gd29ybGQ=",
"contentId": "test-contentId",
"contentType": "test-contentType",
"fileName": "test-fileName",
"disposition": helo.AttachmentDisposition.ATTACHMENT,
},
],
tags=["test-tag"],
channel_id="550e8400-e29b-41d4-a716-446655440000",
idempotency_key="test-idempotency_key",
)package main
import (
"context"
"log"
"os"
"github.com/helo-email/helo-sdk-go"
)
func main() {
client := helo.NewHelo(os.Getenv("HELO_API_KEY"))
ctx := context.Background()
params := &helo.SendBroadcastRequest{
From: helo.MailAddress{Email: "test@example.com", Name: "test-name"},
Template: helo.SendBroadcastRequestTemplate{Subject: "Hello, {{name}}", Html: "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>", Text: "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.", InlineStyles: helo.Bool(true)},
Tags: []string{"example1", "example2"},
Messages: []helo.SendBroadcastRequestMessage{{To: []helo.MailAddress{{Email: "test@example.com", Name: "test-name"}}, Tags: []string{"example1", "example2"}}},
}
opts := &helo.SendingSendBroadcastOptions{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
IdempotencyKey: "example",
}
result, err := client.Sending.SendBroadcast(ctx, params, opts)
if err != nil {
log.Fatal(err)
}
_ = result
}import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.sending.sendBroadcast(
{
from: { email: "test@example.com", name: "test-name" },
replyTo: [{ email: "test@example.com", name: "test-name" }],
template: {
subject: "Hello, {{name}}",
html: "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>",
text: "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.",
inlineStyles: true,
data: {},
},
tracking: { opens: true, links: true },
attachments: [
{
content: "test-content",
contentId: "test-contentId",
contentType: "test-contentType",
fileName: "test-fileName",
disposition: Helo.AttachmentDisposition.ATTACHMENT,
},
],
tags: ["example1", "example2"],
headers: {},
metadata: {},
messages: [
{
to: [{ email: "test@example.com", name: "test-name" }],
cc: [{ email: "test@example.com", name: "test-name" }],
bcc: [{ email: "test@example.com", name: "test-name" }],
tags: ["example1", "example2"],
headers: {},
metadata: {},
data: {},
},
],
},
{
channelId: "550e8400-e29b-41d4-a716-446655440000",
idempotencyKey: "example",
},
);use HeloEmail\Sdk\Helo;
use HeloEmail\Sdk\Models\AttachmentDisposition;
$helo = new Helo(); // reads HELO_API_KEY from the environment
$sendBroadcast = $helo->sending->sendBroadcast(
from: ['email' => 'test@example.com', 'name' => 'test-name'],
template: [
'subject' => 'Hello, {{name}}',
'html' => '<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>',
'text' => 'Hi {{name}}. This is a broadcast, delivered with <3 by Helo.',
'inlineStyles' => true,
],
messages: [['to' => [['email' => 'test@example.com', 'name' => 'test-name']], 'tags' => ['test-tag']]],
replyTo: [['email' => 'test@example.com', 'name' => 'test-name']],
tracking: ['opens' => true, 'links' => true],
attachments: [
[
'content' => 'SGVsbG8gd29ybGQ=',
'contentId' => 'test-contentId',
'contentType' => 'test-contentType',
'fileName' => 'test-fileName',
'disposition' => AttachmentDisposition::Attachment,
],
],
tags: ['test-tag'],
channelId: '550e8400-e29b-41d4-a716-446655440000',
idempotencyKey: 'test-idempotencyKey',
);{
"status": "<string>",
"broadcastId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}Sending
Send a broadcast
Sends a broadcast of multiple messages for marketing or announcement purposes.
POST
/
send
/
broadcast
cURL
curl --request POST \
--url https://api.helohq.com/send/broadcast \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": {
"email": "<string>",
"name": "<string>"
},
"template": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"inlineStyles": true,
"data": {}
},
"messages": [
{
"to": [
{
"email": "<string>",
"name": "<string>"
}
],
"cc": [
{
"email": "<string>",
"name": "<string>"
}
],
"bcc": [
{
"email": "<string>",
"name": "<string>"
}
],
"tags": [
"<string>"
],
"headers": {},
"metadata": {},
"data": {}
}
],
"replyTo": [
{
"email": "<string>",
"name": "<string>"
}
],
"tracking": {
"opens": true,
"links": true
},
"attachments": [
{
"content": "aSDinaTvuI8gbWludGxpZnk=",
"fileName": "<string>",
"contentId": "<string>",
"contentType": "<string>"
}
],
"tags": [
"<string>"
],
"headers": {},
"metadata": {}
}
'using HeloEmail.Sdk;
using HeloEmail.Sdk.Sending;
var sendBroadcast = await helo.Sending.SendBroadcast(new SendBroadcastRequest
{
From = new MailAddress { Email = "test@example.com", Name = "test-name" },
Template = new SendBroadcastRequestTemplate
{
Subject = "Hello, {{name}}",
Html = "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>",
Text = "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.",
InlineStyles = true,
},
Tags = ["test-tag"],
Messages = [
new SendBroadcastRequestMessage
{
To = [new MailAddress { Email = "test@example.com", Name = "test-name" }],
Tags = ["test-tag"],
},
],
}, channelId: "550e8400-e29b-41d4-a716-446655440000", idempotencyKey: "test-idempotencyKey");Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
send_broadcast_request = Helo::SendBroadcastRequest.new(
from: { email: "test@example.com", name: "test-name" },
reply_to: [{ email: "test@example.com", name: "test-name" }],
template: { subject: "Hello, {{name}}", html: "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>", text: "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.", inline_styles: true, data: {} },
tracking: { opens: true, links: true },
attachments: [{ content: "SGVsbG8gd29ybGQ=", content_id: "test-contentId", content_type: "test-contentType", file_name: "test-fileName", disposition: Helo::AttachmentDisposition::ATTACHMENT }],
tags: ["example1", "example2"],
headers: {},
metadata: {},
messages: [{ to: [{ email: "test@example.com", name: "test-name" }], cc: [{ email: "test@example.com", name: "test-name" }], bcc: [{ email: "test@example.com", name: "test-name" }], tags: ["example1", "example2"], headers: {}, metadata: {}, data: {} }]
)
Helo::Sending.send_broadcast(send_broadcast_request, channel_id: "550e8400-e29b-41d4-a716-446655440000", idempotency_key: "example")import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
send_broadcast = client.sending.send_broadcast(
from_={"email": "test@example.com", "name": "test-name"},
template={
"subject": "Hello, {{name}}",
"html": "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>",
"text": "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.",
"inlineStyles": True,
},
messages=[
{
"to": [{"email": "test@example.com", "name": "test-name"}],
"tags": ["test-tag"],
},
],
reply_to=[{"email": "test@example.com", "name": "test-name"}],
tracking={"opens": True, "links": True},
attachments=[
{
"content": "SGVsbG8gd29ybGQ=",
"contentId": "test-contentId",
"contentType": "test-contentType",
"fileName": "test-fileName",
"disposition": helo.AttachmentDisposition.ATTACHMENT,
},
],
tags=["test-tag"],
channel_id="550e8400-e29b-41d4-a716-446655440000",
idempotency_key="test-idempotency_key",
)package main
import (
"context"
"log"
"os"
"github.com/helo-email/helo-sdk-go"
)
func main() {
client := helo.NewHelo(os.Getenv("HELO_API_KEY"))
ctx := context.Background()
params := &helo.SendBroadcastRequest{
From: helo.MailAddress{Email: "test@example.com", Name: "test-name"},
Template: helo.SendBroadcastRequestTemplate{Subject: "Hello, {{name}}", Html: "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>", Text: "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.", InlineStyles: helo.Bool(true)},
Tags: []string{"example1", "example2"},
Messages: []helo.SendBroadcastRequestMessage{{To: []helo.MailAddress{{Email: "test@example.com", Name: "test-name"}}, Tags: []string{"example1", "example2"}}},
}
opts := &helo.SendingSendBroadcastOptions{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
IdempotencyKey: "example",
}
result, err := client.Sending.SendBroadcast(ctx, params, opts)
if err != nil {
log.Fatal(err)
}
_ = result
}import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.sending.sendBroadcast(
{
from: { email: "test@example.com", name: "test-name" },
replyTo: [{ email: "test@example.com", name: "test-name" }],
template: {
subject: "Hello, {{name}}",
html: "<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>",
text: "Hi {{name}}. This is a broadcast, delivered with <3 by Helo.",
inlineStyles: true,
data: {},
},
tracking: { opens: true, links: true },
attachments: [
{
content: "test-content",
contentId: "test-contentId",
contentType: "test-contentType",
fileName: "test-fileName",
disposition: Helo.AttachmentDisposition.ATTACHMENT,
},
],
tags: ["example1", "example2"],
headers: {},
metadata: {},
messages: [
{
to: [{ email: "test@example.com", name: "test-name" }],
cc: [{ email: "test@example.com", name: "test-name" }],
bcc: [{ email: "test@example.com", name: "test-name" }],
tags: ["example1", "example2"],
headers: {},
metadata: {},
data: {},
},
],
},
{
channelId: "550e8400-e29b-41d4-a716-446655440000",
idempotencyKey: "example",
},
);use HeloEmail\Sdk\Helo;
use HeloEmail\Sdk\Models\AttachmentDisposition;
$helo = new Helo(); // reads HELO_API_KEY from the environment
$sendBroadcast = $helo->sending->sendBroadcast(
from: ['email' => 'test@example.com', 'name' => 'test-name'],
template: [
'subject' => 'Hello, {{name}}',
'html' => '<html><body><h1>Hi {{name}}.</h1><p>This is a broadcast, delivered with <3 by Helo.</p></body></html>',
'text' => 'Hi {{name}}. This is a broadcast, delivered with <3 by Helo.',
'inlineStyles' => true,
],
messages: [['to' => [['email' => 'test@example.com', 'name' => 'test-name']], 'tags' => ['test-tag']]],
replyTo: [['email' => 'test@example.com', 'name' => 'test-name']],
tracking: ['opens' => true, 'links' => true],
attachments: [
[
'content' => 'SGVsbG8gd29ybGQ=',
'contentId' => 'test-contentId',
'contentType' => 'test-contentType',
'fileName' => 'test-fileName',
'disposition' => AttachmentDisposition::Attachment,
],
],
tags: ['test-tag'],
channelId: '550e8400-e29b-41d4-a716-446655440000',
idempotencyKey: 'test-idempotencyKey',
);{
"status": "<string>",
"broadcastId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"instance": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"requestId": "<string>",
"errors": {}
}Authorizations
Headers
Body
application/json