InTouch Hub · Blue Isle Software

MailerSend

MailerSend API — send transactional email (plain text, HTML, or saved templates) and track delivery by listing and inspecting sent messages and templates.

MailerSend

Send transactional email through MailerSend and track delivery — all from an InTouch job or the AI assistant. Send plain text, HTML, or a saved MailerSend template, then list and inspect the messages that have gone out to confirm they were delivered.

Grounded in the real MailerSend API:

This tool uses the Python standard library only (urllib, json) — no third-party packages.

Operations

operation Method & endpoint What it does
send-email POST /email Send a transactional email.
list-messages GET /messages List recently sent messages (delivery tracking).
get-message GET /messages/{messageId} Get one message's details.
list-templates GET /templates List your email templates.
get-template GET /templates/{templateId} Get one template's details.

send-email

Required: to, plus at least one of text, html, or templateId. fromEmail and subject are required unless a templateId supplies a default sender/subject. fromEmail must be on a domain you have verified in MailerSend.

MailerSend returns HTTP 202 Accepted with an empty body when a send is queued; this tool reports status: "202" and an empty result object on success.

apiKey setup

  1. Sign in to the MailerSend dashboard.
  2. Verify a sending domain (Domains → add and verify DNS records).
  3. Go to Settings → API tokens → Generate new token, choose the scopes you need (at minimum Email for sending and Templates/Analytics for the read operations), and copy the token.
  4. Pass that token as the apiKey input. It is sent as Authorization: Bearer <token>. A single API token is all that is needed — there is no OAuth/JWT exchange.

Examples

Send a plain-text email:

operation = send-email
apiKey    = <your token>
fromEmail = [email protected]
fromName  = InTouch Alerts
to        = [email protected]
subject   = Nightly job finished
text      = The 02:00 export completed successfully.

Send to several recipients with an HTML body and tags:

operation = send-email
apiKey    = <your token>
fromEmail = [email protected]
to        = [email protected],[email protected]
subject   = Release notes
html      = <h1>What's new</h1><p>Lots of fixes.</p>
tags      = release,product

Send using a saved template with per-recipient variables:

operation       = send-email
apiKey          = <your token>
fromEmail       = [email protected]
to              = [{"email":"[email protected]","name":"Jane"}]
templateId      = 3n9j5x8k7zy4qe1m
personalization = [{"email":"[email protected]","data":{"first_name":"Jane"}}]

Track delivery — list recent messages, then inspect one:

operation = list-messages
apiKey    = <your token>
limit     = 50
operation = get-message
apiKey    = <your token>
messageId = 5ee0b166b251345e407c9207

List and inspect templates:

operation = list-templates
apiKey    = <your token>
operation  = get-template
apiKey     = <your token>
templateId = 3n9j5x8k7zy4qe1m

Output

Every operation prints a single JSON object:

On error the tool prints {"error": "<message>"} and exits non-zero, failing the step.