SOLEN

Quickstart

From nothing to a delivered email in five minutes. You need a project in the dashboard and Node 18+ in your application.

1 - Create a project and an API key

In the dashboard, create a project for your application (or open an existing one). Under API Keys, generate a key. The full key is shown once- copy it into your application's environment:

.envbash
SOLEN_API_KEY=solen_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2 - Create a template

Under Templates, create one - say welcome-email - with a subject and HTML body. Use {{variables}} anywhere:

Template: welcome-emailhtml
Subject: Welcome to {{school}}, {{name}}!

<h1>Hi {{name}},</h1>
<p>Your {{school}} account is ready.</p>

Preview it with sample variables, then use Test send to deliver one to yourself.

3 - Install the SDK

npm install solen-sdk

4 - Send

send.tstypescript
import { EmailClient } from "solen-sdk";

const mail = new EmailClient({ apiKey: process.env.SOLEN_API_KEY! });

const result = await mail.send({
  template: "welcome-email",
  to: "student@example.com",
  variables: { name: "Priya", school: "Northside High" },
});

console.log(result);
// { id: "log_…", status: "SUCCESS", messageId: "…" }

The returned id is the platform log id - find the send under Logs in your project, along with its status, provider response, and rendered recipient.

Troubleshooting

SymptomLikely cause
UNAUTHORIZEDKey is wrong, revoked, or missing the Bearer prefix (the SDK adds it for you).
TEMPLATE_NOT_FOUNDThe slug doesn't exist in this project - keys are project-scoped.
TEMPLATE_DISABLEDThe template is toggled off in the dashboard.
Variables render as {{name}}Variable missing from the variables object - names are case-sensitive.

Every failed request still appears in Logs with the exact error message.