Official npm package: reloop-email.
You need two things:
- API key — create one in your Reloop account
- Verified domain — add and verify a sending domain; use it in the
fromaddress
For setup details and the full API reference, see reloop.sh/docs.
npm install reloop-emailConstruction takes a required apiKey and an optional baseUrl (defaults to https://reloop.sh).
import { Reloop } from "reloop-email";
const reloop = new Reloop({ apiKey: "rl_your_api_key_here" });
// Optional custom host:
// const reloop = new Reloop({ apiKey: "rl_...", baseUrl: "https://reloop.sh" });HTTP helpers return { response, error } — they do not throw for API or network failures.
Invalid arguments (e.g. empty key id or name) throw ReloopValidationError before any network request.
const { response, error } = await reloop.mail.send({
from: "Reloop <hello@your-verified-domain.com>",
to: "user@example.com",
subject: "Welcome to Reloop",
html: "<p>Thanks for signing up.</p>",
text: "Thanks for signing up.",
});
if (error) throw error;
console.log(response.messageId, response.id);Manage keys with reloop.apiKey (one method per API route):
| Method | Purpose |
|---|---|
create({ name }) |
Create a key (secret returned once) |
list(params?) |
List / search keys |
get(id) |
Get one key |
update(id, { name }) |
Rename |
delete(id) |
Delete |
rotate(id) |
Rotate secret (new secret once) |
enable(id) / disable(id) |
Toggle enabled state |
const { apiKey, apiKeyError } = await reloop.apiKey.create({
name: "Production Key",
});
if (apiKeyError) throw apiKeyError;
console.log(apiKey.id, apiKey.key);More examples: reloop.sh/docs
Licensed under the Apache License 2.0 with additional use restrictions from Reloop Labs (same as the Reloop project).