cURL
curl --request POST \
--url https://api.helohq.com/templates/{id}/render \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inlineStyles": true,
"data": {}
}
'using HeloEmail.Sdk.Templates;
var renderTemplate = await helo.Templates.Render("550e8400-e29b-41d4-a716-446655440000", new RenderTemplateRequest
{
InlineStyles = true,
});Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
id = "550e8400-e29b-41d4-a716-446655440000"
render_template_request = Helo::RenderTemplateRequest.new(
inline_styles: true,
data: {}
)
Helo::Templates.render(id, render_template_request)import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
render_template = client.templates.render(
"550e8400-e29b-41d4-a716-446655440000",
inline_styles=True,
)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.RenderTemplateRequest{
InlineStyles: helo.Bool(true),
}
result, err := client.Templates.Render(ctx, "550e8400-e29b-41d4-a716-446655440000", params)
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.templates.render(
"550e8400-e29b-41d4-a716-446655440000",
{
inlineStyles: true,
data: {},
},
);{
"subject": "<string>",
"html": "<string>",
"text": "<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": {}
}{
"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": {}
}Templates
Render a template
Renders a saved template with sample data, to preview the output before sending.
POST
/
templates
/
{id}
/
render
cURL
curl --request POST \
--url https://api.helohq.com/templates/{id}/render \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inlineStyles": true,
"data": {}
}
'using HeloEmail.Sdk.Templates;
var renderTemplate = await helo.Templates.Render("550e8400-e29b-41d4-a716-446655440000", new RenderTemplateRequest
{
InlineStyles = true,
});Helo.configure do |config|
config.api_key = ENV.fetch("HELO_API_KEY")
end
id = "550e8400-e29b-41d4-a716-446655440000"
render_template_request = Helo::RenderTemplateRequest.new(
inline_styles: true,
data: {}
)
Helo::Templates.render(id, render_template_request)import sdk_helo_email as helo
client = helo.Helo() # reads HELO_API_KEY from the environment
render_template = client.templates.render(
"550e8400-e29b-41d4-a716-446655440000",
inline_styles=True,
)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.RenderTemplateRequest{
InlineStyles: helo.Bool(true),
}
result, err := client.Templates.Render(ctx, "550e8400-e29b-41d4-a716-446655440000", params)
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.templates.render(
"550e8400-e29b-41d4-a716-446655440000",
{
inlineStyles: true,
data: {},
},
);{
"subject": "<string>",
"html": "<string>",
"text": "<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": {}
}{
"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.
Path Parameters
Body
application/json