Documentation

Everything you need to start sending emails with AISend.

Quick Start

From signup to your first 201 Created with zero DNS setup. Your first send works immediately for an account created with a real email address; emailing other people adds one domain step.

  1. Create an account at aisend.app/signup to start your 3-day free trial (no card). AI agents: POST /api/v1/auth/agent-signup returns a key, but an agent account's address cannot receive mail, so skip the test send in step 3 and go to step 4 — an agent must verify a domain before any send
  2. Click the link in the verification email — sending is blocked until you do
  3. Copy your API key (format re_*) and send your first email now — from onboarding@aisend.app to your own account email. It works with no DNS setup. Sends to anyone else from that address are refused
  4. To reach your users, add and verify your sending domain (one DNS step; 1 included in the trial), then send from you@yourdomain.com to anyone

Already using Resend?

AISend speaks the same request format. To migrate, change one base URL and swap your key — no code rewrite. The endpoint also works without the /api/v1 prefix (POST /emails) so a Resend client only needs its base URL pointed at AISend.

# Resend
- https://api.resend.com/emails
# AISend (same body, same Bearer auth)
+ https://api.aisend.app/emails

Installation

npm
npm install aisend-email
pnpm
pnpm add aisend-email
yarn
yarn add aisend-email

Send Your First Email

Node.js / TypeScript

send-email.ts
import { AISend } from 'aisend-email';

const aisend = new AISend('re_your_api_key');

// Works on your first call — no domain setup. Sends to your own inbox.
const { id } = await aisend.emails.send({
  from: 'onboarding@aisend.app',
  to: 'you@youraccount.com',  // your account email on the shared address
  subject: 'Hello from AISend',
  html: '<p>Your first email!</p>',
});

console.log('Queued:', id);

// To email your users, verify your domain (1 included in the trial) and send from it:
//   from: 'you@yourdomain.com', to: anyone

cURL

Terminal
# Works on your first call — no domain setup. Sends to your own inbox.
curl -X POST https://api.aisend.app/api/v1/emails \
  -H "Authorization: Bearer re_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "onboarding@aisend.app",
    "to": "you@youraccount.com",
    "subject": "Hello from AISend",
    "html": "<p>Your first email!</p>"
  }'

Python

send_email.py
import requests

# Works on your first call — no domain setup. Sends to your own inbox.
response = requests.post(
    "https://api.aisend.app/api/v1/emails",
    headers={
        "Authorization": "Bearer re_your_api_key",
        "Content-Type": "application/json",
    },
    json={
        "from": "onboarding@aisend.app",
        "to": "you@youraccount.com",
        "subject": "Hello from AISend",
        "html": "<p>Your first email!</p>",
    },
)

print(response.json())

REST API Reference

Base URL: https://api.aisend.app (use /emails or /api/v1/emails)

Authentication

All requests require a Bearer token in the Authorization header.

Authorization: Bearer re_your_api_key

Endpoints

MethodEndpointDescription
POST/api/v1/emailsSend an email
GET/api/v1/emails/:idGet email status
GET/api/v1/emailsList emails
POST/api/v1/api-keysCreate API key
GET/api/v1/api-keysList API keys
DELETE/api/v1/api-keys/:idRevoke API key
POST/api/v1/email-validation/validateValidate email address
POST/api/v1/auth/agent-signupAI agent signup

Send Email — Request Body

POST /api/v1/emails
{
  "from": "hello@yourdomain.com",     // Required. An address on a domain you verified
  "to": "user@example.com",         // Required. String or array of strings
  "subject": "Email subject",       // Required
  "html": "<p>HTML body</p>",       // html or text required
  "text": "Plain text body"         // html or text required
}

Send Email — Response

A successful send returns 201 Created with the email ID. Use GET /api/v1/emails/:id to fetch full status and delivery details. A message the content check holds for review returns 202 with {"id": "...", "status": "quarantined"} and is not sent.

201 Created
{
  "id": "5212c581-d1ac-433f-a8f4-7d710240ec9c"
}

Idempotency

Include an Idempotency-Key header to prevent duplicate sends.

Idempotency-Key: unique-request-id-123

Custom Domains

To send from your own domain, add it in the dashboard and configure DNS records. AISend automatically generates SPF and DKIM records. Verification runs when you press Verify (or call the verify endpoint) and succeeds once the records are visible in public DNS; how long that takes depends on your DNS host. A newly verified domain has a low daily sending cap that rises over its first week.

Webhooks

Receive real-time delivery events via HTTP webhooks. Configure endpoints in the dashboard.

Event Types

email.sentemail.deliveredemail.openedemail.clickedemail.bouncedemail.complained

Webhook Payload

{
  "type": "email.delivered",
  "data": {
    "email_id": "5212c581-d1ac-433f-a8f4-7d710240ec9c",
    "to": "user@example.com",
    "timestamp": "2026-03-21T00:00:00.000Z"
  }
}

Verify webhook signatures using the x-webhook-signature header (HMAC-SHA256).

Email Validation

Validate email addresses before sending to reduce bounces.

POST /api/v1/email-validation/validate
// Request
{ "email": "user@example.com" }

// Response
{
  "email": "user@example.com",
  "valid": true,
  "checks": {
    "format": true,
    "mx": true,
    "disposable": false,
    "role": false
  },
  "risk": "low"
}

AI Agent Signup

AI agents can create an account and get an API key with a single request — no browser or email verification needed. The agent's @agent.aisend.app address cannot receive mail, so it must add and verify a domain it controls (POST /api/v1/domains, then POST /api/v1/domains/:id/verify) before its first send.

POST /api/v1/auth/agent-signup
// Request
{ "name": "My AI Agent" }

// Response
{
  "token": "eyJhbG...",
  "apiKey": "re_abc123...",
  "userId": "550e8400-...",
  "email": "my-ai-agent-a1b2c3@agent.aisend.app",
  "expiresAt": "2027-03-21T00:00:00.000Z"
}

Use the returned apiKey as a Bearer token. Agent accounts start on the 3-day free trial (500 emails, no credit card); after that, sending requires a paid plan.

MCP Server (Claude Integration)

Give Claude Desktop, Claude Code, or any MCP-compatible AI assistant the ability to send emails, check delivery status, validate addresses, and manage API keys — all through natural language. Works with Claude Code, Cursor, Claude Desktop, and other MCP clients that run local (stdio) servers.

Quick Setup

The server is the aisend-mcp package on npm. It runs locally over stdio through npx (Node.js 18+), so there is nothing to install globally. Replace re_your_api_key with a key from Dashboard → API Keys.

Claude Code

Terminal
claude mcp add aisend -e AISEND_API_KEY=re_your_api_key -- npx -y aisend-mcp

By default it is added for the current project only, in your private config. Add --scope user for every project, or --scope project to write the repo's shared .mcp.json (keep the key out of git). Run claude mcp list to check it connected.

Cursor

Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

~/.cursor/mcp.json
{
  "mcpServers": {
    "aisend": {
      "command": "npx",
      "args": ["-y", "aisend-mcp"],
      "env": { "AISEND_API_KEY": "re_your_api_key" }
    }
  }
}

Claude Desktop

Settings → Developer → Edit Config opens claude_desktop_config.json. Add the same block, then restart Claude Desktop:

claude_desktop_config.json
{
  "mcpServers": {
    "aisend": {
      "command": "npx",
      "args": ["-y", "aisend-mcp"],
      "env": { "AISEND_API_KEY": "re_your_api_key" }
    }
  }
}

AISend does not host a remote MCP endpoint yet, and there is no OAuth sign-in, so it cannot be added as a one-click connector in claude.ai or ChatGPT. Use the local server above with an API key.

Available Tools

ToolDescription
send_emailSend an email (from, to, subject, html/text, reply_to, idempotency_key). Sends real mail; cannot be undone
get_email_statusCheck delivery status of a sent email
list_emailsCompact list of sent emails (no bodies); filter by status, search, page with offset
validate_emailValidate an email address before sending
list_api_keysList all API keys
create_api_keyCreate a new API key
list_domainsList verified and pending domains
agent_signupCreate a new AISend account (no API key needed)

No API Key Yet? Agent Signup

Don't have an API key? Start the server without one and ask Claude to call theagent_signup tool. It creates an account and returns an API key, but it does not configure the server: put that key into AISEND_API_KEY, restart the MCP server, and then send. The key appears in the conversation, so treat the transcript as sensitive. An agent account's@agent.aisend.app address cannot receive mail or log in to the dashboard, so add and verify a sending domain with POST /api/v1/domains before sending.

Example Prompts for Claude

>"Send an email to team@example.com with a summary of today's meeting notes"
>"Check if the last email I sent was delivered"
>"Validate these email addresses before I send the newsletter: ..."
>"Create a new API key called 'production' and show me the key"
>"List all emails I sent today and show which ones bounced"

Error Handling

AISend uses standard HTTP status codes. Error responses include a JSON body with an error field.

StatusMeaning
200Success
400Bad request — check your parameters
401Unauthorized — invalid or missing API key
404Not found
422Validation error — check required fields
402Trial ended or no active subscription — the body carries an upgradeUrl
403Refused — unverified account email or domain, sending to others from the shared address, a suspended account, or a message the content check declined
429Rate limited, or a monthly, daily or new-domain sending limit was reached — check the message and the Retry-After header
500Server error — retry with exponential backoff
503Sending is temporarily paused account-wide

Ready to Start Sending?

3-day free trial, 500 emails, no credit card required.