Send Mailer Endpoint
- Print
- DarkLight
- PDF
Send Mailer Endpoint
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/mailer
Send emails to users from your workspace.
Version | Description |
---|---|
5.4.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authToken
of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId
of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example
{
"from": "[email protected]",
"subject": "Welcome to the Test Newsletter",
"body": "Thank you for subscribing to the Test Newsletter. If this was not you feel free to unsubscribe by hitting the following button [unsubscribe]",
"dryrun": "true"
}
object
from
string Required
A valid email address to send mails from.
subject
string Required
The subject of the email.
body
string
The body of the email. You must use [unsubscribe]
for the unsubscription link. You may use [name]
, [fname]
, [lname]
for the user's full name, first name or last name, respectively. You may use [email]
for the user's email.
dryrun
string
A boolean value. If true, will only send one email to the same address as in the From
parameter.
Responses
200
OK
Success
{
"success": true
}
object
success
boolean
400
Bad Request
Invalid From Address
{
"success": false,
"error": "Invalid from address [error-invalid-from-address]",
"errorType": "error-invalid-from-address",
"details": {
"function": "Mailer.sendMail"
}
}
object
success
boolean
error
string
errorType
string
details
object
function
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
Was this article helpful?