Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Messages

To access this resource and use the methods, you must have a SMTP+ user enabled. Usename and password must be included in each request.

SendMessage

...

titleClick here to learn more about request parameters

The method takes as input the document JSON or XML that has the structure MessageDTO defined in the tables below.

MessageDTO
ParameterTypeDescription
SubjectStringthe subject of the message
HtmlHtmlDTOthe HTML part of the message
TextStringthe plain text part of the message
FromEmailAddressDTOthe sender
ToList<EmailAddressDTO>the list of recipients in To header
CcList<EmailAddressDTO>the list of recipients in Cc header
BccList<EmailAddressDTO>the list of recipients in Bcc
ReplyToStringThe Reply-To header value
CharSetStringThe charset of the message body
ExtendedHeadersList<NameValueDTO>List of extended headers (only configured SMTP custom headers will be sent)
AttachmentsList<MessagePartDTO>List of attachments
EmbeddedImagesList<MessagePartDTO>list of embedded images
XSmtpAPIXSmtpAPIDTOthe X-SMTPAPI header value, used for custom aggregations and configurations
UserSmtpUserDTOthe SMTP+ user credentials

 

HtmlDTO
ParameterTypeDescription
DocTypeStringThe DOCTYPE directive
HeadStringThe head content
BodyStringThe body content
BodyTagStringthe body tag, default is "< body>"
EmailAddressDTO
ParameterTypeDescription
NameStringthe name
EmailStringthe email address
NameValueDTO
ParameterTypeDescription
NStringthe name of the parameter
VStringthe value of the parameter
MessagePartDTO
ParameterTypeDescription
FilenameStringthe file name
ContentIdStringthe Content-Id value
BodyArray of Bytethe array of byte of the content
XSmtpAPIDTO
ParameterTypeDescription
CampaignNameStringThe name used for the aggregated campaign
CampaignCodeStringThe campaign code which determines the aggregation
HeaderBooleanAdd or not the MailUp header to the message
FooterBooleanAdd or not the MailUp footer to the message
ClickTrackingBooleanUse the click tracking
ViewTrackingBooleanUse the view tracking
PriorityIntegerSet the priority of the message (1 high - 5 low )
ScheduleDateTimeSchedule date and time of the message
DynamicFieldsList<NameValueDTO>List of merge tags and dynamic field of the recipient
CampaignReportStringName of the aggregated campaign report
SkipDynamicFieldsBooleanskip merge tags evaluation
SmtpUserDTO
ParameterTypeDescription
UsernameStringthe username
SecretStringthe password

 

...

Messages

To access this resource and use the methods, you must have a SMTP+ user enabled. Usename and password must be included in each request.

SendMessage

DescriptionThe method allows the sending of a message to multiple recipients, the message content is passed as input in HTML or plain text. The message may also include attachments and embedded images.
HTTP MethodPOST
URLhttps://send.mailup.com/API/v2.0/messages/sendmessage
Reference
Expand
titleClick here to learn more about request parameters

The method takes as input the document JSON or XML that has the structure MessageDTO defined in the tables below.

MessageDTO
ParameterTypeDescription
SubjectStringthe subject of the message
HtmlHtmlDTOthe HTML part of the message
TextStringthe plain text part of the message
FromEmailAddressDTOthe sender
ToList<EmailAddressDTO>the list of recipients in To header
CcList<EmailAddressDTO>the list of recipients in Cc header
BccList<EmailAddressDTO>the list of recipients in Bcc
ReplyToStringThe Reply-To header value
CharSetStringThe charset of the message body
ExtendedHeadersList<NameValueDTO>List of extended headers (only configured SMTP custom headers will be sent)
AttachmentsList<MessagePartDTO>List of attachments
EmbeddedImagesList<MessagePartDTO>list of embedded images
XSmtpAPIXSmtpAPIDTOthe X-SMTPAPI header value, used for custom aggregations and configurations
UserSmtpUserDTOthe SMTP+ user credentials

 

HtmlDTO
ParameterTypeDescription
DocTypeStringThe DOCTYPE directive
HeadStringThe head content
BodyStringThe body content
BodyTagStringthe body tag, default is "< body>"
EmailAddressDTO
ParameterTypeDescription
NameStringthe name
EmailStringthe email address
NameValueDTO
ParameterTypeDescription
NStringthe name of the parameter
VStringthe value of the parameter
MessagePartDTO
ParameterTypeDescription
FilenameStringthe file name
ContentIdStringthe Content-Id value
BodyArray of Bytethe array of byte of the content
XSmtpAPIDTO
ParameterTypeDescription
CampaignNameStringThe name used for the aggregated campaign
CampaignCodeStringThe campaign code which determines the aggregation
HeaderBooleanAdd or not the MailUp header to the message
FooterBooleanAdd or not the MailUp footer to the message
ClickTrackingBooleanUse the click tracking
ViewTrackingBooleanUse the view tracking
PriorityIntegerSet the priority of the message (1 high - 5 low )
ScheduleDateTimeSchedule date and time of the message
DynamicFieldsList<NameValueDTO>List of merge tags and dynamic field of the recipient
CampaignReportStringName of the aggregated campaign report
SkipDynamicFieldsBooleanskip merge tags evaluation
SmtpUserDTO
ParameterTypeDescription
UsernameStringthe username
SecretStringthe password

 

 

Expand
titleClick here to learn more about response parameters


SendResponseDTO
ParameterTypeDescription
StatusStringthe status of the response can be "done" or "error"
CodeStringthe result code (see the Error Code table)
MessageStringthe result message

 


 JSON request (example)
Expand
{
"Html":
{
"DocType":null,
"Head":null,
"Body":"<div>Hello Mr. [firstname] [lastname] !!!</div><br><img width=\\"600\\" height=\\"397\\" src=\\"cid:img001\\">",
"BodyTag":"<body>"
},
"Text":"Hello world!!!",
"Subject":"Hello friend!",
"From":{"Name":"Test User","Email":"test@mailup.it"},
"To":[{"Name":"Massimo","Email":"info@mailup.it"}],
"Cc":[],
"Bcc":[],
"ReplyTo":null,
"CharSet":"utf-8",
"ExtendedHeaders":null,
"Attachments":null,
"EmbeddedImages":
[
{
"Filename":"Image.jpg",
"ContentId":"img001",
"Body":"..."
}
],
"XSmtpAPI":
{
"CampaignName":"Test Campaign",
"CampaignCode":"1001",
"Header":null,
"Footer":null,
"ClickTracking":null,
"ViewTracking":null,
"Priority":null,
"Schedule":null,
"DynamicFields":[{"N":"firstname","V":"Mario"},{"N":"lastname","V":"Rossi"}],
"CampaignReport":null,
"SkipDynamicFields":null
},
"User":{"Username":"sNNNNN_NN","Secret":"..."}
}
JSON response (example)

Example of a successful response:

{
"Status":"done",
"Code":"0",
"Message":"Ok"
}

Example of error:

{
"Status":"error",
"Code":"102",
"Message":"The operation is not authorized."
}

 

SendTemplate

DescriptionThe method allows the sending of a message to multiple recipients, the message content HTML and plain text is obtained from a template stored in the MailUp administration console. The message may also include attachments and embedded images.
HTTP MethodPOST
URLhttps://send.mailup.com/API/v2.0/messages/sendtemplate 
Reference
Expand
titleClick here to learn more about response request parameters


Status
SendResponseDTOTemplateDTO
ParameterTypeDescription
SubjectStringthe subject of the message
TemplateIdIntegerthe status of the response can be "done" or "error"
CodeStringthe result code (see the Error Code table)
MessageStringthe result message

 

 JSON request (example)
Expand
{
"Html":
{
"DocType":null,
"Head":null,
"Body":"<div>Hello Mr. [firstname] [lastname] !!!</div><br><img width=\\"600\\" height=\\"397\\" src=\\"cid:img001\\">",
"BodyTag":"<body>"
},
"Text":"Hello world!!!",
"Subject":"Hello friend!",
"From":{"Name":"Test User","Email":"test@mailup.it"},
"To":[{"Name":"Massimo","Email":"info@mailup.it"}],
"Cc":[],
"Bcc":[],
"ReplyTo":null,
"CharSet":"utf-8",
"ExtendedHeaders":null,
"Attachments":null,
"EmbeddedImages":
[
{
"Filename":"Image.jpg",
"ContentId":"img001",
"Body":"..."
}
],
"XSmtpAPI":
{
"CampaignName":"Test Campaign",
"CampaignCode":"1001",
"Header":null,
"Footer":null,
"ClickTracking":null,
"ViewTracking":null,
"Priority":null,
"Schedule":null,
"DynamicFields":[{"N":"firstname","V":"Mario"},{"N":"lastname","V":"Rossi"}],
"CampaignReport":null,
"SkipDynamicFields":null
}
Id of the template
FromEmailAddressDTOthe sender
ToList<EmailAddressDTO>the list of recipients in To header
CcList<EmailAddressDTO>the list of recipients in Cc header
BccList<EmailAddressDTO>the list of recipients in Bcc
ReplyToStringThe Reply-To header value
CharSetStringThe charset of the message body
ExtendedHeadersList<NameValueDTO>List of extended headers (only configured SMTP custom headers will be sent)
AttachmentsList<MessagePartDTO>List of attachments
EmbeddedImagesList<MessagePartDTO>list of embedded images
XSmtpAPIXSmtpAPIDTOthe X-SMTPAPI header value, used for custom aggregations and configurations
UserSmtpUserDTOthe SMTP+ user credentials

 See the SendMessage reference for reading the definition of the others DTO (EmailAddressDTO, NameValueDTO, ...)

 

Expand
titleClick here to learn more about response parameters


SendResponseDTO
ParameterTypeDescription
StatusStringthe status of the response can be "done" or "error"
CodeStringthe result code (see the Error Code table)
MessageStringthe result message

 

JSON request (example)
Expand
{
"TemplateId":694,
"Subject":"Test message from template",
"From":{"Name":"Test User","Email":"test@mailup.it"},
"To":[{"Name":"Massimo","Email":"info@mailup.it"}],
"Cc":[],
"Bcc":[],
"ReplyTo":null,
"CharSet":"utf-8",
"ExtendedHeaders":null,
"Attachments":null,
"EmbeddedImages":null,
"XSmtpAPI":null,
"User":{"Username":"sNNNNN_NN","Secret":"..."}
}
JSON response (example)

Example of a successful response:

{
"Status":"done",
"Code":"0",
"Message":"Ok"
}}

 

Example of error:

{
"Status":"error",
"Code":"102111",
"Message":"The operationtemplate is not authorizedfound."
}

 

SendTemplate

...

 Users

 To access this resource and use the methods, you must have a SMTP+ user enabled. Usename and password must be included in each request.

ListUserInfo


DescriptionThe method provides the list of SMTP+ users associated to the distribution list of caller.
HTTP MethodPOST
URLhttps://send.mailup.com/API/v2.0/messagesusers/sendtemplatelistuserinfo 
ReferenceJSON response (example)

Example of a successful response:

{
"Status":"done",
"Code":"0",
"Message":"Ok"
Expand
titleClick here to learn more about request parameters
TemplateDTO
ParameterTypeDescription
SubjectStringthe subject of the message
TemplateIdIntegerthe Id of the template
FromEmailAddressDTOthe sender
ToList<EmailAddressDTO>the list of recipients in To header
CcList<EmailAddressDTO>the list of recipients in Cc header
BccList<EmailAddressDTO>the list of recipients in Bcc
ReplyToStringThe Reply-To header value
CharSetStringThe charset of the message body
ExtendedHeadersList<NameValueDTO>List of extended headers (only configured SMTP custom headers will be sent)
AttachmentsList<MessagePartDTO>List of attachments
EmbeddedImagesList<MessagePartDTO>list of embedded images
XSmtpAPIXSmtpAPIDTOthe X-SMTPAPI header value, used for custom aggregations and configurations
UserSmtpUserDTOthe SMTP+ user credentials

 See the SendMessage reference for reading the definition of the others DTO (EmailAddressDTO, NameValueDTO, ...)

 

Expand
titleClick here to learn more about response parameters
SendResponseDTO
ParameterTypeDescription
StatusStringthe status of the response can be "done" or "error"
CodeStringthe result code (see the Error Code table)
MessageStringthe result message

 

JSON request (example)
Expand
{
"TemplateId":694,
"Subject":"Test message from template",
"From":{"Name":"Test User","Email":"test@mailup.it"},
"To":[{"Name":"Massimo","Email":"info@mailup.it"}],
"Cc":[],
"Bcc":[],
"ReplyTo":null,
"CharSet":"utf-8",
"ExtendedHeaders":null,
"Attachments":null,
"EmbeddedImages":null,
"XSmtpAPI":null,
"User":{"Username":"sNNNNN_NN","Secret":"..."}
}
The request must contain the user's credentials and an optional username to query

 

ListUsersDTO
ParameterTypeDescription
UserSMTPUserDTOthe calling User
UsernameStringoptional User from which to read the profile, if omitted the method returns the whole list of users
Expand
titleClick here to learn more about response parameters

The response is given by a JSON or XML document that has the structure of a list of users informations ( List<UserInfoDTO>).

 

UserInfoDTO
ParameterTypeDescription
UsernameSMTPUserDTOthe username
IdConsolelongthe console ID
IdListlongthe list Id
IsEnabledbooltrue if the user is enabled
Priorityintthe priority
Notestringnote
CreationDatedatetimecreation date
UpdateDatedatetimelast update date
DomainListstringthe list of allowed domains
SenderListstringthe list of allowed sender
BlockUntildatetimethe date until the user is blocked
AdminBlockbooltrue if the user is blocked by the system administrator
JSON request (example)
{"User":{"Username":"sNNNN_NN","Secret":"..."},"Username":"sMMMM_MM"}
JSON response (example)

Example of a successful response:

{
"Status":"done",
"Code":"0",
"Message":"Ok",
"UserList":
[
{
"Username":"sMMMM_MM",
"IdConsole":123,
"IdList":1,
"IsEnabled":true,
"Priority":3,
"Note":"",
"CreationDate":"2015-03-31T12:12:04",
"UpdateDate":"2015-03-31T12:12:34",
"DomainList":"",
"SenderList":"",
"BlockUntil":"0001-01-01T00:00:00",
"AdminBlock":false
}
]
}

 

Example of error:

{
"Status":"error",
"Code":"111112",
"Message":"TheUser template is not founddeleted."
}

 

...

 

Error code

 

This table contains the list of error codes that can be returned by the API methods.

 

ErrorCode
Description
0Ok
1The operation is failed.
101The input is null.
102The operation is not authorized.
103The user is not enabled.
104The user is blocked.
105The user is blocked until this date.
106The console account is not found.
107The console account is suspended.
108The console account is deleted.
109At least one recipient is required.
110The sender is mandatory.
111The template is not found.
  112User is deleted.