Skip to main content

Send Request

This method is used to send a transactional message containing up to 5 attached files to an email address. When the send request method is successful, the send request ID is returned. You must first have obtained the Security Code information for the Transactional Messaging Template you want to use. For more information on how to obtain the Security Code, see Get Security Code.

This is a POST method.

REST URL

https://atmp-pub-api-www3.actito.com/transactional-trigger-ws/v1/sendrequest

Attached File Prerequisites:

  • File size permitted
    The total size allowed for a transactional message and its attachments is 20 MB.
  • Number of attachments permitted
    No more than 5 individual files can be attached to a transactional message.
  • File formats permitted
    The attached file must be in one of the following formats:
    • .csv
    • .doc
    • .docx
    • .gif
    • .html
    • .jpeg
    • .jpg
    • .pdf
    • .png
    • .xls
    • .xlsx
  • Base64 Encoding
    All files you attach to the transactional message must be encoded in Base64 format.
    *Note:*Since Base64 encoded files take up an inordinate amount of visible space in the documentation, the input examples presented in this guide contain the filler text "{encodedFile}" indicating where your Base64 formatted file(s) should be included in the request code.

Access Authentication Requirement

This method requires Basic Access Authentication.

info

For more information on how to obtain Basic Access Authentication manually, see Manually Obtaining Basic Access Authentication for the Transactional Messaging with Attachment API

Input parameters
Required parameters
Description
Body Parameters
template emailThe email address to which you wish to send the Transactional Message
tag1The security tag 1.
tag2The security tag 2.
tag3The security tag 3.
Content Parameters
contentThe content parameter envelope
Dynamic Personalization Parameters
dynThe personalization parameter envelope
Response parametersDescription
return id: The Send Request ID.

REST Example

Input

Method Type

POST

URL

https://atmp-pub-api-www3.actito.com/transactional-trigger-ws/v1/sendrequest

Header

Content-type: multipart/form-data; boundary=XyXyXy
Accept: application/json

Body

--XyXyXy
Content-Disposition: form-data; name="sendRequest";
Content-Type: application/json

{
"tag1": "tSbjRphO32-MeJQYxQmj8Qd61eYpuoivBHXPtnBr_pO-suT4hBdHrrRNPMy9IpHi",
"tag2": "BaxrggpmLe-rekSGqiMWig",
"tag3": "855678C980200012",
"email": "test@example.org",
"dyn": {"firstname":"mike","lastname":"smith"},
"content": {"1":"simple text"}
}

--XyXyXy
Content-Disposition: form-data; name="photo"; filename="file1.jpg"
Content-Type: image/jpeg
Content-Transfer-Encoding: base64

{encodedFile}

--XyXyXy--

Response

Status: 200

Body

{
"id": 4295857988061
}

Error Descriptions

Error Output Format Example

{
"id": "7d7d0654-5001-43ca-9b57-b89297a4f85b",
"status": 400,
"message": "error message"
}

Error Messages

The list below shows the possible error messages for the Transactional Messaging with Attachments API:

  • An internal error has occurred. Please contact the Support Team if the error persists.
  • The requested resource cannot be found {0}.
  • The credentials you entered are incorrect.
  • The Authorization header is missing.
  • The Authorization header is incorrectly encoded.
  • Basic authentication information is missing.
  • The JSON object body is either invalid or missing.
  • The following fields are missing or invalid.
  • You do not have the following user rights for the MESSAGE feature: {0}.
  • The field ''{0}'' is required.
  • You must include either the 'apiKey' field or the 'partnerKey' field.
  • The field ''{0}'' must be numeric.
  • The length of field ''{0}'' is greater than {1}.
  • Your sender is not validated for this type of message.
  • No sender found with this address {0} for this type of message.
  • Parameter ''{0}'' too long (max {1,number,#}).
  • Invalid parameter: ''{0}''.
  • The field ''{0}'' contains an invalid email value.
  • The body of an email message must begin with [EMV TEXTPART] OR [EMV HTMLPART].
  • The Transactional Message {0} cannot be deleted because it has already been sent.
  • The encoding is incorrect. Choose an encoding from this list: iso-8859-15, UTF-8, windows-1251, Big5, GB2312, EUC-KR, Shift_JIS, iso-8859-2, iso-8859-3, iso-8859-7.
  • Page {0} is invalid.
  • Your JSON has an invalid parameter.