Send email with the current API.
Auth Engine accepts a JSON request with a required subject and at least one of message or html. Both fields support strings and structured objects.
Authentication
Authenticate with your Auth Engine API key in the request path. Keep API keys in a trusted server-side environment.
POST /api/send/YOUR_API_KEY
Endpoint & HTTP method
https://authyengine.com/api/send/YOUR_API_KEYSend a JSON request body with Content-Type: application/json.
JSON request body
The supported fields are exactly name, subject, replyTo, message, html, cc, and bcc.
{
"subject": "Welcome",
"message": "Welcome to Auth Engine."
}| Field | Status | Accepted value |
|---|---|---|
subject | Required | Non-empty string |
message | Conditional | Non-empty string or valid object |
html | Conditional | Non-empty string or valid object |
name | Optional | String; Pro Growth/Admin only |
replyTo | Optional | Valid email; all roles |
cc | Optional | Valid email address list; non-subscriber |
bcc | Optional | Valid email address list; non-subscriber |
Subscriber restrictions
Subscriber requests use the configured delivery email. They cannot use name, cannot override the delivery recipient, and should not send unsupported fields such as to or email. replyTo remains supported for Subscribers.
Pro Growth behavior
Pro Growth may use name to override the configured From name, plus replyTo, cc, and bcc. The SMTP configuration controls the actual From address.
Administrator behavior
Administrator requests follow the same supported request fields as Pro Growth: name is allowed, replyTo is supported, and CC/BCC are available.
Reply-To
replyTo controls the Reply-To header only. It does not change the From address or the delivery recipient.
{
"subject": "Support request",
"replyTo": "support@example.com",
"message": "Please review this request."
}Message — string
Use a string for simple text content.
{
"subject": "Welcome",
"message": "Welcome to Auth Engine."
}Message — object
Use an object for structured content. The object is kept as JSON and is not automatically stringified.
{
"subject": "Welcome",
"message": {
"title": "Welcome to Auth Engine",
"body": "We're glad to have you here."
}
}HTML — string
Use a string when you are sending HTML markup directly.
{
"subject": "Welcome",
"html": "<h1>Welcome</h1><p>We're glad to have you here.</p>"
}HTML — object
Use an object when HTML content should be structured. The object remains a JSON object in the request.
{
"subject": "Welcome",
"html": {
"title": "Welcome",
"body": "<p>We're glad to have you here.</p>"
}
}CC & BCC
Non-subscriber accounts may include CC and BCC addresses. Each supplied address must be valid.
{
"subject": "Account update",
"message": "Your account was updated.",
"cc": "team@example.com, audit@example.com",
"bcc": "archive@example.com"
}Complete request examples
This object example matches the Form Builder's Pro Growth/Administrator configuration.
{
"name": "Auth Engine",
"subject": "Welcome",
"replyTo": "support@example.com",
"message": {
"title": "Welcome to Auth Engine",
"body": "We're glad to have you here."
}
}Fetch request:
const payload = {
"subject": "Welcome",
"message": {
"title": "Welcome to Auth Engine",
"body": "We're glad to have you here."
}
};
const response = await fetch(
"https://authyengine.com/api/send/YOUR_API_KEY",
{
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify(payload)
}
);
const data = await response.json();
console.log(data);cURL:
curl -X POST "https://authyengine.com/api/send/YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"subject": "Welcome",
"message": {
"title": "Welcome to Auth Engine",
"body": "We're glad to have you here."
}
}' Error responses
Use the returned HTTP status and JSON response as the authoritative result. Client-side validation covers missing required content, invalid email addresses, and role-restricted fields before a request is built.
| Category | What to check |
|---|---|
| 4xx | Request fields, API key/authentication, role restrictions, and email addresses. |
| 429 | Rate-limit conditions for the account or API key. |
| 5xx | Service or delivery-side failures; handle the returned error details safely. |
SMTP & delivery
The SMTP configuration controls the actual From address. The SMTP provider must permit the configured From address and the Reply-To address where applicable.
Form Builder
The Form Builder exposes the same seven supported fields, String/Object selectors for Message and HTML, role-aware validation, and copyable request code.