Email - Outgoing

Send an email

post/v4/email/outgoing

Request

  • Base URL: https://api.inmobile.com
  • URL: https://api.inmobile.com/v4/email/outgoing
  • Auth: one of:
    • HTTP basic
    • API key in query parameter apikey

Request body

messageIdstring

An optional message id used to identify the message. If no message id is provided, a new message id is generated and assigned to the message. This id must be unique across all messages created on the same account. (In case a previous message has been deleted according to GDPR deletion rules setup on the specific account, the messageId is allowed to be reused) If max length is exceeded, the entire api call will fail.

sendTimestring

If set, this defines to time in the future for the message to be sent. e.g. 2001-02-30T14:50:23Z (UTC time).

trackingboolean

If true, this will add Open and Click tracking to your email. Default: true.

listUnsubscribeboolean

If true, this will add a List-Unsubscribe header to your email. If a subscriber unsubscribes using this method, an event will be created. Please note that it is your responsibility to unsubscribe the email address in your system, as we do not add the email address to an unsubscribe list in inMobile. Default: false.

anonymizeOptionsstring[]

Choose the fields that should be anonymized. You can anonymize none or all of the fields. The fields will be anonymized instantly after the email has been handled. Default: "none". Allowed values: "none", "all"

subjectstring required

The subject of the email. If max length is exceeded, the entire api call will fail.

htmlstring required

The HTML body of the email. Max size of 2 MB. If max size is exceeded, the entire api call will fail.

textstring

The text body of the email. If none is provided this will be generated from the HTML. Max size of 2 MB. If max size is exceeded, the entire api call will fail.

Example request

{
  "from": {
    "emailAddress": "roy@tomlinson.com",
    "displayName": "Roy Tomlinson"
  },
  "to": [
    {
      "emailAddress": "roy@tomlinson.com",
      "displayName": "Roy Tomlinson"
    }
  ],
  "replyTo": [
    {
      "emailAddress": "roy@tomlinson.com"
    }
  ],
  "messageId": "8fe266b2-56e9-4b5f-938f-cc5e22530721",
  "sendTime": "2001-02-30T14:50:23Z",
  "attachments": [
    {
      "name": "MyFile.pdf",
      "content": "SGVsbG8gd29ybGQ="
    }
  ],
  "listUnsubscribe": true,
  "anonymizeOptions": [
    "all"
  ],
  "subject": "This is the subject of the email",
  "html": "<!DOCTYPE html><html><head></head><body><p>This is an email to be sent</p></body></html>",
  "text": "This is the text version of the email"
}

Response

messageIdstring

An optional message id used to identify the message. If no message id is provided, a new message id is generated and assigned to the message. This id must be unique across all messages created on the same account. (In case a previous message has been deleted according to GDPR deletion rules setup on the specific account, the messageId is allowed to be reused) If max length is exceeded, the entire api call will fail.

Example response

{
  "messageId": "8fe266b2-56e9-4b5f-938f-cc5e22530721",
  "to": [
    {
      "emailAddress": "roy@tomlinson.com",
      "displayName": "Roy Tomlinson"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.