This endpoint allows you to start sending emails through the Restsend Email API.
Send an email using this POST request:
POST https://restsend.com/api/sendmail
{
"from": "hello@restsend.com",
"to": "john@example.com",
"subject": "Hello from restsend",
"body": "<b>This is just a friendly hello from your friends at restsend.</b>",
"enabledTracker": true
}
JSON parameters are provided in dot notation.
JSON Parameter | Type | Required | Limitations | Description |
---|---|---|---|---|
from | string | yes | ||
to | string | yes | ||
subject | string | yes | ||
body | string | yes* | Not required if templateID is present. | |
templateID | string | yes* | Only required if there's no body present. | |
attachments | object[] | no | ||
attachments.*.content | string | yes | After decoding Base64 | Base64 encoded content of the attachment. |
attachments.*.filename | string | yes |
{
"message": "Email sent successfully",
"status": "success"
}