---
title: "Free Transactional Email API Built To Deliver"
description: "Integrate and send emails quickly with AhaSend's Free Email API—send up to 1,000 emails/month for free. Our user-friendly APIs come with complete documentation and OpenAPI specs. Start sending fast, efficient, and reliable emails today!"
url: https://ahasend.com/free-email-api
markdown_url: https://ahasend.com/free-email-api.md
lang: en
type: page_builder
published: 2025-12-16
updated: 2026-09-02
---

# Free Transactional Email API Built To Deliver

AhaSend makes sending transactional emails simple — fast delivery, reliable performance, and built-in tracking, all for free.

- [Start Now For Free](https://dash.ahasend.com/user/register)
- [Pricing](https://ahasend.com/pricing)

## Integrate in minutes

Our APIs come with OpenAPI specs for easy and fast integration

### CLI

#### cURL

```bash
curl --request POST \
  --url https://api.ahasend.com/v2/accounts/{account_id}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: UNIQUE-KEY' \
  --data '{
    "from": {
      "email": "noreply@example.com",
      "name": "Example Corp"
    },
    "recipients": [
      {
        "email": "user@example.com",
        "name": "John Doe"
      }
    ],
    "subject": "Welcome to Example Corp",
    "html_content": "<h1>Welcome {{first_name}}!</h1>",
    "text_content": "Welcome {{first_name}}!",
    "substitutions": {
      "first_name": "John"
    }
  }'
```

#### AhaSend CLI

```bash
ahasend messages send \
  --account-id YOUR-ACCOUNT-ID \
  --api-key 'aha-sk-YOUR-API-KEY' \
  --from noreply@awesomeinc.com \
  --to recipient@email.com \
  --subject "Welcome to AhaSend" \
  --html "<h1>Welcome!</h1><p>Thank you for using AhaSend.</p>"
```

Need help getting started? [Check out our documentation](https://ahasend.com/docs) or [contact our support team](https://ahasend.com/contact)

### Go

#### Go

```go
package main

import (
  "context"

  "github.com/AhaSend/ahasend-go"
  "github.com/AhaSend/ahasend-go/api"
  "github.com/AhaSend/ahasend-go/models/common"
  "github.com/AhaSend/ahasend-go/models/requests"
  "github.com/google/uuid"
)

func main() {
  client := api.NewAPIClient(
    api.WithAPIKey("aha-sk-your-64-character-key"),
  )

  accountID := uuid.New()
  ctx := context.Background()

  // SDK automatically handles Idempotency and retries
  client.MessagesAPI.CreateMessage(
    ctx,
    accountID,
    requests.CreateMessageRequest{
      From: common.SenderAddress{
        Email: "info@example.com",
        Name:  ahasend.String("Example Corp."),
      },
      Recipients: []common.Recipient{
        {
          Email: "john@example.com",
          Name:  ahasend.String("John Smith"),
        },
      },
      Subject:     "Hello",
      TextContent: ahasend.String("Hello world!"),
      Sandbox:     ahasend.Bool(true),
    },
  )
}
```

Need help getting started? [Check out our documentation](https://ahasend.com/docs) or [contact our support team](https://ahasend.com/contact)

### JavaScript

Install dependencies:

```bash
npm install @ahasend/sdk
```

#### Node.js

```javascript
import { AhaSendClient } from "@ahasend/sdk";

const ahasend = new AhaSendClient({
  apiKey: process.env.AHASEND_API_KEY,
  accountId: process.env.AHASEND_ACCOUNT_ID,
});

const result = await ahasend.messages.send({
  from: { email: "hello@yourdomain.com", name: "Your App" },
  recipients: [{ email: "user@example.com", name: "Jane" }],
  subject: "Welcome to Your App",
  html_content: "<h1>Welcome aboard</h1>",
  text_content: "Welcome aboard",
  sandbox: true, // validates and queues without delivering
});

const accepted = result.data.filter((entry) =>
  entry.status === "queued" || entry.status === "scheduled"
);
const rejected = result.data.length - accepted.length;
if (rejected > 0 || accepted.length === 0) {
  console.error("AhaSend rejected recipients", { count: rejected });
  process.exitCode = 1;
} else {
  console.log("Sandbox messages accepted", { count: accepted.length });
}
```

Need help getting started? [Check out our documentation](https://ahasend.com/docs) or [contact our support team](https://ahasend.com/contact)

### Python

#### Python

```python
import requests

url = "https://api.ahasend.com/v2/accounts/{account_id}/messages"

payload = {
    "from": {
        "email": "noreply@example.com",
        "name": "Example Corp"
    },
    "recipients": [
        {
            "email": "user@example.com",
            "name": "John Doe",
            "substitutions": { "first_name": "John" }
        }
    ],
    "subject": "Welcome to Example Corp",
    "html_content": "<h1>Welcome {{first_name}}!</h1>",
    "text_content": "Welcome {{first_name}}!"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json",
    "Idempotency-Key": "UNIQUE-KEY",
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

Need help getting started? [Check out our documentation](https://ahasend.com/docs) or [contact our support team](https://ahasend.com/contact)

### PHP

#### PHP

```php
<?php
$email = [
  'from' => [
    'email' => 'noreply@example.com',
    'name' => 'Example Corp'
  ],
  'recipients' => [
    [
      'email' => 'user@example.com',
      'name' => 'John Doe',
      'substitutions' => [
        'first_name' => 'John'
      ]
    ]
  ],
  'subject' => 'Welcome to Example Corp',
  'html_content' => '<h1>Welcome {{first_name}}!</h1>',
  'text_content' => 'Welcome {{first_name}}!',
];
$headers = [
  'Content-type: application/json',
  'Authorization: Bearer <token>',
  'Idempotency-Key: UNIQUE-KEY'
];
$options = [
  'http' => [
    'header'  => implode("\r\n", $headers),
    'method'  => 'POST',
    'content' => json_encode($email)
  ]
];
$context  = stream_context_create($options);
$resp = file_get_contents('https://api.ahasend.com/v2/account/{account_id}/messages', FALSE, $context);
var_export($resp, TRUE);
```

#### Symfony

```php
<?php
// Using Symfony Mailer with AhaSend Bridge
// See: https://github.com/symfony/aha-send-mailer

use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\Mime\Email;

class EmailService
{
    public function __construct(
        private MailerInterface $mailer
    ) {}

    public function sendWelcomeEmail(string $userEmail, string $firstName): void
    {
        $email = (new Email())
            ->from('noreply@example.com')
            ->to($userEmail)
            ->subject('Welcome to Example Corp')
            ->html('<h1>Welcome {{first_name}}!</h1>')
            ->text('Welcome {{first_name}}!')
            ->getHeaders()
            ->addTextHeader('X-AhaSend-Substitutions', json_encode([
                'first_name' => $firstName
            ]));

        $this->mailer->send($email);
    }
}

// Configuration in .env:
// MAILER_DSN=ahasend+api://API_KEY@default
```

Need help getting started? [Check out our documentation](https://ahasend.com/docs) or [contact our support team](https://ahasend.com/contact)

### Ruby

#### Ruby

```ruby
require 'uri'
require 'net/http'
require 'json' # Required to convert the hash to a JSON string

url = URI("https://api.ahasend.com/v2/accounts/{account_id}/messages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request["Idempotency-Key"] = 'UNIQUE-KEY'

# Create a Ruby hash object for the request body
payload = {
  from: {
    email: "noreply@example.com",
    name: "Example Corp"
  },
  recipients: [
    {
      email: "user@example.com",
      name: "John Doe",
      substitutions: {
        first_name: "John"
      }
    }
  ],
  subject: "Welcome to Example Corp",
  html_content: "<h1>Welcome {{first_name}}!</h1>",
  text_content: "Welcome {{first_name}}!"
}

# Encode the Ruby hash into a JSON string for the request body
request.body = payload.to_json

response = http.request(request)
puts response.read_body
```

#### Rails

```ruby
# Using Rails ActionMailer with AhaSend configuration
# config/environments/production.rb

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  address: 'smtp.ahasend.com',
  port: 587,
  domain: 'yourdomain.com',
  user_name: 'your_smtp_username',
  password: 'your_smtp_password',
  authentication: 'plain',
  enable_starttls_auto: true
}

# app/mailers/application_mailer.rb
class ApplicationMailer < ActionMailer::Base
  default from: 'noreply@example.com'
  layout 'mailer'
end

# app/mailers/welcome_mailer.rb
class WelcomeMailer < ApplicationMailer
  def welcome_email(user)
    @user = user
    @first_name = user.first_name

    mail(
      to: @user.email,
      subject: 'Welcome to Example Corp',
      template_name: 'welcome'
    )
  end
end

# Usage:
WelcomeMailer.welcome_email(user).deliver_now
```

Need help getting started? [Check out our documentation](https://ahasend.com/docs) or [contact our support team](https://ahasend.com/contact)

---

### Late delivery is no delivery

When it comes to transactional emails like OTPs and Confirmation emails, delivery speed is everything. AhaSend is built for transactional emails and fast delivery. We consistently deliver emails to Gmail in under 1 seconds, and to other mailbox providers in less than 5 seconds.

Marketing emails are slow and cause delivery delays. We only send transactional emails to ensure high delivery speeds and impeccebale deliverability.

Get your emails to the inbox when it matters.

### Get access to raw delivery logs

We respect your intellect and don't dumb down or hide delivery logs!

Get access to raw delivery logs and gain visibility on the lowest level of email delivery details.

Quickly debug email delivery and deliverability issues with structured, searchable and raw SMTP response logs.

### Webhook Events for Your Emails

Build deep emails integrations using webhooks to receive real-time notifications on

- Email delivery events
- Suppression list events
- Tracking events
- Account related events (such as DNS misconfiguration)

[Learn more](https://ahasend.com/docs/integrations/webhooks)

### Route your inbound emails

Easily route inbound email to HTTP endpoints. AhaSend automatically parses inbound emails, removing signatures and quoted replies, and provinding the latest reply as a separate field. You can receive structured JSON or raw email data to your endpoints, allowing you to easily integrate emails with your ticketing, CRM or other systems.

[Learn more](https://ahasend.com/docs/integrations/routing)

_There's more_

## Everything You Need, Included

More features, at no additional cost. We don't like hidden fees either :)

- [Get Started For Free](https://dash.ahasend.com/user/register)

### SMTP Relay

Send emails from any programming language or software using our SMTP relay servers.

[Learn more](https://ahasend.com/free-smtp-server-relay)

### Email API

SMTP is good, but HTTP APIs are more flexible and faster for large senders.

[Learn more](https://ahasend.com/free-email-api)

### Engagement Tracking

Gain insight into your audience with detailed open and click tracking for every email.

[Learn more](https://ahasend.com/docs/tracking/open-tracking)

### Message Retention Policies

Customize retention policies for your message data and metadata.

[Learn more](https://ahasend.com/docs/retention)

### Email Archiving

Automatically archive emails to any S3-compatible service for compliance and long-term storage.

[Learn more](https://ahasend.com/docs/retention/s3)

### DNS Whitelabeling

Provide a seamless, branded experience for your customers with fully white-labeled DNS records.

[Learn more](https://ahasend.com/docs/scale/dns-whitelabel)

### Free Dedicated IPs

We reward high-volume senders with free IPs to protect and manage their reputation.

[Learn more](https://ahasend.com/docs/scale/dedicated-ips)

### IP Pools

Group dedicated IPs into pools to manage sending reputation across different mail streams.

[Learn more](https://ahasend.com/docs/scale/ip-pools)

### Bring Your Own IP (BYOIP)

Import and use your existing IP addresses on our platform for seamless migration.

[Learn more](https://ahasend.com/docs/scale/byoip)

### DKIM rotation

We automatically rotate DKIM keys, enhancing security.

[Learn more](https://ahasend.com/docs/domains#dkim-record-required)

### Management API

Manage domains, webhooks, supressions, routes, statistics, accounts and API keys

[Learn more](https://ahasend.com/docs/api-reference)

## Why choose AhaSend Free?

- **Instant Setup**: Get started in under 5 minutes. No complex configuration or setup required.
- **Global Delivery**: Deliver emails worldwide from our Multi-region infrastructure for optimized routing.
- **Enterprise Security**: Bank-level encryption and security practices protect your data.
- **No Hidden Fees**: What you see is what you get. Transparent pricing with no surprises.

## Start delivering your emails to the inbox now.

Integrate AhaSend email APIs in minutes with a free account. Start delivering emails to your customers with 1000 free emails per month.

- [Sign Up Now](https://dash.ahasend.com/user/register)
- [Read Documentation](https://ahasend.com/docs/quickstart)
