Send an email
Sends from the connected mailbox and returns the stored sent copy.
The message is mirrored into the inbox (message.sent fires once) and counted against the mailbox's daily cap. The cap is reported in the X-Zernio-Send-Limit, X-Zernio-Send-Remaining and X-Zernio-Send-Reset response headers.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Body
application/jsonWhat every request needs
Optional parameters18 fields
Send from another address listed by GET /v1/email/send-as; on Outlook, declare a shared mailbox there first. An address not on the list answers 400, and Outlook refusing it at send time answers 403. Omitted, the mail leaves from the mailbox address.
Appends the signature of the sending address: its Zernio default first, else its Gmail signature. 400 when it has neither.
Appends this Zernio signature instead. Wins over appendSignature.
Plain-text body. One of text or html is required.
25 MB in total on every provider. Send files over 4 MB by url: request bodies are capped at 4.5 MB.
Custom X- headers only. List-Unsubscribe is dropped on Microsoft and reported in metadata.droppedHeaders.
Send later, between 1 minute and 30 days from now. The request answers 202 with the scheduled send; it leaves within a minute of this time through the same caps as an immediate send. List or cancel it under /v1/email/messages/scheduled.
Needs scheduledFor. Saves the email as a draft in the mailbox now and sends that draft at scheduledFor, with any edits the user made in their mail app. A draft deleted or sent from the mailbox first fails the send (email.send_failed). Cancelling deletes the draft.
Adds an open pixel to the html and fires email.opened. Needs html.
Rewrites every http(s) link in the html through a Zernio redirect and fires email.link_clicked. Needs html.
Fires email.thread_replied when someone else writes in this message's thread. Works with text or html.
Headers
OptionalOptional client-generated unique key (e.g. a UUID) that makes retries safe.
- Same key + same body: replays the original response.
- Same key + different body: 422.
- Key still processing: 409.
A request cut off mid-handler (e.g. by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.
On the Ads create, boost and duplicate endpoints, a same-body retry runs again once the cut-off request started more than 15 minutes ago.
Responses
Success· the request worked
Errors· the request failed
How it behaves
Sending limits
These mailboxes are for one-to-one mail, not bulk sends. Protection on every mailbox:
- Daily cap: Microsoft 1,000; Google Workspace 500; Gmail consumer 200. Reaching it answers 429
email_send_cap_reachedwithdetails.cap. - The same body reaching more than 50 distinct recipients within an hour pauses the mailbox with an escalating cooldown (429
rate_limited,account.rate_limitedwebhook).
Scheduling
With scheduledFor the request answers 202 with a ScheduledEmail instead of sending. The account and payment method are checked now; the caps, cooldowns and the send itself run at scheduledFor. A send that fails then fires email.send_failed. List, read and cancel scheduled sends under /v1/email/messages/scheduled.
Tracking
trackOpensadds a 1x1 image to the html and firesemail.opened.trackLinksrewrites every http(s) link in the html through a Zernio redirect and firesemail.link_clicked.trackRepliesfiresemail.thread_repliedwhen someone else writes in the thread.
Tracking costs nothing extra. Opens are approximate: image proxies prefetch and image blocking hides them.
Other errors
- 402: Gmail sends need a payment method on the workspace. Reading, calendar and files do not.
- 400:
holdAsDraftwithoutscheduledFor;trackOpensortrackLinkswithouthtml;scheduledForoutside 1 minute to 30 days.
Send a draft
Sends the draft as it stands in the mailbox now, edits made in their mail app included, and returns the sent message with `draftId`. The draft needs at least one recipient. A draft the user deleted or already sent answers 404 `draft_not_found`. With `If-Match` it goes out only if it is still the version the approver saw (412 `draft_conflict` otherwise). If the user removed the open pixel or rewrote links, tracking is put back before it is sent. Fires `email.sent` with `source: draft`. Tracking set when the draft was created applies, and its `metadata` comes back on the sent message. Same protection, caps and headers as sending.
Move a message to trash
Next Page