Ruby
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
send_message_request = Helo::SendMessageRequest.new(
from: Helo::MailAddress.new(email: "from@yourdomain.com", name: "From name"),
to: [Helo::MailAddress.new(email: "to@example.com", name: "To name")],
cc: [Helo::MailAddress.new(email: "cc@example.com", name: "Cc name")],
bcc: [Helo::MailAddress.new(email: "bcc@example.com", name: "Bcc name")],
reply_to: [Helo::MailAddress.new(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: {},
tracking: {},
attachments: [Helo::Attachment.new(content: "test-content", content_id: "test-contentId", content_type: "test-contentType", file_name: "test-fileName", disposition: Helo::AttachmentDisposition::ATTACHMENT)],
tags: ["welcome", "onboarding"],
headers: {},
metadata: {}
)
Helo::Sending.transactional(send_message_request, channel_id: "550e8400-e29b-41d4-a716-446655440000", idempotency_key: "example")import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.sending.transactional(
{
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",
},
);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.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.SendingTransactionalOptions{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
IdempotencyKey: "example",
}
result, err := client.Sending.Transactional(ctx, params, opts)
if err != nil {
log.Fatal(err)
}
_ = result
}using HeloEmail.Sdk;
using HeloEmail.Sdk.Sending;
var response = await helo.Sending.Transactional(new SendMessageRequest
{
From = new MailAddress { Email = "from@yourdomain.com", Name = "Sender" },
To = [new MailAddress { Email = "to@example.com" }],
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: "your-channel-id");import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
response = client.sending.transactional(
from_={"email": "from@yourdomain.com", "name": "From name"},
to=[{"email": "to@example.com"}],
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="your-channel-id",
){
"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 a transactional email
Sends a single transactional email such as receipts, confirmations, or notifications.
POST
/
send
/
transactional
Ruby
Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
send_message_request = Helo::SendMessageRequest.new(
from: Helo::MailAddress.new(email: "from@yourdomain.com", name: "From name"),
to: [Helo::MailAddress.new(email: "to@example.com", name: "To name")],
cc: [Helo::MailAddress.new(email: "cc@example.com", name: "Cc name")],
bcc: [Helo::MailAddress.new(email: "bcc@example.com", name: "Bcc name")],
reply_to: [Helo::MailAddress.new(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: {},
tracking: {},
attachments: [Helo::Attachment.new(content: "test-content", content_id: "test-contentId", content_type: "test-contentType", file_name: "test-fileName", disposition: Helo::AttachmentDisposition::ATTACHMENT)],
tags: ["welcome", "onboarding"],
headers: {},
metadata: {}
)
Helo::Sending.transactional(send_message_request, channel_id: "550e8400-e29b-41d4-a716-446655440000", idempotency_key: "example")import Helo from "@helo-email/sdk";
const apiKey = process.env.HELO_API_KEY;
const helo = new Helo(apiKey);
const result = await helo.sending.transactional(
{
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",
},
);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.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.SendingTransactionalOptions{
ChannelID: "550e8400-e29b-41d4-a716-446655440000",
IdempotencyKey: "example",
}
result, err := client.Sending.Transactional(ctx, params, opts)
if err != nil {
log.Fatal(err)
}
_ = result
}using HeloEmail.Sdk;
using HeloEmail.Sdk.Sending;
var response = await helo.Sending.Transactional(new SendMessageRequest
{
From = new MailAddress { Email = "from@yourdomain.com", Name = "Sender" },
To = [new MailAddress { Email = "to@example.com" }],
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: "your-channel-id");import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
response = client.sending.transactional(
from_={"email": "from@yourdomain.com", "name": "From name"},
to=[{"email": "to@example.com"}],
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="your-channel-id",
){
"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
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I