Skip to main content
Send your first email with AhaSend by verifying a domain, creating a credential, and calling the REST API or connecting to the SMTP relay.
Before you start: You’ll need an AhaSend account. Sign up for free to get 1,000 emails per month at no cost.

Sign Up & Verify Email

  1. Sign up for a free account
  2. Verify your email address by clicking the link in your inbox
  3. Log in to your dashboard to continue setup

Add & Configure Domain

Before you can send emails, you need to add and verify your domain:
  1. Add your domain in your dashboard under Domains
  2. Add the DNS records provided by AhaSend to your domain’s DNS settings
  3. Wait for verification (usually takes a few minutes)
Need help with domain setup? Check out our detailed domain configuration guide for the required DNS records and links to DNS provider help.
Important: You cannot send emails until your domain is verified. The verification process ensures good deliverability and prevents spoofing.

Choose Sending Method

Decide how you want to send emails:

HTTP API

Recommended for most applications
  • Faster and more reliable
  • Better error handling
  • Rich metadata support

SMTP Relay

Use with existing email libraries
  • Works with any SMTP-compatible library
  • Easy migration from other providers
  • Supports all programming languages

Create Sending Credentials

Create the appropriate credentials for your chosen method:For HTTP API:
  • Go to Credentials → Add in your dashboard and choose API Key v2 for a send-only key (or use a full API v2 key with a send scope from Account Settings → API Keys)
  • Click “Create API Key”
  • Copy and securely store your API key
For SMTP:
  • Go to SMTP Credentials in your dashboard
  • Click “Create SMTP Credential”
  • Save the username and password
Keep your credentials secure! Never commit them to version control or expose them in client-side code.

Send & Verify First Email

Send your first email using the code examples below, then verify delivery:After sending:
  1. Check your inbox - Your test email should arrive within seconds
  2. Check the Messages page in your dashboard to see delivery status
  3. Look for a 202 response with a message ID
Success! See your email in both your inbox and the Messages page? You’re all set up! 🎉
Jump to: HTTP API | SMTP Relay

Official SDKs

Node.js and TypeScript SDK

Install @ahasend/sdk, send a sandbox email and handle each recipient result.

Go SDK

Install ahasend-go, send a sandbox email and verify webhook signatures.
Choose a framework or platform guide for the full integration, or use the CLI quickstart to send from your terminal.

How Do I Send Through the HTTP API?

Call POST https://api.ahasend.com/v2/accounts/{account_id}/messages with your API key and a sender on your verified domain. See API authentication for the header and sending limits before adding recipients.
API Version Note: These examples use our latest API v2, which provides the most powerful features including advanced tracking, bulk sending, and better error handling. Existing v1 integrations can use the legacy API v1 reference; use v2 for new integrations.

Basic Email

Replace the placeholders:
  • YOUR_API_KEY with your actual API key from Step 4
  • {account_id} with your account ID from your dashboard
  • hello@yourdomain.com with your verified domain from Step 2
  • john@example.com with the recipient’s email address

How Do I Send Through SMTP?

Use our SMTP servers with any email library. Great for existing applications or when you need SMTP compatibility.

SMTP Settings

Get SMTP credentials: You should have created these in Step 4. If not, go to your dashboard → Credentials → Create New Credential

SMTP Examples


Next Steps

Now that you’ve sent your first email, here’s what to do next:

Set up Domains

Add and verify domains for better deliverability and custom from addresses

Send with SMTP

Use SMTP credentials to send emails through your existing email libraries

Send with API

Advanced API features like templates, attachments, and bulk sending

Sandbox SMTP

Test safely with sandbox mode to avoid sending emails to real recipients

Why Did My First Send Fail?

Having issues? Here are the most common problems:
  • Check that your API key is correct and properly formatted
  • Make sure you’re using the Authorization: Bearer header format
  • Verify your API key has the correct scopes in your dashboard
  • Most records verify within minutes. DNS changes can take up to 48 hours to propagate.
  • Double-check that you added all required DNS records exactly as shown
  • Use a DNS checker tool to verify your records are live
  • Contact support if verification fails after 48 hours
  • Double-check your SMTP username and password
  • Make sure you created SMTP credentials in your dashboard (not your login password)
  • Try port 2525 if 587 is blocked by your network
  • Check your dashboard message logs for delivery status
  • Verify the recipient email address is correct
  • Check the recipient’s spam folder
  • Make sure you’re not hitting monthly allowance (the Free plan includes 1,000 emails/month); see API rate limits for request limits
Need more help? Email our engineering team at support@ahasend.com - we typically respond within a few hours!

Domain, Delivery and Migration Guides