Emails

Send or schedule an email

Send a single transactional email — now, or at a future time by passing scheduled_at. Provide the content inline as html/text, or reference a saved template with template (create one with Create a template). Pass an Idempotency-Key header to make retries safe: the same key replays the original result instead of sending twice. The response returns the new email's id — read its delivery status back with Retrieve an email, change a scheduled send with Cancel or reschedule an email, or send many at once with Send a batch of emails. A template in the marketing category sends to one recipient (no cc/bcc) and adds them to your contacts if they aren't one yet, because the unsubscribe link belongs to a contact: the new contact counts toward a Free plan's contact limit (at the limit the send is refused) and fires contact.created with source: "send". Requires the emails:send capability.

post/email

Request

  • Base URL: https://www.unitpost.com/api/v1
  • URL: https://www.unitpost.com/api/v1/email
  • Auth: HTTP bearer

Request body

fromstring required

Sender address on one of your verified domains. Accepts a bare address ("hi@acme.com") or a display name ("Acme hi@acme.com") — the name is what inbox clients show next to the message.

subjectstring
in_reply_tostring
headersobject

Custom headers (your own X-* and threading headers). Envelope (From/To/Cc/Bcc/Reply-To/Subject/Date/Message-ID) and signing/transport headers are managed for you and rejected with 422. On a non-marketing send you may set your own List-Unsubscribe (one or more <…> entries, each https:// or mailto:) and List-Unsubscribe-Post (exactly List-Unsubscribe=One-Click, which needs at least one https:// entry). A marketing-template send refuses both: Unitpost adds its own per recipient.

htmlstring

HTML MIME body. It is sanitized for email safety and may be supplied with text to create a multipart alternative. This field does not parse Markdown.

textstring

Plain-text MIME body. Newline characters are preserved; Markdown and rich-text styling are not interpreted. It may be supplied with html as the fallback alternative. When html is sent without text, a plain-text alternative is derived from the visible HTML content; an explicit text value is always sent unchanged.

open_trackingboolean
click_trackingboolean
scheduled_atstring date-time

Response

Accepted for delivery or scheduled.

idstring required
status'queued' | 'scheduled' required
scheduled_atstring nullable required

Changes

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