Skip to content

Send Basic Emails API

Backendless provides API for basic email delivery. The API lets you specify:

  • plain text and/or HTML-based content for your email messages;
  • a list of email address for the recipient;
  • a list of attachments;


Before the API can be used, the Backendless backend must be configured with your own SMTP server information. This is an important requirement as the API will not work when the Manage > App Settings > Email Settings section in Backendless Console contains default values. For instructions on how to configure your own SMTP server in Backendless, see the Email Settings section.

Sending Email API

Delivers an email message to the recipient(s) specified in the API call.



Endpoint  URL

The is a subdomain assigned to your application. For more information see the Client-side Setup section of this documentation.

Request headers

Content-Type: application/json  
user-token: optional value obtained as a result of the login operation.


Argument                Description
Content-Type Must be set to application/json. This header is mandatory.
user-token Optional header. Contains a value returned by Backendless in a preceding user Login API call. If user-token is set in the request, the currently logged in user will be assigned to the ownerId property of the user object which is being saved.  Additionally, the operation will be executed with the security policy associated currently logged in user. This means all permissions associated with the user and the roles assigned to the user will be enforced by Backendless.

Request body

  "subject" : value,  
  "bodyparts" : {  
     "textmessage" : value,  
     "htmlmessage" : value  
  "to" : [ array of values ],  
  "attachment" : [ array of file paths from the Backendless File Service ]  


Argument                Description
subject Email message subject.
bodyparts.textmessage Plain text body of the email message.
bodyparts.htmlmessage HTML version of the body of the email message.
to An array of email addresses to deliver the email message to.
attachment An array of file paths for the file entries from the Backendless File Service. Referenced files will be attached to the email message. The path is calculated from the root of the file system without the leading slash. For example if file agreement.txt is located at /documents/legal/, then the path in the REST request must be documents/legal/agreement.txt.



Make sure to replace xxxx in the domain name in the sample request below to the one assigned to your application.

Sending basic email:

curl \  
-H Content-Type:application/json \   
-X POST \  
-d '{"subject":"Hello World!", "bodyparts":{"textmessage":"This is an email message sent by Backendless"}, "to":[""]}'

Sending an email with an attachment:

curl \  
-H Content-Type:application/json \  
-X POST \  
-d '{ "subject": "Sample email with attachment", "bodyparts": { "textmessage":"Here's a sample attachment..." }, "attachment": [ "web/index.html" ], "to": [ "" ] }'