Emails

Simulate a received email (test keys only)

Requires emails:w.

post/v1/emails/received/simulate

Request

  • Base URL: https://api.honkio.ca
  • URL: https://api.honkio.ca/v1/emails/received/simulate
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Request body

fromstring email required

The sender's address.

tostring[] required

Up to 10 recipients, each your test managed address or an address at one of your test mode domains.

ccstring[]

Up to 10 more recipients, with the same rule as to.

subjectstring

Up to 998 characters.

textstring

The plain text body.

htmlstring

The HTML body.

in_reply_tostring

The Message-ID this message replies to, for threading.

Example request

{
  "to": [
    "support@yourdomain.ca"
  ]
}

Response

The simulated message, in the same shape GET /v1/emails/received/:id answers with. livemode is always false.

idstring required
fromstring required
from_namestring nullable required
tostring[] required
ccstring[] required
subjectstring required
message_idstring nullable required
in_reply_tostring nullable required
received_atstring date-time required
status'received' | 'rejected' required
reject_reasonstring nullable required

Why a rejected message was stored headers only and uncharged: virus, daily_cap (the daily message cap), daily_mb_cap (the daily cap on billable MB), or insufficient_balance (the balance could not cover its charge). Null for a received message.

attachments_countinteger required
size_bytesinteger required
charge_millicentsinteger required
domain_idstring nullable required
livemodeboolean required
textstring nullable required
htmlstring nullable required
html_format'cid' | 'links' | 'sanitized' required
remote_imagesinteger nullable required

Remote images parked in data-remote-src by html_format=sanitized; null for the other formats.

referencesstring[] required
reply_tostring[] required
envelope_recipientsstring[] required
body_purgedboolean required
body_truncatedboolean required

text or html was cut at 2 MB (UTF-8 bytes) when stored; the raw message keeps it whole.

raw_availableboolean required
parse_failedboolean required
attachments_bytesinteger required

Total size of the attachments, in bytes.

Changes

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