Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mailbreeze.com/llms.txt

Use this file to discover all available pages before exploring further.

MailBreeze provides official SDKs for six programming languages, each offering the same 23 endpoints across 5 resources.

Installation

npm install mailbreeze

Quick Comparison

FeatureJavaScriptPythonJavaGoPHPRust
Packagemailbreezemailbreezemailbreeze-javamailbreeze-gomailbreeze/mailbreeze-phpmailbreeze
Min VersionNode 20+Python 3.10+Java 17+Go 1.21+PHP 8.2+Rust 1.70+
AsyncNative Promiseasync/awaitSyncContextSyncasync/await
HTTP ClientNative fetchhttpxOkHttpnet/httpGuzzlereqwest
Type SafetyFull TypeScriptPydanticJacksonStruct typesPHPDocSerde

Resources

All SDKs provide access to the same 5 resources:
ResourceDescriptionMethods
emailsSend and manage emailssend, list, get, stats
attachmentsUpload file attachmentscreateUpload, confirm
listsManage contact listscreate, list, get, update, delete, stats
contactsManage list contactscreate, list, get, update, delete, suppress
verificationVerify email addressesverify, batch, get, list, stats

Common Features

All official SDKs include:

Automatic Retries

Exponential backoff for transient failures (5xx, rate limits)

Type Safety

Full type definitions for all params and responses

Error Handling

Typed exceptions with error codes and messages

API Key Security

Automatic redaction of keys in debug output

Client Initialization

import { MailBreeze } from "mailbreeze";

const mailbreeze = new MailBreeze({
  apiKey: process.env.MAILBREEZE_API_KEY,
  // Optional configuration
  baseUrl: "https://api.mailbreeze.com", // Custom API URL
  timeout: 30000, // Request timeout in ms
});

Error Handling

import { MailBreeze, MailBreezeError } from "mailbreeze";

try {
  await mailbreeze.emails.send({ ... });
} catch (error) {
  if (error instanceof MailBreezeError) {
    console.log(error.code);    // "VALIDATION_ERROR"
    console.log(error.message); // "Invalid email format"
    console.log(error.status);  // 400
  }
}

Choose Your Language

JavaScript

Full TypeScript support, ESM + CJS

Python

Async with Pydantic models

Java

Builder pattern with Jackson

Go

Idiomatic API with context support

PHP

PSR-4 with Guzzle HTTP

Rust

Async with Tokio + Serde