Emails

Send email message

Requires authentication — see Authentication.

Sends a single email. Query parameters are supported.

This endpoint is used in the Email guide.

post/v2/emails

Request

  • Base URL
    https://elastic.messangi.me/crowsnest
  • URL
    https://elastic.messangi.me/crowsnest/v2/emails
  • Auth
    HTTP bearer

Query parameters

unsubscribeMsgstring

Defines the display text for the unsubscribe link included in the email body, allowing recipients to opt out from future communications. This text will appear as the clickable anchor in the unsubscribe URL.

Request body

tostring required
<p>Recipient’s email address.</p>
fromstring required
<p>Sender's verified email address.</p>
textstring required
<p>Email content (can be plain text or HTML).</p>
subjectstring required
<p>Subject line of the email.</p>
externalIdstring required
<p>Alphanumeric identifier used for reporting purposes.</p>
clientIdstring
<p>Unique user identifier that can be used for reporting purposes. This is an identifier you can use to uniquely identify the destination address in your systems. This is similar to the externalId and will be sent back to you if you are requesting callbacks that contain status changes of the messages you send.</p>
callbacksstring[]
<p>Indicate one or more (separated by comma) webhook URLs to notify about the status of the message delivery.That is, If you want to receive the status of the message you've sent to your contacts, you need to specify your endpoint.</p> <p>Your endpoint must have a <b>HTTP POST</b> access method and receive a JSON body.</p> <p>The URL is the external callback where the events of the Email will be registered and published. Once an email is processed, its status will be posted to your callback URL.</p><p>To view the full list and meaning of each status, please refer to the <a href='https://docs.messangi.com/docs/email-status'>Email Status</a> section.</p>
aliasstring
<p>Assign a custom label or reference name to the email recipient.</p>

Example request

{
  "to": "email@service.com",
  "from": "service@service.com",
  "text": "example text",
  "subject": "Email Subject",
  "externalId": "123456789abcde",
  "clientId": "48118112",
  "alias": "Customer email alias (This field is optional)"
}

Response

Accepted the request to send the email

Example response

{
  "meta": {
    "timestamp": 1597166699457,
    "transactionId": "70169d77-c165-4795-9932-35b8a3af96fb",
    "explain": "a descriptive text"
  },
  "data": {
    "id": "203",
    "date": "2020-08-08T19:43:36.278949Z",
    "to": "test@service.com",
    "from": "from@service.com",
    "userName": "myAccount@delivery.com",
    "operator": "operatorAccount@delivery.com",
    "text": "content",
    "status": "SENT",
    "subject": "Greetings",
    "externalId": "123456789abcdef",
    "clientId": "48118112",
    "alias": "customer email alias (This field is optional)"
  }
}

Changes

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