Official SDKs
Official client libraries for seven languages, ready to download and drop into your project.
wemail ships official client libraries for seven languages, each an idiomatic, thin wrapper over the v3 REST API. Download the one you need from this page — no build step required.
| Parameter | Type | Required | Description |
|---|---|---|---|
Node.js / TypeScript | Node 18+ | Optional | ESM and CJS. Download: available (beta) · registry: coming soon. |
Python | Python 3.9+ | Optional | Sync and async clients. Download: available (beta) · registry: coming soon. |
PHP | PHP 8.1+ | Optional | PSR-18 / PSR-7 compatible. Download: available (beta) · registry: coming soon. |
Ruby | Ruby 3.0+ | Optional | Faraday-based. Download: available (beta) · registry: coming soon. |
Go | Go 1.21+ | Optional | Context-aware, zero external dependencies. Download: available (beta) · registry: coming soon. |
Java | Java 11+ | Optional | Synchronous & async (CompletableFuture). Download: available (beta) · registry: coming soon. |
C# / .NET | .NET 8+ | Optional | Async-first. Download: available (beta) · registry: coming soon. |
Code examples
cURL
curl -X POST https://api.wemail.io/v3/messages \
-H "Authorization: Bearer afn_live_pK7…b9aF" \
-H "Content-Type: application/json" \
-d '{
"from": "noreply@updates.acme.io",
"to": ["alex@example.com"],
"subject": "Welcome to Acme",
"html": "<h1>Hi Alex</h1><p>Glad to have you.</p>",
"tags": ["welcome", "v2"],
"headers": { "X-TES-MSGID": "tes-7f3a9c" }
}'Node.js
import { WemailClient } from "@wemail/sdk";
const wemail = new WemailClient(process.env.WEMAIL_API_KEY);
const { id } = await wemail.sendMessage({
from: "noreply@updates.acme.io",
to: ["alex@example.com"],
subject: "Welcome to Acme",
html: "<h1>Hi Alex</h1><p>Glad to have you.</p>",
tags: ["welcome", "v2"],
// stamped on the email, echoed on every webhook, returned by GET /v3/messages/{id}
headers: { "X-TES-MSGID": "tes-7f3a9c" },
});Python
from wemail.client import WemailClient
wemail = WemailClient(api_key=os.environ["WEMAIL_API_KEY"])
msg = wemail.send_message({
"from": "noreply@updates.acme.io",
"to": ["alex@example.com"],
"subject": "Welcome to Acme",
"html": "<h1>Hi Alex</h1><p>Glad to have you.</p>",
"tags": ["welcome", "v2"],
})PHP
<?php
$wemail = new \Wemail\WemailClient(getenv('WEMAIL_API_KEY'));
$msg = $wemail->sendMessage([
'from' => 'noreply@updates.acme.io',
'to' => ['alex@example.com'],
'subject' => 'Welcome to Acme',
'html' => '<h1>Hi Alex</h1>',
'tags' => ['welcome', 'v2'],
]);Ruby
wemail = Wemail::Client.new(api_key: ENV["WEMAIL_API_KEY"])
msg = wemail.send_message(
from: "noreply@updates.acme.io",
to: ["alex@example.com"],
subject: "Welcome to Acme",
html: "<h1>Hi Alex</h1>",
tags: ["welcome", "v2"]
)Go
client, err := wemail.NewClient(os.Getenv("WEMAIL_API_KEY"))
msg, err := client.SendMessage(wemail.SendMessageRequest{
From: "noreply@updates.acme.io",
To: []string{"alex@example.com"},
Subject: "Welcome to Acme",
Html: wemail.PtrString("<h1>Hi Alex</h1>"),
Tags: []string{"welcome", "v2"},
})Java
WemailClient wemail = new WemailClient(System.getenv("WEMAIL_API_KEY"));
SendMessage202Response msg = wemail.sendMessage(new SendMessageRequest()
.from("noreply@updates.acme.io")
.to(List.of("alex@example.com"))
.subject("Welcome to Acme")
.html("<h1>Hi Alex</h1>")
.tags(List.of("welcome", "v2")));.NET
var wemail = new WemailClient(Environment.GetEnvironmentVariable("WEMAIL_API_KEY"));
var msg = await wemail.SendMessageAsync(new SendMessageRequest {
From = "noreply@updates.acme.io",
To = new List<string> { "alex@example.com" },
Subject = "Welcome to Acme",
Html = "<h1>Hi Alex</h1>",
Tags = new List<string> { "welcome", "v2" },
});ResponseExample response
{
"id": "msg_01HBYE7K9Z4PMQDR3W",
"status": "queued",
"created_at": "2026-05-10T09:42:18Z",
"from": "noreply@updates.acme.io",
"to": ["alex@example.com"],
"tags": ["welcome", "v2"],
"headers": { "X-TES-MSGID": "tes-7f3a9c" }
}