Emails

Send an email

Requires emails:w.

post/v1/emails

Request

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

Request body

fromstring

Sender, optionally with a name. Its domain must be a verified sending domain on your account. Optional when the template sets one.

subjectstring

Up to 998 characters. Leave out subject, html and text when you send a template.

htmlstring

The HTML body: at most 2 MB, before and after variables are substituted. Give html, text or both, unless you send a template.

textstring

The plain text body: at most 2 MB, before and after variables are substituted. Give html, text or both, unless you send a template.

variablesobject

Values to substitute into placeholders in subject, html and text. Ignored when template is set; a template's own variables go in template.variables instead.

headersobject

Extra email headers, sent as given. Headers HonkIO sets itself (To, From, Subject, Content-Type, List-Unsubscribe and the like) and any name starting with ARC- or X-SES- are refused with EMAIL_HEADER_INVALID.

is_commercialboolean

False by default. True marks a commercial message under CASL: it goes to exactly one recipient, needs consent on file for that address, and carries an unsubscribe footer and header.

scheduled_atstring date-time nullable

Send later: an ISO 8601 date-time with an offset, 1 minute to 30 days ahead.

disable_unsubscribe_footerboolean

Leave out the unsubscribe footer HonkIO adds to a commercial email. The one click unsubscribe header is still sent: put your own unsubscribe link in the body.

Example request

{
  "from": "Acme <hello@yourdomain.ca>"
}

Changes

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