Send an Email
Sends an email to the given recipient. Returns a success message if successful, otherwise returns an error.
Permissions Required: Manager Role (Dev, Admin, or Owner)
Headers
-
The Account Credentials used to send the email
-
The information of the sender to be included in the message (sender's name, sender's email address, etc)
Syntax:
n:NAME;a:ADDRESS;r:REPLYTOADDRESS
POST
/mail/send
curl \
-X POST https://thefemdevs.com/api/mail/send \
-H "Content-Type: application/json" \
-H "x-user: XQGdt1KLapMtFZqGCdzyLw.xcWtsV5Xb4T-yEE0lHtLyC60JC4" \
-H "x-from: n:Example User;a:main@example.com;r:replyto@example.com" \
-d '{"to":"user@example.com","text":"This is a test email","subject":"Test"}'
Request examples
Plain text
{
"to": "user@example.com",
"text": "This is a test email",
"subject": "Test"
}
{
"to": "user@example.com",
"html": "<h1>This is a test email</h1>",
"subject": "Test"
}
{
"to": "user@example.com",
"url": "https://example.com",
"subject": "Test"
}
Response examples (200)
OK
Response examples (400)
Missing Header Parameter(s)
{
"code": 8,
"message": "Missing Header Parameter(s)"
}
{
"code": 10,
"message": "Missing Body Parameter(s)"
}
Response examples (401)
Missing API Token
{
"code": 3,
"message": "No API key provided"
}
{
"code": 4,
"message": "Invalid API key provided"
}
Response examples (403)
Missing permissions
{
"code": 1,
"message": "You are not authorized to access this resource"
}
{
"code": 2,
"message": "You are blacklisted from accessing this resource"
}
Response examples (500)
{
"code": 0,
"message": "An unknown error occurred"
}