AxeneAxene Docs
SDKs

SDKs and Libraries

Official Axene Mailer client libraries for nine languages, all covering the same API surface.

Axene Mailer ships official, open-source client libraries for nine languages. Every SDK wraps the same REST API and exposes the same resources (emails, domains, contacts, suppressions, templates, and webhooks), so the concepts you learn in one carry over to the rest. Each one handles authentication, JSON encoding, retries on 429 and 5xx, and maps API errors to a typed AxeneError you can catch.

All libraries are MIT licensed.

Install

LanguageInstallPackageRegistry
TypeScript / JavaScriptnpm install @axene/mailer@axene/mailernpm
Pythonpip install axene-maileraxene-mailerPyPI
Gogo get github.com/Axene-Solutions/axene-mailer-goaxene-mailer-goGo modules
PHPcomposer require axene/maileraxene/mailerPackagist
Rubygem install axene-maileraxene-mailerRubyGems
Rustcargo add axene-maileraxene-mailercrates.io
Javaimplementation("io.axene:mailer:0.1.0")io.axene:mailerMaven Central
.NET (C#)dotnet add package Axene.MailerAxene.MailerNuGet
SwiftSwiftPM (see the Swift guide)AxeneMailerSwiftPM

Get an API key from the dashboard at mail.axene.io under Settings -> API Keys. Keys start with axm_k_ and are passed as a bearer token, which every SDK does for you.

Send your first email

The same call in every language. The sender must be a registered sender address on a verified domain.

import { Axene } from '@axene/mailer';
 
const axene = new Axene({ apiKey: process.env.AXENE_API_KEY! });
 
const { id } = await axene.emails.send({
  from: '[email protected]',
  to: '[email protected]',
  subject: 'Your receipt',
  html: '<p>Thanks for your order.</p>',
});
 
console.log(id);

What every SDK gives you

  • Typed client built from one API key, with sensible defaults (base URL https://mail.axene.io, 3 retries, 30s timeout) you can override.
  • All six core resources: emails, domains, contacts, suppressions, templates, webhooks.
  • Automatic retries on 429 and 5xx with backoff that honours Retry-After. 4xx responses are never retried.
  • Typed errors: failures raise an AxeneError carrying the HTTP status, an optional machine-readable code, and a message.
  • Address shorthand: anywhere a sender or recipient is expected, a bare string like "[email protected]" works, or pass a name with it.

Conventions

A few rules hold across the whole API and every SDK:

  • Pagination is zero-based: page=0 is the first page.
  • List endpoints return a plain array; paginated endpoints (suppressions, webhook deliveries) return an envelope with items, total, page, and limit.
  • The sender field is sent on the wire as from_, but every SDK exposes a clean from and maps it for you.

Next steps

  • Pick your language above for a full guide with every resource and method.
  • Browse the API reference for the raw HTTP endpoints behind each SDK call.
  • Read the Quickstart to set up a domain and sender before your first send.

On this page