SDK libraries

Official clients for the same HTTP API. Every client uses a Bearer API key (`pg_`) and PIGEON_BASE_URL (default http://localhost:4005).

Install from the private pigeonfs GitHub org. Each language page has a highlighted send example you can copy.

Node SDK

github.com/pigeonfs/pigeon-node
JavaScript
import { Pigeon } from "pigeon";

const pigeon = new Pigeon("pg_your_key", { baseUrl: "http://localhost:4005" });

const email = await pigeon.emails.send({
  from: "Ada <ada@yourdomain.com>",
  to: ["person@example.com"],
  subject: "Hello",
  html: "<p>Hello</p>"
});
Node install and API

Python SDK

github.com/pigeonfs/pigeon-python
Python
import pigeon

pigeon.api_key = "pg_your_key"

email = pigeon.Emails.send({
    "from": "Ada <ada@yourdomain.com>",
    "to": ["person@example.com"],
    "subject": "Hello",
    "html": "<strong>hello, world!</strong>",
})
print(email["id"])
Python install and API

Go SDK

github.com/pigeonfs/pigeon-go
Go
package main

import (
    "context"
    "fmt"
    "log"

    pigeon "github.com/pigeonfs/pigeon-go"
)

func main() {
    client := pigeon.NewClient("pg_your_key")
    email, err := client.Emails.Send(context.Background(), &pigeon.SendEmailRequest{
        From:    "Ada <ada@yourdomain.com>",
        To:      []string{"person@example.com"},
        Subject: "hello world",
        Html:    "<strong>it works!</strong>",
    })
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("Email %s has been sent\n", email.Id)
}
Go install and API

Java SDK

github.com/pigeonfs/pigeon-java
Java
import io.github.pigeonfs.Pigeon;
import io.github.pigeonfs.emails.CreateEmailOptions;
import io.github.pigeonfs.emails.CreateEmailResponse;

public class Main {
    public static void main(String[] args) {
        Pigeon pigeon = new Pigeon("pg_your_key");

        CreateEmailOptions params = CreateEmailOptions.builder()
                .from("Ada <ada@yourdomain.com>")
                .to("person@example.com")
                .subject("Hello from Java!")
                .html("<strong>it works!</strong>")
                .build();

        CreateEmailResponse data = pigeon.emails().send(params);
        System.out.println(data.getId());
    }
}
Java install and API

Rust SDK

github.com/pigeonfs/pigeon-rust
Rust
use pigeon::{Pigeon, SendEmailRequest};

#[tokio::main]
async fn main() -> Result<(), pigeon::Error> {
    let pigeon = Pigeon::new("pg_your_key");
    let email = pigeon
        .emails
        .send(&SendEmailRequest {
            from: "Ada <ada@yourdomain.com>".into(),
            to: vec!["person@example.com".into()],
            subject: "Hello from Rust".into(),
            html: Some("<p>Hello</p>".into()),
            ..Default::default()
        })
        .await?;
    println!("Email {} has been sent", email.id);
    Ok(())
}
Rust install and API

CLI

github.com/pigeonfs/pigeon-cli
CLI
export PIGEON_API_KEY=pg_your_key

pigeon emails send \
  --from "Ada <ada@yourdomain.com>" \
  --to person@example.com \
  --subject "Hello from Pigeon CLI" \
  --text "Sent from my terminal."

pigeon domains list
pigeon doctor
CLI install and commands

Phoenix SDK

github.com/pigeonfs/pigeon-phoenix
Elixir
config :my_app, MyApp.Mailer,
  adapter: Swoosh.Adapters.Pigeon,
  api_key: System.get_env("PIGEON_API_KEY"),
  base_url: System.get_env("PIGEON_BASE_URL") || "http://localhost:4005"

import Swoosh.Email

new()
|> from({"Ada", "ada@yourdomain.com"})
|> to("person@example.com")
|> subject("Hello")
|> html_body("<p>Hello</p>")
|> MyApp.Mailer.deliver()
Phoenix and Swoosh setup

MCP server

github.com/pigeonfs/pigeon-mcp
JavaScript
{
  "mcpServers": {
    "pigeon": {
      "command": "npx",
      "args": ["-y", "github:pigeonfs/pigeon-mcp"],
      "env": {
        "PIGEON_API_KEY": "pg_your_key",
        "PIGEON_BASE_URL": "http://localhost:4005",
        "SENDER_EMAIL_ADDRESS": "ada@yourdomain.com"
      }
    }
  }
}
MCP install for Cursor

React Email

github.com/pigeonfs/react-email
JavaScript
import { Html, Head, Preview, Body, Container, Heading, Text, render } from "@pigeonfs/react-email";
import { Pigeon } from "pigeon";

export function Welcome({ firstName }) {
  return (
    <Html>
      <Head />
      <Preview>Welcome to Pigeon</Preview>
      <Body>
        <Container>
          <Heading>Welcome, {firstName}</Heading>
          <Text>Thanks for trying Pigeon.</Text>
        </Container>
      </Body>
    </Html>
  );
}

const pigeon = new Pigeon("pg_your_key");
await pigeon.emails.send({
  from: "Ada <ada@yourdomain.com>",
  to: "person@example.com",
  subject: "Welcome",
  html: await render(Welcome({ firstName: "Ada" }))
});
React Email templates API reference Supabase Edge Function

© 2026 Pigeon. Email on your Amazon SES account.