SDKs

Official send.io libraries, package name sendio in every language. Each one reads the key from SENDIO_API_KEY and talks to https://api.send.io.

Node.js (npm: @sendio/node)

npm install @sendio/node

Node.js 20 or newer. ESM, CommonJS and TypeScript types included. new Sendio() reads SENDIO_API_KEY, or pass the key as the first argument.

import { Sendio } from "@sendio/node";

const sendio = new Sendio(process.env.SENDIO_API_KEY);

const { data, error } = await sendio.emails.send({
  from: "Acme <onboarding@send.io>",
  to: ["delivered@send.io"],
  subject: "Hello from send.io",
  html: "<strong>It works!</strong>",
});

if (error) console.error(error);
else console.log(`Email ${data.id} accepted`);

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Batch:

await sendio.batch.send([
  { from: "Acme <onboarding@yourdomain.com>", to: ["a@example.com"], subject: "Hi A", html: "<p>A</p>" },
  { from: "Acme <onboarding@yourdomain.com>", to: ["b@example.com"], subject: "Hi B", html: "<p>B</p>" },
]);

Schedule:

await sendio.emails.send(
  { from: "Acme <onboarding@yourdomain.com>", to: ["delivered@send.io"], subject: "Later", html: "<p>Hi</p>", scheduledAt: "2026-12-01T09:00:00Z" },
  { idempotencyKey: "welcome-user-123" },
);

Retrieve:

const { data } = await sendio.emails.get("EMAIL_ID");
console.log(data?.last_event);

Python (PyPI: sendio)

pip install sendio
# async client (httpx):
pip install "sendio[async]"

Python 3.7 or newer. Sync and async clients. sendio.api_key defaults to the SENDIO_API_KEY environment variable.

import sendio

sendio.api_key = "mx_your_api_key"

email = sendio.Emails.send({
    "from": "Acme <onboarding@send.io>",
    "to": ["delivered@send.io"],
    "subject": "Hello from send.io",
    "html": "<strong>It works!</strong>",
})
print(email["id"])

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Batch:

sendio.Batch.send([
    {"from": "Acme <onboarding@yourdomain.com>", "to": ["a@example.com"], "subject": "Hi A", "html": "<p>A</p>"},
    {"from": "Acme <onboarding@yourdomain.com>", "to": ["b@example.com"], "subject": "Hi B", "html": "<p>B</p>"},
])

Idempotency:

sendio.Emails.send(params, {"idempotency_key": "welcome-user-123"})

Retrieve:

email = sendio.Emails.get("EMAIL_ID")
print(email["last_event"])

PHP (Packagist: sendio/sendio-php)

composer require sendio/sendio-php

PHP 8.1 or newer. Pass the key to Sendio::client(); the base URL can be passed too, or set SENDIO_BASE_URL.

<?php
require __DIR__ . '/vendor/autoload.php';

$sendio = Sendio::client(getenv('SENDIO_API_KEY'));

$email = $sendio->emails->send([
    'from' => 'Acme <onboarding@send.io>',
    'to' => ['delivered@send.io'],
    'subject' => 'Hello from send.io',
    'html' => '<p>It works!</p>',
]);

echo $email->id;

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Batch:

$result = $sendio->batch->send([
    ['from' => 'Acme <onboarding@yourdomain.com>', 'to' => ['a@example.com'], 'subject' => 'Hi A', 'text' => 'A'],
    ['from' => 'Acme <onboarding@yourdomain.com>', 'to' => ['b@example.com'], 'subject' => 'Hi B', 'text' => 'B'],
]);

Idempotency:

$sendio->emails->send($params, ['idempotency_key' => 'welcome-user/123']);

Laravel (Packagist: sendio/sendio-laravel)

composer require sendio/sendio-laravel

Laravel 10 or newer. Works with php artisan config:cache. Add SENDIO_API_KEY and MAIL_MAILER=sendio to .env, and a sendio mailer to config/mail.php.

// config/mail.php, in "mailers":
'sendio' => ['transport' => 'sendio'],

// .env
// SENDIO_API_KEY=mx_your_api_key
// MAIL_MAILER=sendio
// MAIL_FROM_ADDRESS=onboarding@send.io

use Illuminate\Support\Facades\Mail;

Mail::to('delivered@send.io')->send(new App\Mail\OrderShipped($order));

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Facade:

use Sendio\Laravel\Facades\Sendio;

Sendio::emails()->send([
    'from' => 'Acme <onboarding@yourdomain.com>',
    'to' => ['delivered@send.io'],
    'subject' => 'Hello from send.io',
    'html' => '<p>It works!</p>',
]);

Raw mail:

Mail::raw('It works!', fn ($m) => $m->to('delivered@send.io')->subject('Hello from send.io'));

Ruby (RubyGems: sendio)

gem install sendio
# or in your Gemfile:
# gem "sendio"

Ruby 3.2 or newer. Set Sendio.api_key, usually from ENV["SENDIO_API_KEY"].

require "sendio"

Sendio.api_key = ENV["SENDIO_API_KEY"]

email = Sendio::Emails.send({
  from: "Acme <onboarding@send.io>",
  to: ["delivered@send.io"],
  subject: "Hello from send.io",
  html: "<strong>It works!</strong>"
})

puts email[:id]

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Batch:

Sendio::Batch.send([
  { from: "Acme <onboarding@yourdomain.com>", to: ["a@example.com"], subject: "Hi A", html: "<p>A</p>" },
  { from: "Acme <onboarding@yourdomain.com>", to: ["b@example.com"], subject: "Hi B", html: "<p>B</p>" }
])

Go (Go modules: github.com/send-io/sendio-go)

go get github.com/send-io/sendio-go

Go 1.23 or newer. Every method has a ...WithContext variant. sendio.NewClient("") falls back to the SENDIO_API_KEY environment variable.

package main

import (
	"fmt"
	"os"

	"github.com/send-io/sendio-go"
)

func main() {
	client := sendio.NewClient(os.Getenv("SENDIO_API_KEY"))

	sent, err := client.Emails.Send(&sendio.SendEmailRequest{
		From:    "Acme <onboarding@send.io>",
		To:      []string{"delivered@send.io"},
		Subject: "Hello from send.io",
		Html:    "<p>It works!</p>",
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(sent.Id)
}

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Idempotency:

sent, err := client.Emails.SendWithOptions(ctx, params, &sendio.SendEmailOptions{
	IdempotencyKey: "welcome-user-123",
})

Java (Maven Central: io.send:sendio-java)

<!-- Maven -->
<dependency>
  <groupId>io.send</groupId>
  <artifactId>sendio-java</artifactId>
  <version>1.1.0</version>
</dependency>

// Gradle
implementation 'io.send:sendio-java:1.1.0'

Java 8 or newer. new Sendio() reads SENDIO_API_KEY, or pass the key to the constructor or the builder.

import io.send.sendio.Sendio;
import io.send.sendio.services.emails.model.CreateEmailOptions;
import io.send.sendio.services.emails.model.CreateEmailResponse;

public class Main {
  public static void main(String[] args) throws Exception {
    Sendio sendio = new Sendio(System.getenv("SENDIO_API_KEY"));

    CreateEmailOptions params = CreateEmailOptions.builder()
        .from("Acme <onboarding@send.io>")
        .to("delivered@send.io")
        .subject("Hello from send.io")
        .html("<strong>It works!</strong>")
        .build();

    CreateEmailResponse data = sendio.emails().send(params);
    System.out.println(data.getId());
  }
}

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

.NET (NuGet: Sendio)

dotnet add package Sendio
# optional: Sendio.Webhooks (ASP.NET webhook verification), Sendio.FluentEmail

.NET 8 or newer. Dependency injection with services.AddSendio(). SendioClient.Create() reads SENDIO_API_KEY, or pass the key.

using Sendio;

ISendio sendio = SendioClient.Create(Environment.GetEnvironmentVariable("SENDIO_API_KEY")!);

var resp = await sendio.EmailSendAsync(new EmailMessage
{
    From = "Acme <onboarding@send.io>",
    To = "delivered@send.io",
    Subject = "Hello from send.io",
    HtmlBody = "<strong>It works!</strong>",
});

Console.WriteLine(resp.Content); // the email id

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Dependency injection:

builder.Services.AddSendio(o =>
{
    o.ApiToken = builder.Configuration["Sendio:ApiKey"]!;
});

// then inject ISendio wherever you send

Rust (crates.io: sendio)

cargo add sendio
cargo add tokio -F macros,rt-multi-thread

Async by default; enable the blocking feature for a synchronous client. Sendio::default() reads SENDIO_API_KEY, or use Sendio::new("mx_...").

use sendio::types::CreateEmailBaseOptions;
use sendio::{Result, Sendio};

#[tokio::main]
async fn main() -> Result<()> {
    let sendio = Sendio::default();

    let email = CreateEmailBaseOptions::new(
        "Acme <onboarding@send.io>",
        ["delivered@send.io"],
        "Hello from send.io",
    )
    .with_html("<p>It works!</p>");

    let sent = sendio.emails.send(email).await?;
    println!("id: {}", sent.id);
    Ok(())
}

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Elixir (Hex: sendio)

# mix.exs
def deps do
  [{:sendio, "~> 1.0"}]
end

Elixir 1.14 or newer. Configure config :sendio, Sendio.Client, api_key: ...; without it SENDIO_API_KEY is used.

# config/config.exs (a Phoenix app already sets this)
config :swoosh, :api_client, Swoosh.ApiClient.Req

# config/runtime.exs
config :sendio, Sendio.Client, api_key: System.fetch_env!("SENDIO_API_KEY")

{:ok, email} =
  Sendio.Emails.send(%{
    from: "Acme <onboarding@send.io>",
    to: "delivered@send.io",
    subject: "Hello from send.io",
    html: "<strong>It works!</strong>"
  })

email.id

The example sends from onboarding@send.io to delivered@send.io, which works on a new account before you add a domain. onboarding@send.io can only send to test addresses. To email real people, send from an address on a domain you verified. A free mailbox works too once Mailboxes shows it can send.

Rate limit: 10 requests per second per team by default (the ratelimit-limit header shows yours). A batch call is one request for up to 100 emails. On a 429 rate_limit_exceeded, wait the Retry-After seconds, then retry with the same idempotency key. Do not retry daily_quota_exceeded or monthly_quota_exceeded: they do not clear in seconds. The Rust retry helper retries every 429 and blocks for ratelimit-reset seconds, potentially until 00:00 UTC on a daily quota. Use direct Rust calls if that wait is unacceptable.

Loading your dashboard