Authentication
Create a SMTP+ user
To access resources and to use the methods, you must have an active account with an enabled SMTP+ user (SMTP+ users have the "sNNNNN_NN" format). You can create SMTP+ accounts and retrieve credentials:
- from your platform, following what described in this page about SMTP Settings
- calling a REST API endpoint
In this page we explain how to create a SMTP+ account using the REST API endpoint.
Anchor | ||||
---|---|---|---|---|
|
Description | Retrieve the list of priorities | ||
---|---|---|---|
HTTP Method | GET | ||
URL |
| ||
JSON request (example) | none | ||
JSON response (example) |
| ||
Paging and filtering (example) | none |
Create your account
Description | Create a SMTP+ account. To create a SMTP+ account you have to provide one or more trusted senders email and/or one or more trusted domains. To retrieve the list of trusted emails please refer to this page. Remember that you can create an SMTP+ account only if all the trusted senders you provide by TrustedSenders field have got the StatusCode property equals to 1 (Confirmed): you can find this information here. To propertly attemps this request, you need an access_token and include it into the Authorization header as shown below:
If you need more information about MailUp REST API OAuth 2.0 authorization process, please refer to this page. | ||
---|---|---|---|
HTTP Method | POST | ||
URL |
| ||
JSON request (example) |
| ||
JSON response (example) | If your request is correct, you'll receive the following response
You'll receive a 400 Bad request response containing the reason into the Error Description field when you try to create an account with:
You'll receive a 403 Forbidden response, containing the reason into the Error Description field, when the SMTP+ user management option wasn't enabled to your platform.
| ||
Paging and filtering (example) | none |
Include credentials in the request
Usename and password must be included in each request through "User" parameter .
No Format |
---|
"User":{"Username":"YourSmtpPlusUsername","Secret":"YourSmtpPlusPassword"} |
An error may be returned when the SMTP+ user is blocked. In this case you could use the "ListUserInfo" method to get more details about that user.
For example, there could be a billing issue.
Resources
Messages
This section includes the methods that can be used to send transactional emails.
Use SendMessage when you need to specify a completely different content for each message, while you can use SendTemplate - and use merge tags - if you want to pick the body of an existing content and simply customize some of its parts.
The two methods provide the same level of performance: pick the one that better fits your needs.
Info | ||
---|---|---|
| ||
The use of a reply-to address different from the FROM email address must be enabled by MailUp. If you need this, please contact our support team by writing an email to support@mailup.com. |
SendMessage
Description | This method allows sending of a transactional message to multiple recipients. This method is not intended for bulk mailings. The message content is passed as input with HTML code or plain text. The message may also include attachments and embedded images. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTTP Method | POST | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
URL | https://send.mailup.com/API/v2.0/messages/sendmessage | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reference |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JSON request (example) |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JSON response (example) | Example of a successful response:{ "Status":"done",Example of error: { "Status":"error", |
SendTemplate
Description | This method allows sending of a transactional message to multiple recipients, taking advantage of placeholders to customize content. This method is not intended for bulk mailings. The message content (both HTML body and plain text) is obtained by specifying the unique ID of a message previously created and stored in the MailUp admin console. The message may also include attachments and embedded images.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTTP Method | POST | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
URL | https://send.mailup.com/API/v2.0/messages/sendtemplate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reference |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JSON request (example) |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JSON response (example) | Example of a successfulresponse:{ "Status":"done", Example of error: { "Status":"error", |
Users
Use ListUserInfo to retrieve status details about current SMTP+ user or other SMTP+ users that belong to the same List of a specified MailUp account.
ListUserInfo
Description | This method returns the list of SMTP+ users that exist in the List of a specified MailUp account. Status details of each user are provided | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTTP Method | POST | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
URL | https://send.mailup.com/API/v2.0/users/listuserinfo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reference |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JSON request (example) | {"User":{"Username":"sNNNN_NN","Secret":"..."},"Username":"sMMMM_MM"} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JSON response (example) | Example of a successfulresponse:{ Example of error: { "Status":"error", |
Error codes
This table shows possible HTTP response statuses that can be returned by the API methods and the corresponding error code provided by the application (inside the response).
HTTP response code | Application Code | Description |
---|---|---|
200 | 0 | Ok |
400 | 1 | The operation failed. |
403 | 101 | The input is null. |
403 | 102 | The operation is not authorized. |
403 | 103 | The user is not enabled. |
403 | 104 | The user is blocked. |
403 | 105 | The user is blocked until this date. |
403 | 106 | The MailUp account cannot be found. |
403 | 107 | The MailUp account has been suspended. |
403 | 108 | The MailUp account has been deleted. |
403 | 109 | At leastone recipient is required. |
403 | 110 | The sender is required. |
403 | 111 | The template cannot found. |
403 | 112 | The user has been deleted. |