InTouch Hub · Blue Isle Software

Mailjet

Send transactional and marketing email and manage contact lists via the Mailjet API.

emailmailjettransactionalcontacts

Mailjet

Send transactional and marketing email and manage contact lists via the Mailjet API.

A standard-library-only InTouch tool: no requests, no SDK. It calls Mailjet's Send API v3.1 and REST API v3 directly with HTTP Basic auth.

What it does

Operation Method & endpoint Purpose
send-email POST /v3.1/send Send a transactional or marketing email
list-lists GET /v3/REST/contactslist List your contact lists
create-list POST /v3/REST/contactslist Create a new contact list
list-contacts GET /v3/REST/contact List contacts (optionally within one list)

apiKey setup

Mailjet authenticates with HTTP Basic auth using two values: your API Key (public) and your Secret Key (private). The Mailjet curl idiom is --user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE".

  1. Sign in to the Mailjet dashboard.
  2. Go to Account Settings → API Key Management (REST API).
  3. Copy your API Key and Secret Key.
  4. Pass them to this tool as a single apiKey value joined with a colon: PUBLIC:PRIVATE (e.g. a1b2c3...:9f8e7d...).

Both halves are base64-encoded together into the Authorization: Basic header, so no live OAuth/JWT exchange is needed — a single key string is sufficient.

Sender addresses used in send-email must be validated senders/domains in your Mailjet account, or the API will reject the message.

Inputs

Outputs

Examples

Send a transactional email:

{
  "apiKey": "PUBLIC_KEY:SECRET_KEY",
  "operation": "send-email",
  "fromEmail": "[email protected]",
  "fromName": "Your App",
  "to": "[email protected],[email protected]",
  "subject": "Your receipt",
  "text": "Thanks for your order!",
  "html": "<h3>Thanks for your order!</h3>"
}

List your contact lists:

{
  "apiKey": "PUBLIC_KEY:SECRET_KEY",
  "operation": "list-lists",
  "limit": "20"
}

Create a contact list:

{
  "apiKey": "PUBLIC_KEY:SECRET_KEY",
  "operation": "create-list",
  "name": "newsletter-subscribers"
}

List contacts in a specific list:

{
  "apiKey": "PUBLIC_KEY:SECRET_KEY",
  "operation": "list-contacts",
  "contactsList": "123456",
  "limit": "50"
}