Send email

POST
https://reloop.sh/api/mail/v1/send

Body Parameters

fromstringRequired

Sender email address

tostringstring[]Required

Recipient email address(es) (max 50)

Example: ["value1", "value2"]

subjectstringRequired

Email subject

  • Minimum length: 1
  • Maximum length: 255
ccstringstring[]

CC email address(es) (max 50)

Example: ["value1", "value2"]

bccstringstring[]

BCC email address(es) (max 50)

Example: ["value1", "value2"]

textstring

Plain text content

htmlstring

HTML content

reply_tostringstring[]

Reply-to email address

Example: ["value1", "value2"]

scheduled_atstring

Schedule email to be sent later (ISO 8601)

headersobject

Custom headers to add to the email

channel_idstring

The channel ID to receive the email

attachmentsobject[]

Email attachments

attachments properties
contentstringany
filenamestring
pathstring
content_typestring
content_idstring
tagsobject[]

Custom tags passed in key/value pairs

tags properties
namestringRequired

The name of the email tag.

  • Maximum length: 256
valuestringRequired

The value of the email tag.

  • Maximum length: 256
templateobject

Email template to use

template properties
idstringRequired

Template ID

variablesobject

Variables to replace in the template

thread_idstring

Thread ID to link this email to an existing conversation thread

import { Reloop } from "reloop-email";

const reloop = new Reloop({ apiKey: "rl_123456789" });

const { response, error } = await reloop.mail.send({
  from: "Reloop <hello@send.example.com>",
  to: "user@example.com",
  subject: "Welcome to Reloop",
  html: "<p>Thanks for signing up.</p>",
  text: "Thanks for signing up.",
  reply_to: "support@example.com",
  tags: [{ name: "campaign", value: "welcome" }],
});
if (error) throw error;
{
  "success": true,
  "messageId": "example_messageId",
  "status": "example_status",
  "timestamp": "example_timestamp",
  "id": "con_123456789"
}

Was this page helpful?

Edit this page