← All API sections

Quickstart

Send your first email in 90 seconds

Send your first email in 90 seconds

1. Get an API key

Sign up at dashboard.euromail.dev and create an API key on the API Keys page.

2. Send an email

Pick your language:

cURL

curl -X POST https://api.euromail.dev/v1/emails \
  -H "X-EuroMail-Api-Key: em_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Hello from EuroMail",
    "html_body": "<h1>It works!</h1><p>Your first email via EuroMail.</p>"
  }'

TypeScript

npm install @euromail/sdk
import { EuroMail } from "@euromail/sdk";

const euromail = new EuroMail({ apiKey: process.env.EUROMAIL_API_KEY! });

const result = await euromail.sendEmail({
  from: "[email protected]",
  to: "[email protected]",
  subject: "Hello from EuroMail",
  html_body: "<h1>It works!</h1>",
});

console.log(result.id, result.status); // uuid, "queued"

Python

pip install euromail
import os
from euromail import EuroMail

client = EuroMail(api_key=os.environ["EUROMAIL_API_KEY"])

response = client.send_email(
    from_address="[email protected]",
    to="[email protected]",
    subject="Hello from EuroMail",
    html_body="<h1>It works!</h1>",
)

print(response.id, response.status)  # uuid, "queued"

Rust

[dependencies]
euromail = "0.2"
tokio = { version = "1", features = ["full"] }
use euromail::{EuroMail, SendEmailParams};

#[tokio::main]
async fn main() -> Result<(), euromail::EuroMailError> {
    let client = EuroMail::new(std::env::var("EUROMAIL_API_KEY").unwrap());

    let response = client.send_email(&SendEmailParams {
        from: "[email protected]".into(),
        to: "[email protected]".into(),
        subject: Some("Hello from EuroMail".into()),
        html_body: Some("<h1>It works!</h1>".into()),
        ..Default::default()
    }).await?;

    println!("{} {}", response.id, response.status);
    Ok(())
}

Go

go get github.com/kalle-works/euromail-go
package main

import (
    "context"
    "fmt"
    "os"

    euromail "github.com/kalle-works/euromail-go"
)

func main() {
    client := euromail.NewClient(os.Getenv("EUROMAIL_API_KEY"))

    resp, err := client.SendEmail(context.Background(), euromail.SendEmailParams{
        From:     "[email protected]",
        To:       euromail.ToRecipient("[email protected]"),
        Subject:  euromail.String("Hello from EuroMail"),
        HTMLBody: euromail.String("<h1>It works!</h1>"),
    })
    if err != nil {
        panic(err)
    }
    fmt.Println(resp.ID, resp.Status)
}

3. Check the response

A successful send returns 202 Accepted:

{
  "data": {
    "id": "a1b2c3d4-...",
    "message_id": "<[email protected]>",
    "status": "queued",
    "to": "[email protected]",
    "sandbox": true,
    "created_at": "2026-03-29T10:00:00Z"
  }
}

"sandbox": true means your domain isn't verified yet. The email will only be delivered to your account's email address. Once you verify your domain, emails go to any recipient.

Add your sending domain and configure DNS records:

# Add the domain
curl -X POST https://api.euromail.dev/v1/domains \
  -H "X-EuroMail-Api-Key: em_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"domain": "yourdomain.com"}'

The response includes DNS records to add under the em. subdomain (e.g. em.yourdomain.com). This keeps your transactional email reputation separate from your root domain. You'll need a DKIM TXT record, an SPF TXT record, and an MX record. Add them at your DNS provider, then verify:

curl -X POST https://api.euromail.dev/v1/domains/{domain_id}/verify \
  -H "Authorization: Bearer em_live_your_key_here"

See the full Domain Verification guide for step-by-step instructions per DNS provider.

What's next?

  • Templates -- Create reusable email templates with MiniJinja syntax
  • Webhooks -- Get real-time delivery, bounce, and open events
  • Email Validation -- Check if an address is valid before sending
  • Multiple recipients -- Pass an array to the to field: "to": ["[email protected]", "[email protected]"]
  • Batch sending -- Send up to 500 emails in one request with POST /v1/emails/batch
  • GDPR Tooling -- Export and erase user data for compliance

API reference

Full interactive API docs at api.euromail.dev/docs.