cURL
curl --request POST \
--url https://api.helohq.com/send/transactional/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"from": {
"email": "<string>",
"name": "<string>"
},
"to": [
{
"email": "<string>",
"name": "<string>"
}
],
"cc": [
{
"email": "<string>",
"name": "<string>"
}
],
"bcc": [
{
"email": "<string>",
"name": "<string>"
}
],
"replyTo": [
{
"email": "<string>",
"name": "<string>"
}
],
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"template": {
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"inlineStyles": true,
"data": {}
},
"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 sendMessageBatch = await helo.Sending.SendTransactionalBatch(new SendMessageBatchRequest
{
Requests = [
new SendMessageRequest
{
From = new MailAddress { Email = "from@yourdomain.com", Name = "From name" },
To = [new MailAddress { Email = "to@example.com", Name = "To name" }],
Subject = "Hello from Helo",
Html = "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>",
Text = "This is a test message, delivered with <3 by Helo.",
Tags = ["welcome", "onboarding"],
},
],
}, channelId: "550e8400-e29b-41d4-a716-446655440000", idempotencyKey: "test-idempotencyKey");Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
send_message_batch_request = Helo::SendMessageBatchRequest.new(
requests: [Helo::SendMessageRequest.new(to: [], cc: [], bcc: [], reply_to: [], subject: "Hello from Helo", html: "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>", text: "This is a test message, delivered with <3 by Helo.", template: {}, tracking: {}, attachments: [], tags: ["welcome", "onboarding"], headers: {}, metadata: {})]
)
Helo::Sending.send_transactional_batch(send_message_batch_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_message_batch = client.sending.send_transactional_batch(
requests=[
{
"from": {"email": "from@yourdomain.com", "name": "From name"},
"to": [{"email": "to@example.com", "name": "To name"}],
"subject": "Hello from Helo",
"html": "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>",
"text": "This is a test message, delivered with <3 by Helo.",
"tags": ["welcome", "onboarding"],
},
],
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.SendMessageBatchRequest{
Requests: []helo.SendMessageRequest{{From: helo.MailAddress{Email: "from@yourdomain.com", Name: "From name"}, To: []helo.MailAddress{{Email: "to@example.com", Name: "To name"}}, Subject: "Hello from Helo", Html: "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>", Text: "This is a test message, delivered with <3 by Helo.", Tags: []string{"welcome", "onboarding"}}},
}
opts := &helo.SendingSendTransactionalBatchOptions{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
IdempotencyKey: "example",
}
result, err := client.Sending.SendTransactionalBatch(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.sendTransactionalBatch(
{
requests: [
{
from: { email: "from@yourdomain.com", name: "From name" },
to: [{ email: "to@example.com", name: "To name" }],
cc: [{ email: "cc@example.com", name: "Cc name" }],
bcc: [{ email: "bcc@example.com", name: "Bcc name" }],
replyTo: [{ email: "reply-to@example.com", name: "Reply-To name" }],
subject: "Hello from Helo",
html: "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>",
text: "This is a test message, delivered with <3 by Helo.",
template: {
subject: "test-subject",
html: "test-html",
text: "test-text",
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: ["welcome", "onboarding"],
headers: {},
metadata: {},
},
],
},
{
channelId: "550e8400-e29b-41d4-a716-446655440000",
idempotencyKey: "example",
},
);{
"responses": [
{
"status": "<string>",
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"suppressions": [
"<string>"
]
}
]
}{
"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 transactional emails in batch
Sends multiple transactional emails in a single API request for better performance.
POST
/
send
/
transactional
/
batch
cURL
curl --request POST \
--url https://api.helohq.com/send/transactional/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requests": [
{
"from": {
"email": "<string>",
"name": "<string>"
},
"to": [
{
"email": "<string>",
"name": "<string>"
}
],
"cc": [
{
"email": "<string>",
"name": "<string>"
}
],
"bcc": [
{
"email": "<string>",
"name": "<string>"
}
],
"replyTo": [
{
"email": "<string>",
"name": "<string>"
}
],
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"template": {
"subject": "<string>",
"html": "<string>",
"text": "<string>",
"inlineStyles": true,
"data": {}
},
"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 sendMessageBatch = await helo.Sending.SendTransactionalBatch(new SendMessageBatchRequest
{
Requests = [
new SendMessageRequest
{
From = new MailAddress { Email = "from@yourdomain.com", Name = "From name" },
To = [new MailAddress { Email = "to@example.com", Name = "To name" }],
Subject = "Hello from Helo",
Html = "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>",
Text = "This is a test message, delivered with <3 by Helo.",
Tags = ["welcome", "onboarding"],
},
],
}, channelId: "550e8400-e29b-41d4-a716-446655440000", idempotencyKey: "test-idempotencyKey");Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
send_message_batch_request = Helo::SendMessageBatchRequest.new(
requests: [Helo::SendMessageRequest.new(to: [], cc: [], bcc: [], reply_to: [], subject: "Hello from Helo", html: "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>", text: "This is a test message, delivered with <3 by Helo.", template: {}, tracking: {}, attachments: [], tags: ["welcome", "onboarding"], headers: {}, metadata: {})]
)
Helo::Sending.send_transactional_batch(send_message_batch_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_message_batch = client.sending.send_transactional_batch(
requests=[
{
"from": {"email": "from@yourdomain.com", "name": "From name"},
"to": [{"email": "to@example.com", "name": "To name"}],
"subject": "Hello from Helo",
"html": "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>",
"text": "This is a test message, delivered with <3 by Helo.",
"tags": ["welcome", "onboarding"],
},
],
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.SendMessageBatchRequest{
Requests: []helo.SendMessageRequest{{From: helo.MailAddress{Email: "from@yourdomain.com", Name: "From name"}, To: []helo.MailAddress{{Email: "to@example.com", Name: "To name"}}, Subject: "Hello from Helo", Html: "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>", Text: "This is a test message, delivered with <3 by Helo.", Tags: []string{"welcome", "onboarding"}}},
}
opts := &helo.SendingSendTransactionalBatchOptions{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
IdempotencyKey: "example",
}
result, err := client.Sending.SendTransactionalBatch(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.sendTransactionalBatch(
{
requests: [
{
from: { email: "from@yourdomain.com", name: "From name" },
to: [{ email: "to@example.com", name: "To name" }],
cc: [{ email: "cc@example.com", name: "Cc name" }],
bcc: [{ email: "bcc@example.com", name: "Bcc name" }],
replyTo: [{ email: "reply-to@example.com", name: "Reply-To name" }],
subject: "Hello from Helo",
html: "<html><body><h1>Hi there, new friend.</h1><p>This is a test message, delivered with <3 by Helo. </p></body></html>",
text: "This is a test message, delivered with <3 by Helo.",
template: {
subject: "test-subject",
html: "test-html",
text: "test-text",
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: ["welcome", "onboarding"],
headers: {},
metadata: {},
},
],
},
{
channelId: "550e8400-e29b-41d4-a716-446655440000",
idempotencyKey: "example",
},
);{
"responses": [
{
"status": "<string>",
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"suppressions": [
"<string>"
]
}
]
}{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Used to specify a channel ID for sending when using an account-level API credential.
A unique identifier used to prevent duplicate messages being sent when retrying failed requests.
Maximum string length:
256Body
application/json
Show child attributes
Show child attributes
Response
OK
- Option 1
- Option 2
Show child attributes
Show child attributes