Send Transactional Email
This method triggers a one-off transactional email (OTP, password reset, alerts, etc.) and delivers it immediately. Unlike send.php, nothing is queued or scheduled.
URL
https://dashboard.skry.be/api/emails/send-transactional.php
PARAMETERS(POST)
api_keyyour API key for the brand.to_emailthe recipient email address (single email only).subjectthe 'Subject' of your email.html_bodythe 'HTML version' of your email. Required unlessplain_bodyis provided.plain_bodythe 'Plain text version' of your email. Required ifhtml_bodyis omitted.from_nameoptional override of the brand's 'From name'.from_emailoptional override of the brand's 'From email'. Must be on an allowed domain for the brand.reply_tooptional override of the brand's 'Reply to' email.
Note: Send JSON in the request body and set Content-Type: application/json. This endpoint does not accept form-encoded bodies.
Brand defaults: If from_name, from_email, or reply_to are omitted, the brand settings configured in the dashboard are used.
RESPONSE (JSON)
Success
{ "status": "success", "message": "Email sent successfully." }
Example failure
{
"status": "error",
"message": "SES rejected the message.",
"error_info": "Email address is not verified. The following identities failed...",
"code": 400
}
EXAMPLES
Example request in JavaScript with fetch API
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var payload = {
"api_key": "<your-api-key>",
"to_email": "user@example.com",
"from_name": "Skrybe Security",
"from_email": "no-reply@yourdomain.com",
"reply_to": "support@yourdomain.com",
"subject": "Your one-time passcode",
"html_body": "<p>Your code is <strong>384092</strong>. It expires in 5 minutes.</p>",
"plain_body": "Your code is 384092. It expires in 5 minutes."
};
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: JSON.stringify(payload),
redirect: 'follow'
};
fetch("https://dashboard.skry.be/api/emails/send-transactional.php", requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Looking for campaign-style sends (multiple recipients, optional scheduling, templating)? Use send.php instead.