# AhaSend > AhaSend is a European transactional email service for developers: send through a REST API, SMTP relay, CLI or the official Node.js and Go SDKs, with data stored in the EU and 1,000 free emails per month. > ## Agent Instructions > AhaSend stores all message data in the EU. See /facts. > The API base URL is https://api.ahasend.com. Send the API key in the Authorization: Bearer header. See /api-reference/authentication. > Use send.ahasend.com for SMTP. Ports 25, 587 and 2525 use STARTTLS. Port 465 is not supported. See /smtp. > For send-only integrations, create an API Key v2 under Credentials → Add and scope it to messages:send:{your-domain}. See /send-api/credentials and /api-reference/scopes. - [Transactional Email, SMTP Relay and Campaigns Docs](https://ahasend.com/docs/index.md): AhaSend docs: send transactional email with the REST API, SMTP relay, CLI or SDKs, send campaigns with Campaign Builder, and track events with webhooks. - [What Is AhaSend? Key Facts and Limits](https://ahasend.com/docs/facts.md): Check AhaSend's EU data location, free email allowance, plan features, API and SMTP limits, retention settings, and dedicated IP availability. - [Quickstart: Send Your First Email](https://ahasend.com/docs/quickstart.md): Send your first email with AhaSend: verify a domain, create an API key or SMTP credential, then send with cURL, Node.js, Python, PHP or Go. - [Domain Setup: SPF, DKIM and DMARC Records](https://ahasend.com/docs/domains.md): Add and verify your sending domain in AhaSend: publish the SPF, DKIM (CNAME), DMARC, return-path and tracking DNS records, then run the DNS check. - [SPF, DKIM and DMARC for Transactional Email](https://ahasend.com/docs/email-authentication.md): Understand SPF, DKIM and DMARC for AhaSend transactional email, check domain alignment, avoid duplicate records and choose a policy for all your senders. - [DNS Provider Setup Guides](https://ahasend.com/docs/dns/index.md): Find AhaSend DNS setup steps for Cloudflare, GoDaddy, Route 53 and other providers, with SPF, DKIM and DMARC names, values and verification tips. - [Cloudflare DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/cloudflare.md): Add AhaSend SPF, DKIM and DMARC records in Cloudflare: find the DNS form, enter the right names and values, then verify your sending domain. - [GoDaddy DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/godaddy.md): Add AhaSend SPF, DKIM and DMARC records in GoDaddy: find the DNS form, enter the right names and values, then verify your sending domain. - [Namecheap DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/namecheap.md): Add AhaSend SPF, DKIM and DMARC records in Namecheap: find the DNS form, enter the right names and values, then verify your sending domain. - [Amazon Route 53 DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/route-53.md): Add AhaSend SPF, DKIM and DMARC records in Amazon Route 53: find the DNS form, enter the right names and values, then verify your sending domain. - [Hetzner DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/hetzner.md): Add AhaSend SPF, DKIM and DMARC records in Hetzner: find the DNS form, enter the right names and values, then verify your sending domain. - [IONOS DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/ionos.md): Add AhaSend SPF, DKIM and DMARC records in IONOS: find the DNS form, enter the right names and values, then verify your sending domain. - [STRATO DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/strato.md): Add AhaSend SPF, DKIM and DMARC records in STRATO: find the DNS form, enter the right names and values, then verify your sending domain. - [TransIP DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/transip.md): Add AhaSend SPF, DKIM and DMARC records in TransIP: find the DNS form, enter the right names and values, then verify your sending domain. - [OVHcloud DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/ovh.md): Add AhaSend SPF, DKIM and DMARC records in OVHcloud: find the DNS form, enter the right names and values, then verify your sending domain. - [Squarespace DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/squarespace.md): Add AhaSend SPF, DKIM and DMARC records in Squarespace: find the DNS form, enter the right names and values, then verify your sending domain. - [Vercel DNS: SPF, DKIM and DMARC](https://ahasend.com/docs/dns/vercel.md): Add AhaSend SPF, DKIM and DMARC records in Vercel: find the DNS form, enter the right names and values, then verify your sending domain. - [Email Deliverability Best Practices](https://ahasend.com/docs/deliverability/index.md): Improve transactional email deliverability with AhaSend: sender reputation, domain and IP warm-up, separate subdomains, Gmail and Yahoo rules and opt-outs. - [Email Bounces, Failures and Suppressions](https://ahasend.com/docs/bounces.md): Handle AhaSend email bounces, temporary failures and suppressed recipients: map webhook events to delivery outcomes and check suppression expiry rules. - [Email Troubleshooting and FAQ](https://ahasend.com/docs/troubleshooting.md): Fix common AhaSend email problems: domains that do not verify, paused sending, missing messages, port 465 failures, API 403 errors and suppressions. - [Transactional Email Glossary](https://ahasend.com/docs/glossary.md): Understand common transactional email terms used in AhaSend, including SMTP relay, DKIM, dedicated IP, bounces, suppressions, webhooks and idempotency. - [SMTP Relay Settings: Host, Ports, TLS, Limits](https://ahasend.com/docs/smtp/index.md): AhaSend SMTP relay settings: send.ahasend.com, ports 25/587/2525 with STARTTLS or 465 with implicit TLS, PLAIN and LOGIN auth, limits and SMTP error codes. - [Create SMTP Credentials (Username and Password)](https://ahasend.com/docs/smtp/credentials.md): Create an AhaSend SMTP username and password in the dashboard or API, choose production or sandbox mode and domain scope, and fix SMTP authentication errors. - [SMTP Headers for Tracking, Tags and Sandbox](https://ahasend.com/docs/smtp/special-headers.md): Reference for AhaSend custom SMTP headers for open and click tracking, tags, retention and sandbox mode, with accepted values and limits. - [SMTP Error Codes and Delivery Fixes](https://ahasend.com/docs/smtp/errors.md): Read SMTP error codes from AhaSend and recipient servers, including 550 5.1.1, authentication failures, temporary deferrals and sender-domain problems. - [Send Email from the Command Line with Swaks](https://ahasend.com/docs/smtp/cli.md): Send and test email over AhaSend SMTP from the terminal with Swaks: STARTTLS and auth flags, HTML, attachments, custom headers, sandbox tests and shell scripts. - [Send Email in PHP via SMTP (PHPMailer, Laravel)](https://ahasend.com/docs/smtp/php.md): Send email from PHP through the AhaSend SMTP relay with PHPMailer, Symfony Mailer or Laravel: STARTTLS settings, attachments and sandbox tests. - [Send Email in Go via SMTP (net/smtp, gomail)](https://ahasend.com/docs/smtp/golang.md): Send email from Go through AhaSend's SMTP relay using net/smtp or gomail: STARTTLS on port 587, HTML, attachments, custom headers, retries and sandbox testing. - [Send Email in Node.js via SMTP (Nodemailer)](https://ahasend.com/docs/smtp/nodejs.md): Send email from Node.js with Nodemailer and the AhaSend SMTP relay: STARTTLS on port 587, HTML, attachments, env vars and sandbox testing. - [Send Email in Python via SMTP (smtplib)](https://ahasend.com/docs/smtp/python.md): Send email from Python with smtplib and AhaSend's SMTP relay: STARTTLS on port 587, HTML and plain-text messages, attachments, custom headers and sandbox tests. - [Send Email in Ruby via SMTP (Rails, net/smtp)](https://ahasend.com/docs/smtp/ruby.md): Send email from Ruby through the AhaSend SMTP relay with net/smtp, the Mail gem or Rails ActionMailer: settings, attachments and sandbox tests. - [Send Email in C# via SMTP (MailKit)](https://ahasend.com/docs/smtp/dotnet.md): Send email from C# and .NET through AhaSend's SMTP relay with MailKit, and why System.Net.Mail SmtpClient fails AUTH over STARTTLS. HTML, attachments, headers. - [Sending emails in Delphi](https://ahasend.com/docs/smtp/delphi.md): Learn how to send emails using AhaSend SMTP with Delphi and the Indy networking library - [Create an API Key for Sending Email](https://ahasend.com/docs/send-api/credentials.md): Create an AhaSend API v2 key, choose production or sandbox mode, restrict it to specific domains, and authenticate email API requests with a Bearer token. - [Sandbox Mode: Test Email Without Sending](https://ahasend.com/docs/send-api/sandbox.md): Test AhaSend API and SMTP email without delivery: use sandbox credentials or request options, simulate delivery outcomes, and check webhook handlers. - [Send Email with the REST API](https://ahasend.com/docs/send-api/send-email.md): Send transactional email with AhaSend's REST API v2: curl quick start, HTML and template examples, scheduling, sandbox testing, response fields and error codes. - [Transactional Templates](https://ahasend.com/docs/send-api/templates.md): Store an email design once in AhaSend and send it by ID through the API, with your own values for each recipient. Covers variables, publishing and errors. - [AhaSend Markup (AhaML)](https://ahasend.com/docs/send-api/ahaml.md): AhaML is the XML text form of AhaSend Simple Editor designs. Read and write email designs through the API: tags, attributes, rules and error codes. - [Campaign Builder: Newsletters and Campaigns](https://ahasend.com/docs/campaigns/index.md): Send newsletters and campaigns from your AhaSend account with Campaign Builder: contact lists, two editors, templates, test sends, scheduling and reports. - [Contacts, Custom Fields and Lists](https://ahasend.com/docs/campaigns/contacts-and-lists.md): Import contacts from a CSV or your app, add custom fields, build lists, filter them with advanced search and understand contact status versus list status. - [Segments](https://ahasend.com/docs/campaigns/segments.md): Build AhaSend segments from rules over contact fields, lists and campaign activity, see who a campaign reaches, and send campaigns to segments or exclude them. - [Campaign Templates and the Two Editors](https://ahasend.com/docs/campaigns/templates.md): Build a catalog of campaign templates in AhaSend, start campaigns and new templates from it, and choose between the Simple Editor and the Advanced Editor. - [Creating a Campaign](https://ahasend.com/docs/campaigns/create.md): Create an AhaSend campaign: name, sender, lists and segments, subject and preview text, design, personalization with contact fields and the unsubscribe link. - [Testing, Review and Sending a Campaign](https://ahasend.com/docs/campaigns/test-and-send.md): Send a test of an AhaSend campaign, fix the issues the campaign page lists, send now or schedule, and see what the list and content review before sending does. - [Who Can I Send Marketing Email To?](https://ahasend.com/docs/campaigns/who-can-i-send-to.md): Who may receive your campaigns on AhaSend: contacts who opted in with you. What is fine, what is not, what to do for prospecting, and how double opt-in works. - [Campaign Reports](https://ahasend.com/docs/campaigns/reports.md): Read an AhaSend campaign report: delivered, opens, clicks, unsubscribes, complaints and bounces, deliverability by source, bounce reasons, exports, webhooks. - [Daily Marketing Sending Limit](https://ahasend.com/docs/campaigns/marketing-limit.md): Learn how AhaSend's daily marketing limit works: which mail counts, how the limit grows, the rolling 24-hour window and how campaigns stay within it. - [Unsubscribe Links and One-Click Headers](https://ahasend.com/docs/campaigns/unsubscribe.md): Learn when AhaSend adds one-click List-Unsubscribe headers, how to add a signed unsubscribe link with {{unsubscribe_url}}, and what a click does. - [Campaigns Through the API, CLI and MCP Server](https://ahasend.com/docs/campaigns/api-and-automation.md): Automate Campaign Builder: push contacts from your app, manage lists and templates, and create, test and send campaigns with the API, CLI or MCP server. - [Email Open Tracking: How It Works and Setup](https://ahasend.com/docs/tracking/open-tracking.md): Turn on AhaSend open tracking for the whole account or per message with the ahasend-track-opens header, and see why open rates vary. - [Email Click Tracking: Setup and Link Rules](https://ahasend.com/docs/tracking/click-tracking.md): Track link clicks in AhaSend emails: enable click tracking account-wide or per message, exclude links with data-as-no-track, and fix links that aren't tracked. - [Email Webhooks: Delivery, Bounce and Open Events](https://ahasend.com/docs/integrations/webhooks.md): Receive real-time AhaSend email events (delivered, bounced, deferred, opened, clicked) with webhooks, verify signatures and handle retries. - [Inbound Email Routing and Parsing to Webhooks](https://ahasend.com/docs/integrations/routing.md): Receive inbound email in your app with AhaSend routing: point MX records to AhaSend, match addresses with wildcards and get parsed JSON. - [Delivery Status Notification (DSN) Reports](https://ahasend.com/docs/integrations/dsn-reports.md): Have AhaSend email RFC 3464 Delivery Status Notification reports for bounced messages to an address you choose. Available on the Max plan. - [Connect AI Tools with the MCP Server](https://ahasend.com/docs/mcp-server.md): Connect Claude, Cursor, VS Code, Codex, ChatGPT or Mistral Vibe to AhaSend with the MCP server, choose what the agent may do, and disconnect it at any time. - [Email Data Retention Settings](https://ahasend.com/docs/retention/index.md): Set AhaSend email content and metadata retention within your plan limits, check the seven-day defaults, and request approval for zero data retention. - [Archive Emails to S3-Compatible Storage](https://ahasend.com/docs/retention/s3.md): Archive every AhaSend email (.eml) and delivery log to your own S3, Backblaze B2, DigitalOcean Spaces, Wasabi or MinIO bucket for retention beyond 30 days. - [Email API Key Security Best Practices](https://ahasend.com/docs/security/index.md): Protect AhaSend email credentials with scoped keys, two-factor login, IP allow lists and verified webhooks, and follow the steps for a leaked API key. - [Enable Two-Factor Authentication (2FA)](https://ahasend.com/docs/security/2fa.md): Turn on TOTP two-factor authentication for your AhaSend login with Google Authenticator, Authy or 1Password, and use recovery codes if you lose your phone. - [Require 2FA for All Team Members](https://ahasend.com/docs/security/2fa-enforcement.md): As the AhaSend account owner, require every team member to set up two-factor authentication before they can open the dashboard, and see what they experience. - [Scoped API Keys and SMTP Credentials](https://ahasend.com/docs/security/scoped-credentials.md): Limit AhaSend SMTP credentials and API keys to specific sending domains, and give API v2 keys only the permission scopes each integration needs. - [IP Allow Lists for API Keys](https://ahasend.com/docs/security/ip-allow-lists.md): Lock AhaSend API keys to specific IPv4/IPv6 addresses or CIDR ranges (up to 100 entries) so a leaked key can't be used outside your infrastructure. - [Reputation Shield: Block Disposable Email](https://ahasend.com/docs/security/reputation-shield.md): AhaSend Reputation Shield blocks mail to 200,000+ toxic and disposable domains and to typo domains like gmial.com, protecting your reputation. - [Single Sign-On (SSO) with OpenID Connect](https://ahasend.com/docs/security/sso.md): Set up OpenID Connect single sign-on for your AhaSend team with Microsoft Entra ID, Google Workspace, Okta, Authentik or Zitadel. Available on the Max plan. - [Sub-Accounts for SaaS Platforms and Agencies](https://ahasend.com/docs/scale/sub-accounts.md): Give each customer an isolated AhaSend sub-account with its own domains, API keys and reputation, under one parent with consolidated billing. - [Dedicated IPs for Email Sending](https://ahasend.com/docs/scale/dedicated-ips.md): Get an AhaSend dedicated sending IP as an add-on from 100,000 emails a month, with one included from 300,000. Check eligibility and warm-up steps. - [Dedicated IP Pools for Email Sending](https://ahasend.com/docs/scale/ip-pools.md): Group AhaSend dedicated IPs into pools to separate transactional from marketing mail or isolate brands and domains. Max plan feature, configured with our team. - [Bring Your Own IP (BYOIP) for Email Sending](https://ahasend.com/docs/scale/byoip.md): Send AhaSend email from IP addresses you own, through a server AhaSend configures. A Max plan add-on; setup takes up to 7 business days. - [White-Label DNS for Platform Partners](https://ahasend.com/docs/scale/dns-whitelabel.md): Platform Partners can replace AhaSend hostnames in customer DKIM, SPF, return-path, MX, tracking and reverse DNS records with their own branded domain. - [Email API Reference (v2)](https://ahasend.com/docs/api-reference/index.md): AhaSend's REST API for transactional email: send messages, manage domains, webhooks, routes, and suppressions at api.ahasend.com/v2 with Bearer API keys. - [API Authentication with Bearer API Keys](https://ahasend.com/docs/api-reference/authentication.md): Authenticate AhaSend API v2 requests with an aha-sk- API key in an Authorization: Bearer header. Create a key, test it and keep it secure. - [API Key Scopes and Permissions](https://ahasend.com/docs/api-reference/scopes.md): Every AhaSend API key scope, from messages:send:all to domain-specific scopes for webhooks, routes and SMTP, and how each request is authorized. - [API Rate Limits and 429 Handling](https://ahasend.com/docs/api-reference/rate-limits.md): AhaSend API v2 allows 100 requests/second per account (burst 200); statistics endpoints allow 1/second. Learn what a 429 response looks like and how to retry. - [Idempotency Keys for Safe API Retries](https://ahasend.com/docs/api-reference/idempotency.md): Use AhaSend Idempotency-Key headers on supported API operations to reduce duplicate requests, replay stored results, and handle expiry or conflicts. - [API Error Codes and Error Responses](https://ahasend.com/docs/api-reference/errors.md): Reference for AhaSend API v2 HTTP status codes (400, 401, 403, 404, 409, 422, 429, 500, 502, 503), the JSON error format, example messages and fixes for each. - [Send an Email via the API](https://ahasend.com/docs/api-reference/messages/create-message.md): Send transactional email with the AhaSend API v2: one POST request to up to 100 recipients with templates, attachments, tracking, tags and scheduled sending. - [Send a Transactional Template via the API](https://ahasend.com/docs/api-reference/messages/create-template-message.md): Send a published AhaSend transactional template by its ID to up to 100 recipients. Each recipient gives its own values for the template's variables. - [Send Email with CC and BCC via the API](https://ahasend.com/docs/api-reference/messages/create-conversation.md): Send one conversational email with To, CC and BCC recipients through the AhaSend API, for person-to-person or reply-style mail. - [Get a Message by ID via the API](https://ahasend.com/docs/api-reference/messages/get-message.md): Retrieve a single email sent through AhaSend by message ID, including its delivery status and the raw email content when your retention settings keep it. - [List and Search Sent Emails via the API](https://ahasend.com/docs/api-reference/messages/get-messages.md): List emails sent through AhaSend and filter them by status, sender, recipient, subject, Message-ID header, tags or time range, with cursor-based pagination. - [Cancel a Scheduled Email via the API](https://ahasend.com/docs/api-reference/messages/cancel-message.md): Cancel a scheduled email through the AhaSend API before its first delivery attempt, using the UUID portion of the message identifier. - [Create a Transactional Template via the API](https://ahasend.com/docs/api-reference/templates/create-template.md): Create an AhaSend transactional template from MJML, HTML or AhaML, set its subject and sender, and publish it in the same request or later. - [Get a Transactional Template via the API](https://ahasend.com/docs/api-reference/templates/get-template.md): Retrieve an AhaSend transactional template by ID as its working copy: the draft while one exists, with its content, sender and variables. - [Get a Published Transactional Template via the API](https://ahasend.com/docs/api-reference/templates/get-published-template.md): Retrieve the published copy of an AhaSend transactional template, the one sends use, with its content, sender and the variables a send must give. - [List Transactional Templates via the API](https://ahasend.com/docs/api-reference/templates/get-templates.md): List the transactional templates in your AhaSend account, newest first, with their editor and whether each one has unpublished changes. - [Update a Transactional Template via the API](https://ahasend.com/docs/api-reference/templates/update-template.md): Change an AhaSend transactional template's content, subject, preview text or sender. Changes go to the draft until you publish them. - [Publish a Template Draft via the API](https://ahasend.com/docs/api-reference/templates/publish-template.md): Publish the draft of an AhaSend transactional template so that sends use it. Each published draft is kept as a new version of the template. - [Discard a Template Draft via the API](https://ahasend.com/docs/api-reference/templates/discard-template-draft.md): Discard the unpublished changes of an AhaSend transactional template, including changes made in the dashboard. The published copy stays as it is. - [List Template Versions via the API](https://ahasend.com/docs/api-reference/templates/get-template-versions.md): List the published versions of an AhaSend transactional template, newest first, with the time of each publish and the user or API key that made it. - [Get a Template Version via the API](https://ahasend.com/docs/api-reference/templates/get-template-version.md): Retrieve one published version of an AhaSend transactional template with its content, subject, sender and variables, to compare or restore it. - [Restore a Template Version via the API](https://ahasend.com/docs/api-reference/templates/restore-template-version.md): Copy a published version of an AhaSend transactional template into its draft, and optionally publish it in the same request so that sends use it. - [Delete a Transactional Template via the API](https://ahasend.com/docs/api-reference/templates/delete-template.md): Delete a transactional template from your AhaSend account. Sends that use the template fail after it is deleted, and a second delete returns 404. - [Campaigns API Overview](https://ahasend.com/docs/api-reference/campaigns/overview.md): Build, test and send AhaSend marketing campaigns through the API: set the sender, audience, subject and design, fix the issues, then read stats and recipients. - [Create a Campaign via the API](https://ahasend.com/docs/api-reference/campaigns/create-campaign.md): Create a draft AhaSend marketing campaign with its sender, audience, subject, preview text and design, from MJML, HTML, AhaML or a campaign template. - [Get a Campaign via the API](https://ahasend.com/docs/api-reference/campaigns/get-campaign.md): Retrieve an AhaSend marketing campaign by ID with its status, sender, audience and design, and for a draft, the issues that stop it from being sent. - [List Campaigns via the API](https://ahasend.com/docs/api-reference/campaigns/get-campaigns.md): List the marketing campaigns in your AhaSend account, newest first, with their status, subject, sender and send times. Filter the list by status. - [Update a Campaign via the API](https://ahasend.com/docs/api-reference/campaigns/update-campaign.md): Change a draft AhaSend marketing campaign: its name, sender, reply-to, audience, subject, preview text or design. Only a draft campaign can be changed. - [Duplicate a Campaign via the API](https://ahasend.com/docs/api-reference/campaigns/duplicate-campaign.md): Make a new draft from an AhaSend marketing campaign in any status, with a copy of its design, its subject, preview text and sender, and the same audience. - [Send a Campaign Test via the API](https://ahasend.com/docs/api-reference/campaigns/test-campaign.md): Send a test of a draft AhaSend marketing campaign to up to 5 addresses to check it in a real inbox. An account can send 50 test emails per day (UTC). - [Send or Schedule a Campaign via the API](https://ahasend.com/docs/api-reference/campaigns/send-campaign.md): Send a draft AhaSend marketing campaign to its lists and segments now, or schedule it for a later time. The campaign must be a draft with no issues to send. - [Unschedule a Campaign via the API](https://ahasend.com/docs/api-reference/campaigns/unschedule-campaign.md): Return a validating or scheduled AhaSend marketing campaign to draft, so you can change it or its send time. A campaign that has queued mail cannot return. - [Get Campaign Stats via the API](https://ahasend.com/docs/api-reference/campaigns/get-campaign-stats.md): Read the results of an AhaSend marketing campaign: delivered messages, opens, clicks, unsubscribes, complaints, bounces and rates, as the report shows them. - [List Campaign Recipients via the API](https://ahasend.com/docs/api-reference/campaigns/get-campaign-recipients.md): List the recipients of an AhaSend marketing campaign in one status or with one bounce classification, with the source, attempts and bounce details of each. - [Delete a Campaign via the API](https://ahasend.com/docs/api-reference/campaigns/delete-campaign.md): Delete a draft AhaSend marketing campaign with its design and audience choices; lists and segments stay. Only a draft can be deleted, and a retry returns 404. - [Create a Campaign Template via the API](https://ahasend.com/docs/api-reference/campaign-templates/create-campaign-template.md): Create an AhaSend campaign template from MJML, HTML or AhaML, or as an empty design for the dashboard's editor, so that new campaigns can copy its design. - [Get a Campaign Template via the API](https://ahasend.com/docs/api-reference/campaign-templates/get-campaign-template.md): Retrieve an AhaSend campaign template by ID with its editor and content: the MJML or HTML design, AhaML for a Simple Editor design, and the plain text. - [List Campaign Templates via the API](https://ahasend.com/docs/api-reference/campaign-templates/get-campaign-templates.md): List the campaign templates in your AhaSend account, newest first, with their names and editors. Transactional templates are not in this list. - [Update a Campaign Template via the API](https://ahasend.com/docs/api-reference/campaign-templates/update-campaign-template.md): Change the name or the content of an AhaSend campaign template. The change applies immediately, and campaigns made from it keep their own designs. - [Delete a Campaign Template via the API](https://ahasend.com/docs/api-reference/campaign-templates/delete-campaign-template.md): Delete a campaign template from your AhaSend account. Campaigns made from it keep their own designs, and a second delete of the same ID returns 404. - [Contacts API Overview](https://ahasend.com/docs/api-reference/contacts/overview.md): Manage the contacts of your AhaSend account through the API: create, read, update and delete them one at a time, or create and update up to 1,000 at once. - [Create a Contact via the API](https://ahasend.com/docs/api-reference/contacts/create-contact.md): Create one contact in your AhaSend account with its name, status, unsubscribe choice and attributes. The new contact is on no list until you add it to one. - [Get a Contact via the API](https://ahasend.com/docs/api-reference/contacts/get-contact.md): Retrieve one AhaSend contact by ID or email address, with its name, status, account-wide unsubscribe, attributes and validation result. - [List Contacts via the API](https://ahasend.com/docs/api-reference/contacts/get-contacts.md): List the contacts in your AhaSend account, newest first. Filter by email address, status, account-wide subscription and creation time. - [Update a Contact via the API](https://ahasend.com/docs/api-reference/contacts/update-contact.md): Change an AhaSend contact by ID or email address: its email, name, status, account-wide unsubscribe or attributes. Only the fields you send change. - [Delete a Contact via the API](https://ahasend.com/docs/api-reference/contacts/delete-contact.md): Permanently delete an AhaSend contact with its list memberships, unsubscribe record, campaign recipient records, opens and clicks. This cannot be undone. - [Create or Update Contacts in a Batch via the API](https://ahasend.com/docs/api-reference/contacts/batch-upsert-contacts.md): Create or update up to 1,000 AhaSend contacts in one request, matched by email address. Each gets its own result, so one bad record does not stop the rest. - [Lists API Overview](https://ahasend.com/docs/api-reference/lists/overview.md): Manage AhaSend contact lists through the API: create lists, add contacts, record unsubscribes per list, and read who a campaign to a list will reach. - [Create a List via the API](https://ahasend.com/docs/api-reference/lists/create-list.md): Create an AhaSend contact list with a name, a description and tags. A new list has no contacts, and list names do not have to be unique. - [Get a List via the API](https://ahasend.com/docs/api-reference/lists/get-list.md): Retrieve one AhaSend contact list by ID with its name, description, tags and contact_count, the number of subscribers a campaign to it would reach. - [List Contact Lists via the API](https://ahasend.com/docs/api-reference/lists/get-lists.md): List the contact lists in your AhaSend account, newest first, with the subscriber count of each. Search the lists by part of their name. - [Update a List via the API](https://ahasend.com/docs/api-reference/lists/update-list.md): Change the name, description or tags of an AhaSend contact list. Only the fields you send change, and a tags array replaces all stored tags. - [Delete a List via the API](https://ahasend.com/docs/api-reference/lists/delete-list.md): Delete an AhaSend contact list. Its memberships are kept with their unsubscribes and complaints, and a list that an unsent campaign uses cannot be deleted. - [List the Contacts on a List via the API](https://ahasend.com/docs/api-reference/lists/get-list-contacts.md): List the members of an AhaSend contact list with their per-list subscription status. Filter by status or email, and embed the whole contact. - [Add or Update a List Contact via the API](https://ahasend.com/docs/api-reference/lists/upsert-list-contact.md): Add an existing AhaSend contact to a list, or change its per-list subscription status to confirmed, unconfirmed or unsubscribed. No contact is created. - [Add Contacts to a List in a Batch via the API](https://ahasend.com/docs/api-reference/lists/batch-add-list-contacts.md): Add up to 1,000 existing AhaSend contacts to a list in one request, by ID or email address. Existing memberships, unsubscribes included, never change. - [Remove a Contact from a List via the API](https://ahasend.com/docs/api-reference/lists/delete-list-contact.md): Remove a contact from an AhaSend list. This deletes the membership and its unsubscribe record; to stop email but keep the record, unsubscribe instead. - [List a Contact's Lists via the API](https://ahasend.com/docs/api-reference/lists/get-contact-lists.md): List the AhaSend lists that one contact is on, with its subscription status on each list. Filter by status to see what a person is subscribed to. - [Segments API Overview](https://ahasend.com/docs/api-reference/segments/overview.md): Manage AhaSend segments through the API: save rules over your contacts, keep their members up to date on their own, and send campaigns to the members. - [Preview a Segment via the API](https://ahasend.com/docs/api-reference/segments/preview-segment.md): Try AhaSend segment rules without saving them: get the number of contacts that the rules match now, and up to 10 of the matching contacts. - [Create a Segment via the API](https://ahasend.com/docs/api-reference/segments/create-segment.md): Create an AhaSend segment from a name, rules and a time zone. AhaSend then finds its members and keeps them up to date as your contacts and campaigns change. - [Get a Segment via the API](https://ahasend.com/docs/api-reference/segments/get-segment.md): Retrieve one AhaSend segment by ID with its rules, state and member count, and marketable_count, the members that a campaign to the segment would reach. - [List Segments via the API](https://ahasend.com/docs/api-reference/segments/get-segments.md): List the segments of your AhaSend account, newest first, with the rules, the state and the member count of each segment and the time its members were checked. - [Update a Segment via the API](https://ahasend.com/docs/api-reference/segments/update-segment.md): Change the name, description, rules or time zone of an AhaSend segment. New rules or a new time zone make AhaSend find the members of the segment again. - [Delete a Segment via the API](https://ahasend.com/docs/api-reference/segments/delete-segment.md): Delete an AhaSend segment. Its contacts stay in your account, and a segment that an unfinished campaign sends to or excludes cannot be deleted. - [List the Contacts in a Segment via the API](https://ahasend.com/docs/api-reference/segments/get-segment-contacts.md): List the members of an AhaSend segment, the contacts that match its rules, with the email address of each and the time it joined the segment. - [List a Contact's Segments via the API](https://ahasend.com/docs/api-reference/segments/get-contact-segments.md): List the AhaSend segments that one contact is a member of, newest segment first, to see which rules a person matches and which campaigns can reach them. - [Add an Address to the Suppression List via the API](https://ahasend.com/docs/api-reference/suppressions/create-suppression.md): Add an email address to your AhaSend suppression list through the API, for one sending domain or all domains, with a required expiry time. - [List Suppressed Addresses via the API](https://ahasend.com/docs/api-reference/suppressions/get-suppressions.md): List the addresses on your AhaSend suppression list through the API, filtered by email, domain or creation time, to find out why an email was not sent. - [Remove a Suppression via the API](https://ahasend.com/docs/api-reference/suppressions/delete-suppression.md): Remove an email address from your AhaSend suppression list through the API so you can send to it again, for one sending domain or all your domains. - [Delete All Suppressions via the API](https://ahasend.com/docs/api-reference/suppressions/wipe-suppressions.md): Clear every address from your AhaSend suppression list through one API call, optionally only for a single sending domain. This cannot be undone. - [Create SMTP Credentials via the API](https://ahasend.com/docs/api-reference/smtp-credentials/create-smtp-credential.md): Create SMTP username and password credentials through the AhaSend API to authenticate with the SMTP relay, scoped to specific sending domains or global. - [Get an SMTP Credential via the API](https://ahasend.com/docs/api-reference/smtp-credentials/get-smtp-credential.md): Retrieve one AhaSend SMTP credential by ID through the API, including its username, scope and associated sending domains. - [List SMTP Credentials via the API](https://ahasend.com/docs/api-reference/smtp-credentials/get-smtp-credentials.md): List all SMTP credentials in your AhaSend account through the API, with their scope and sending domains, using cursor-based pagination. - [Delete an SMTP Credential via the API](https://ahasend.com/docs/api-reference/smtp-credentials/delete-smtp-credential.md): Revoke an AhaSend SMTP credential by ID through the API. Revoke credentials when you rotate secrets or after a password leaks. - [Create a Webhook via the API](https://ahasend.com/docs/api-reference/webhooks/create-webhook.md): Create an AhaSend webhook with the API: set the endpoint URL, choose event types and domain scope, and get the signing secret used for verification. - [Get a Webhook via the API](https://ahasend.com/docs/api-reference/webhooks/get-webhook.md): Retrieve a single AhaSend webhook by ID with the API, including its URL, subscribed event types, enabled status and domain scope. - [List Webhooks via the API](https://ahasend.com/docs/api-reference/webhooks/get-webhooks.md): List the webhooks in your AhaSend account with the API, filtered by enabled status or event type, with cursor pagination of up to 100 items per page. - [Update a Webhook via the API](https://ahasend.com/docs/api-reference/webhooks/update-webhook.md): Update an AhaSend webhook with the API: change its URL, event types, enabled status or domain scope. Omitted fields stay unchanged; the secret can't change. - [Delete a Webhook via the API](https://ahasend.com/docs/api-reference/webhooks/delete-webhook.md): Delete an AhaSend webhook with the API to stop event deliveries to its endpoint. Requires a delete role for the webhook's domains or the global role. - [Create an Inbound Email Route via the API](https://ahasend.com/docs/api-reference/routes/create-route.md): Create an AhaSend inbound email route that forwards messages sent to an address or wildcard on your domain to your webhook URL as JSON. - [Get an Inbound Email Route via the API](https://ahasend.com/docs/api-reference/routes/get-route.md): Retrieve a single AhaSend inbound email route by ID, including its recipient pattern, webhook URL and attachment, header and reply settings. - [List Inbound Email Routes via the API](https://ahasend.com/docs/api-reference/routes/get-routes.md): List the inbound email routes in your AhaSend account, optionally filtered by domain. Domain-scoped API keys must pass the matching domain filter. - [Update an Inbound Email Route via the API](https://ahasend.com/docs/api-reference/routes/update-route.md): Update an AhaSend inbound email route: change its webhook URL or recipient pattern, toggle attachments, headers or reply stripping, or re-enable it. - [Delete an Inbound Email Route via the API](https://ahasend.com/docs/api-reference/routes/delete-route.md): Permanently delete an AhaSend inbound email route so messages sent to its recipient pattern are no longer forwarded to your webhook URL. - [Add a Sending Domain via the API](https://ahasend.com/docs/api-reference/domains/create-domain.md): Add a sending domain to AhaSend with the API and get the SPF, DKIM, return-path and tracking DNS records to publish, with optional custom subdomains. - [Get a Domain and Its DNS Records via the API](https://ahasend.com/docs/api-reference/domains/get-domain.md): Retrieve an AhaSend sending domain by name, including its DNS records, verification status, custom subdomains and DKIM settings. - [List Sending Domains via the API](https://ahasend.com/docs/api-reference/domains/get-domains.md): List all sending domains in your AhaSend account with their DNS verification status. Supports pagination for accounts with many domains. - [Update a Sending Domain via the API](https://ahasend.com/docs/api-reference/domains/update-domain.md): Update an AhaSend sending domain's custom tracking, return-path, subscription and media subdomains, DKIM selector and DKIM rotation interval. - [Check Domain DNS Records via the API](https://ahasend.com/docs/api-reference/domains/check-dns.md): Trigger an AhaSend DNS check to verify a sending domain's SPF, DKIM and other records. Results are cached for 60 seconds between checks. - [Delete a Sending Domain via the API](https://ahasend.com/docs/api-reference/domains/delete-domain.md): Remove a sending domain from your AhaSend account. After deletion you can no longer send email from addresses on that domain. - [Get Account Details via the API](https://ahasend.com/docs/api-reference/accounts/get-account.md): Retrieve your AhaSend account details through the API, including the account name, website, and message data and metadata retention settings. - [Update Account Settings via the API](https://ahasend.com/docs/api-reference/accounts/update-account.md): Update AhaSend account settings through the API: change the account name, website, and message data or metadata retention within your plan limits. - [List Account Members via the API](https://ahasend.com/docs/api-reference/accounts/get-account-members.md): List the members of your AhaSend account through the API, with each member's role: Administrator, Developer, Analyst or Billing Manager. - [Add an Account Member via the API](https://ahasend.com/docs/api-reference/accounts/create-account-member.md): Invite a teammate to your AhaSend account via API and assign a role: Administrator, Developer, Analyst or Billing Manager. - [Remove an Account Member via the API](https://ahasend.com/docs/api-reference/accounts/delete-account-member.md): Remove a member from your AhaSend account through the API to revoke their access. You cannot remove yourself or the account owner this way. - [Sub-Accounts API Overview](https://ahasend.com/docs/api-reference/sub-accounts/overview.md): Use the AhaSend Sub-Accounts API to provision isolated child accounts per customer, issue their API keys, pause them, and track per-account usage and cost. - [Create a Sub-Account via the API](https://ahasend.com/docs/api-reference/sub-accounts/create-sub-account.md): Create an isolated AhaSend sub-account under your parent account through the API, with a name, website and an optional monthly sending cap. - [List Sub-Accounts via the API](https://ahasend.com/docs/api-reference/sub-accounts/get-sub-accounts.md): List all active AhaSend sub-accounts under a parent account with cursor pagination. Soft-deleted sub-accounts are excluded from the results. - [Get a Sub-Account via the API](https://ahasend.com/docs/api-reference/sub-accounts/get-sub-account.md): Retrieve one AhaSend sub-account by ID, including its status, monthly credit cap, domain and member counts, and last activity time. - [Update a Sub-Account via the API](https://ahasend.com/docs/api-reference/sub-accounts/update-sub-account.md): Update an AhaSend sub-account's name, website, or monthly credit cap (0 means no cap) from the parent account with a PUT request. - [Pause a Sub-Account via the API](https://ahasend.com/docs/api-reference/sub-accounts/suspend-sub-account.md): Pause sending on an AhaSend sub-account from the parent account. Its status becomes suspended until you resume it. Requires the sub-accounts:suspend scope. - [Resume a Sub-Account via the API](https://ahasend.com/docs/api-reference/sub-accounts/unsuspend-sub-account.md): Resume sending on a paused AhaSend sub-account from the parent account so its status returns to active. Requires the sub-accounts:suspend scope. - [Unpause a Sub-Account Domain via the API](https://ahasend.com/docs/api-reference/sub-accounts/unpause-sub-account-domain.md): Lift the pause on a sending domain of an AhaSend sub-account from the parent account. The call is idempotent. Requires the sub-accounts:suspend scope. - [Delete a Sub-Account via the API](https://ahasend.com/docs/api-reference/sub-accounts/delete-sub-account.md): Soft-delete an AhaSend sub-account. It leaves list results, but usage from the current billing period is still billed to the parent account. - [Get Sub-Account Usage via the API](https://ahasend.com/docs/api-reference/sub-accounts/get-sub-accounts-usage.md): Get AhaSend message volume and proportionally allocated cost for the parent and each sub-account in the current billing period, for customer rebilling. - [Create a Sub-Account API Key via the API](https://ahasend.com/docs/api-reference/sub-accounts/create-sub-account-api-key.md): Issue an API key that authenticates as an AhaSend sub-account, using parent credentials with sub-account-api-keys:write. The secret_key is shown only once. - [Get a Sub-Account API Key via the API](https://ahasend.com/docs/api-reference/sub-accounts/get-sub-account-api-key.md): Retrieve one API key owned by an AhaSend sub-account, including its label, scopes, and IP allow list. The secret_key is never returned after creation. - [List Sub-Account API Keys via the API](https://ahasend.com/docs/api-reference/sub-accounts/get-sub-account-api-keys.md): List all API keys owned by an AhaSend sub-account with cursor pagination, using parent credentials. Secret keys are omitted from list responses. - [Update a Sub-Account API Key via the API](https://ahasend.com/docs/api-reference/sub-accounts/update-sub-account-api-key.md): Change the label, scopes, or IP allow list of an API key owned by an AhaSend sub-account. Scopes are validated against the child account. - [Delete a Sub-Account API Key via the API](https://ahasend.com/docs/api-reference/sub-accounts/delete-sub-account-api-key.md): Delete (revoke) an API key owned by an AhaSend sub-account using parent credentials with the sub-account-api-keys:delete scope. - [Get Email Deliverability Statistics via the API](https://ahasend.com/docs/api-reference/reports/get-deliverability-report.md): Get email deliverability statistics from the AhaSend API: message counts by delivery status per hour, day, week or month, with filters. - [Get Email Bounce Statistics via the API](https://ahasend.com/docs/api-reference/reports/get-bounce-report.md): Get email bounce statistics from the AhaSend API, grouped by bounce classification and time period, and filtered by sender domain, recipient domain or tag. - [Get Email Delivery Time Statistics via the API](https://ahasend.com/docs/api-reference/reports/get-delivery-time-report.md): Measure how fast your email is delivered with the AhaSend API: delivery time statistics per recipient domain (such as gmail.com) and per time period. - [Create an API Key via the API](https://ahasend.com/docs/api-reference/api-keys/create-api-key.md): Create a scoped AhaSend API key through the API, with an optional IP allow list. The secret_key is returned only once, so store it right away. - [Get an API Key via the API](https://ahasend.com/docs/api-reference/api-keys/get-api-key.md): Retrieve one AhaSend API key by ID, including its label, scopes, and IP allow list. The secret key value is never returned after creation. - [List API Keys via the API](https://ahasend.com/docs/api-reference/api-keys/get-api-keys.md): List every API key on your AhaSend account with its label, scopes, and IP allow list, so you can audit or rotate credentials programmatically. - [Update an API Key via the API](https://ahasend.com/docs/api-reference/api-keys/update-api-key.md): Change an AhaSend API key's label, scopes, or IP allow list. Returns 409 if a key would lock itself out by excluding the caller's current IP. - [Delete an API Key via the API](https://ahasend.com/docs/api-reference/api-keys/delete-api-key.md): Revoke an AhaSend API key permanently by ID. Requires the api-keys:delete scope. Create the replacement key first when you rotate credentials. - [Test Your API Key with the Ping Endpoint](https://ahasend.com/docs/api-reference/utility/ping.md): Call GET /v2/ping to check that the AhaSend API is reachable and your API key is valid. Works with a key of any scope and returns pong. - [Webhook Events and Payload Reference](https://ahasend.com/docs/api-reference/webhooks/index.md): Reference for AhaSend email webhooks: every event type (delivered, bounced, opened, clicked, failed and more), payload format, signature headers and retries. - [Verify Webhook and Route Signatures (HMAC)](https://ahasend.com/docs/api-reference/webhooks/security.md): Verify AhaSend webhook signatures with HMAC-SHA256 over id.timestamp.body using your raw webhook secret, and reject replayed or tampered deliveries. - [Webhook and Route Retry Policy](https://ahasend.com/docs/api-reference/webhooks/retry-policy.md): Check AhaSend webhook and route retry schedules, attempt limits, five-second timeouts, duplicate deliveries, and how to re-enable a failed endpoint. - [message.reception Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-reception.md): The message.reception webhook fires when AhaSend accepts and queues an email. It is the first event in a message's lifecycle. See the payload and fields. - [message.delivered Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-delivered.md): The message.delivered webhook fires when the recipient's mail server accepts an email sent through AhaSend. Payload fields, example and caveats. - [message.transient_error (Deferred) Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-transient_error.md): The message.transient_error webhook fires when AhaSend defers an email after a temporary (soft bounce) failure and will retry delivery. Payload and causes. - [message.failed Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-failed.md): The message.failed webhook fires when an AhaSend email exhausts its retry window without delivery. Learn how it differs from message.bounced. - [message.bounced Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-bounced.md): The message.bounced webhook fires when a recipient server permanently rejects an AhaSend email or a later bounce notice arrives. Payload and SMTP codes. - [message.suppressed Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-suppressed.md): The message.suppressed webhook fires when AhaSend skips delivery because the recipient is on your suppression list. Payload fields and example. - [message.opened Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-opened.md): The message.opened webhook fires when a recipient loads the AhaSend tracking pixel. Requires open tracking and HTML. Includes is_bot, user agent and IP. - [message.clicked Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-clicked.md): The message.clicked webhook fires when a recipient clicks a link tracked by AhaSend. Requires click tracking. Payload includes URL, user agent and IP. - [message.unsubscribed Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-unsubscribed.md): The message.unsubscribed webhook fires when a recipient unsubscribes from an AhaSend campaign email through its link or one-click unsubscribe. Payload. - [message.complained Webhook Event](https://ahasend.com/docs/api-reference/webhooks/message-complained.md): The message.complained webhook fires when a mailbox provider reports an AhaSend campaign email as spam. The payload holds the feedback type and reporter. - [suppression.created Webhook Event](https://ahasend.com/docs/api-reference/webhooks/suppression-created.md): The suppression.created webhook fires when AhaSend suppresses an address, for example after a hard bounce, or when a suppression gets a new reason. - [suppression.deleted Webhook Event](https://ahasend.com/docs/api-reference/webhooks/suppression-deleted.md): The suppression.deleted webhook fires when an AhaSend suppression is deleted through the API, the dashboard or by support. Payload, origin and exceptions. - [domain.dns_error Webhook Event](https://ahasend.com/docs/api-reference/webhooks/domain-dns_error.md): The domain.dns_error webhook fires when AhaSend's DNS checks find SPF, DKIM or DMARC problems that block sending on your domain. Payload and resolution. - [contact.created Webhook Event](https://ahasend.com/docs/api-reference/webhooks/contact-created.md): The contact.created webhook fires when a contact is created in AhaSend through the API or the dashboard. CSV imports send no event. Payload and setup. - [contact.updated Webhook Event](https://ahasend.com/docs/api-reference/webhooks/contact-updated.md): The contact.updated webhook fires when a field of an AhaSend contact changes. It lists the changed fields. Validation results and imports send no event. - [contact.deleted Webhook Event](https://ahasend.com/docs/api-reference/webhooks/contact-deleted.md): The contact.deleted webhook fires when an AhaSend contact is deleted, with its list memberships. The payload holds the contact as it was before the delete. - [contact.added_to_list Webhook Event](https://ahasend.com/docs/api-reference/webhooks/contact-added_to_list.md): The contact.added_to_list webhook fires when an AhaSend contact is added to a list, with any subscription status. CSV imports to a list send no event. - [contact.removed_from_list Webhook Event](https://ahasend.com/docs/api-reference/webhooks/contact-removed_from_list.md): The contact.removed_from_list webhook fires when an AhaSend contact is removed from a list. Deleting the contact or the list sends no event. Payload. - [contact.subscribed Webhook Event](https://ahasend.com/docs/api-reference/webhooks/contact-subscribed.md): The contact.subscribed webhook fires when an AhaSend list membership becomes confirmed, or a contact's unsubscribe from all lists is cleared. Payload. - [contact.unsubscribed Webhook Event](https://ahasend.com/docs/api-reference/webhooks/contact-unsubscribed.md): The contact.unsubscribed webhook fires when an AhaSend contact unsubscribes from a list or from all lists, for example through a campaign's link. - [contact.complained Webhook Event](https://ahasend.com/docs/api-reference/webhooks/contact-complained.md): The contact.complained webhook fires when an AhaSend contact reports a campaign email as spam. The payload holds the complaint report and the campaign. - [Inbound Email Routing API Overview](https://ahasend.com/docs/api-reference/routes/index.md): Receive inbound email as JSON webhooks with AhaSend message routes. Match addresses or wildcards, parse replies and attachments, and POST them to your app. - [message.routing Inbound Email Webhook Event](https://ahasend.com/docs/api-reference/routes/route-message.md): Reference for the AhaSend message.routing event: the JSON payload with sender, subject, HTML and text bodies, attachments and headers for inbound email. - [API v1 vs v2: Differences and Migration](https://ahasend.com/docs/api-reference/v1/v1-vs-v2.md): Compare AhaSend API v1 and v2 side by side (auth headers, request fields, responses, features) and follow the step-by-step migration from /v1/email/send to v2. - [Send Email with API v1 (Legacy)](https://ahasend.com/docs/api-reference/v1/index.md): Reference for the legacy AhaSend API v1 POST /v1/email/send endpoint using the X-Api-Key header. API v1 is in maintenance mode; use API v2 for new integrations. - [AhaSend CLI: Send Email from Your Terminal](https://ahasend.com/docs/cli/index.md): The AhaSend CLI (ahasend) is an open-source tool for macOS, Linux and Windows to send email and manage domains, templates, campaigns, contacts and webhooks. - [Install the AhaSend CLI (macOS, Linux, Windows)](https://ahasend.com/docs/cli/installation.md): Install the AhaSend CLI on macOS, Linux or Windows with Homebrew, Scoop, npm, an install script, a .deb or .rpm package, or a binary download. - [CLI Quickstart: Send Email from the Terminal](https://ahasend.com/docs/cli/quickstart.md): Send your first email from the command line with the AhaSend CLI: log in with your API key, add and verify a domain, then send test emails in sandbox mode. - [CLI Authentication: API Keys and Profiles](https://ahasend.com/docs/cli/authentication.md): Log in to the AhaSend CLI with your API key and account ID, manage separate profiles for production and staging, and pass credentials safely in CI/CD. - [CLI Configuration: Config File, Flags, Output](https://ahasend.com/docs/cli/configuration.md): Reference for the AhaSend CLI config file, profiles, global flags, output formats, JSON output, prompts and exit codes, for use in a terminal and in scripts. - [CLI Examples: Scripts and CI/CD Automation](https://ahasend.com/docs/cli/examples.md): Copy-paste AhaSend CLI scripts for order confirmations, password resets, alerts, GitHub Actions deploy notifications, webhook event processing, and load tests. - [ahasend messages: Send and Track Email](https://ahasend.com/docs/cli/commands/messages.md): Send email from your terminal with the AhaSend CLI: text, HTML and AMP content, stored templates, attachments, scheduling, sandbox mode and batch sends. - [ahasend domains: Add and Verify Domains](https://ahasend.com/docs/cli/commands/domains.md): Add, verify, update, and delete AhaSend sending domains from the command line, and export their DNS records as BIND, Cloudflare, or Terraform. - [ahasend webhooks: Manage and Test Webhooks](https://ahasend.com/docs/cli/commands/webhooks.md): Create, update, and delete AhaSend email event webhooks from the CLI, and test them locally with webhooks listen (forward to localhost) and webhooks trigger. - [ahasend routes: Manage Inbound Email Routes](https://ahasend.com/docs/cli/commands/routes.md): Create and manage AhaSend inbound email routes from the CLI: match recipients, POST parsed emails to your webhook, and test locally with routes listen. - [ahasend suppressions: Manage Suppressions](https://ahasend.com/docs/cli/commands/suppressions.md): List, check, add, and remove suppressed email addresses in AhaSend from the command line, including domain-specific suppressions with expiry and bulk wipe. - [ahasend smtp: SMTP Credentials and Test Sends](https://ahasend.com/docs/cli/commands/smtp.md): Create, list, and delete AhaSend SMTP relay credentials from the CLI, and send test emails through send.ahasend.com on port 587 to verify your setup. - [ahasend apikeys: Manage API Keys](https://ahasend.com/docs/cli/commands/apikeys.md): Create, list, update, and delete scoped AhaSend API keys from the command line, including domain-restricted keys such as messages:send:{example.com}. - [ahasend stats: Delivery and Bounce Reports](https://ahasend.com/docs/cli/commands/stats.md): Pull AhaSend deliverability, bounce and delivery-time reports from the CLI, grouped by hour, day, week or month and exported to CSV or JSON. - [ahasend auth: Log In and Manage Profiles](https://ahasend.com/docs/cli/commands/auth.md): Log the AhaSend CLI in with an API key and account ID, check auth status, and switch between profiles for production, staging, and development. - [ahasend ping: Test API Connectivity](https://ahasend.com/docs/cli/commands/ping.md): Use ahasend ping to check that the AhaSend CLI can reach the API and that the API accepts your API key from this IP address. Handy for CI health checks. - [ahasend contacts: Manage Account Contacts](https://ahasend.com/docs/cli/commands/contacts.md): Create, read, update, delete, and batch-import AhaSend account contacts with the CLI, including status, unsubscribe choices, and custom attributes. - [ahasend lists: Manage Contact Lists](https://ahasend.com/docs/cli/commands/lists.md): Create, update, and delete AhaSend contact lists with the CLI, and add, unsubscribe, or remove the contacts on the lists that your campaigns send to. - [ahasend templates: Transactional Templates](https://ahasend.com/docs/cli/commands/templates.md): Create, update, publish, and delete AhaSend transactional templates with the CLI, inspect or discard drafts, and list or restore published versions. - [ahasend campaigns: Manage Campaigns](https://ahasend.com/docs/cli/commands/campaigns.md): Draft, test, schedule, and send AhaSend campaigns to contact lists with the CLI, read their stats and recipients, and manage reusable campaign templates. - [ahasend subaccounts: Manage Sub-Accounts](https://ahasend.com/docs/cli/commands/subaccounts.md): Create and manage AhaSend sub-accounts with the CLI, check pooled usage, pause test accounts, and issue or revoke their scoped API keys. - [Send Batch Emails from CSV with the CLI](https://ahasend.com/docs/cli/batch-processing.md): Send personalized emails to many recipients from a CSV or JSON file with the AhaSend CLI, with concurrent requests, retries and failed recipient files. - [Message Content and Substitutions in the CLI](https://ahasend.com/docs/cli/templates.md): Write the content of emails sent with the AhaSend CLI: text, HTML and AMP files, global and per-recipient substitutions, conditions, loops and defaults. - [Test Webhooks Locally with the CLI](https://ahasend.com/docs/cli/webhook-testing.md): Receive AhaSend webhook events on localhost without a public URL: stream them with ahasend webhooks listen, forward them and trigger tests. - [Test Inbound Email Routes Locally with the CLI](https://ahasend.com/docs/cli/route-testing.md): Stream inbound email events to localhost with ahasend routes listen, forward them to your app with signed headers, and trigger test events. - [Framework and Platform Email Guides](https://ahasend.com/docs/guides/index.md): Guides for sending transactional email with AhaSend from Node.js, Go, Next.js, Express, serverless platforms, and AI coding tools like Cursor. - [Node.js and TypeScript Email SDK](https://ahasend.com/docs/guides/nodejs-sdk.md): Official AhaSend Node.js and TypeScript SDK (@ahasend/sdk): install, send email, configure retries and idempotency, handle errors, verify webhooks. - [Go Email SDK (ahasend-go)](https://ahasend.com/docs/guides/go-sdk.md): Official AhaSend Go SDK (ahasend-go): install, send transactional email, configure retries and rate limits, handle errors, and verify webhooks. - [How to Send Email with Astro](https://ahasend.com/docs/guides/astro.md): Send transactional email from an on-demand Astro API endpoint with the AhaSend TypeScript SDK and Node adapter, then verify signed AhaSend webhooks. - [How to Send Email from AWS Lambda (Node.js)](https://ahasend.com/docs/guides/aws-lambda.md): Send transactional email from AWS Lambda with the AhaSend Node.js SDK: a protected send handler, esbuild bundling, idempotent retries, and signed webhooks. - [How to Send Email from AWS Lambda (Python)](https://ahasend.com/docs/guides/aws-lambda-python.md): Send email from AWS Lambda in Python with AhaSend: a small HTTP API example, an IAM-invoked handler, sandbox tests and safe request retries. - [How to Send Email from Azure Functions (Go)](https://ahasend.com/docs/guides/azure-functions.md): Send transactional email from Azure Functions in Go with a custom handler and the AhaSend Go SDK, plus HMAC-verified delivery webhooks and a Linux deploy. - [Send Email from Azure Functions (Node.js)](https://ahasend.com/docs/guides/azure-functions-nodejs.md): Send email from Azure Functions in Node.js with the AhaSend SDK, a protected HTTP handler, local Core Tools tests and sandbox-safe configuration. - [Send Email from Azure Functions (Python)](https://ahasend.com/docs/guides/azure-functions-python.md): Send email from Azure Functions in Python using AhaSend: install the v2 programming model, run a protected function locally and test in sandbox mode. - [How to Send Email with Bun](https://ahasend.com/docs/guides/bun.md): Send transactional email from a Bun.serve route with the AhaSend TypeScript SDK, with no shims or dotenv, and verify signed AhaSend webhooks in Bun. - [How to Send Email with chi (Go)](https://ahasend.com/docs/guides/chi.md): Send transactional email from a Go chi router with the AhaSend Go SDK: a token-protected send handler, idempotent retries, and HMAC-verified webhooks. - [How to Send Email from Cloudflare Workers](https://ahasend.com/docs/guides/cloudflare-workers.md): Send transactional email from a Cloudflare Worker with the AhaSend SDK, no nodejs_compat flag needed: Worker secrets, sandbox sends, and signed webhooks. - [How to Send Email with Deno and Deno Deploy](https://ahasend.com/docs/guides/deno-deploy.md): Send transactional email from Deno and Deno Deploy with the AhaSend SDK via npm specifiers: a Deno.serve send route, Deploy secrets, and verified webhooks. - [How to Send Email with Django via SMTP](https://ahasend.com/docs/guides/django.md): Send email from Django through AhaSend SMTP: configure the email backend with STARTTLS, run a short sandbox test and report failed sends clearly. - [Send Drupal Email with the AhaSend Module](https://ahasend.com/docs/guides/drupal.md): Send Drupal email through AhaSend API v2 with the AhaSend module: add a Symfony Mailer transport, test in sandbox mode and log events from signed webhooks. - [How to Send Email with Echo (Go)](https://ahasend.com/docs/guides/echo.md): Send transactional email from an Echo v5 (Go) app with the AhaSend Go SDK: KeyAuth and rate-limit middleware, sandbox sends, and verified webhooks. - [How to Send Email with ElysiaJS (Bun)](https://ahasend.com/docs/guides/elysiajs.md): Send transactional email from an ElysiaJS app on Bun with the AhaSend SDK: a typed t.Object send route, auth in onRequest, and verified signed webhooks. - [How to Send Email with Encore.ts](https://ahasend.com/docs/guides/encore.md): Send transactional email from an Encore.ts service with the AhaSend SDK: Encore secrets, an authenticated api() endpoint, and an api.raw webhook receiver. - [How to Send Email with Express (Node.js)](https://ahasend.com/docs/guides/express.md): Send transactional email from an Express 5 app with the AhaSend Node.js SDK, and verify signed delivery webhooks with the SDK's built-in Express adapter. - [How to Send Email with Fastify (Node.js)](https://ahasend.com/docs/guides/fastify.md): Send transactional email from a Fastify 5 app with the AhaSend Node.js SDK, and verify signed webhooks using fastify-raw-body and the Fastify adapter. - [How to Send Email with Fiber (Go)](https://ahasend.com/docs/guides/fiber.md): Send transactional email from a Fiber v3 (Go) app with the AhaSend email API, including fasthttp-safe webhook verification with verifier.Parse. - [How to Send Email with Flask via SMTP](https://ahasend.com/docs/guides/flask.md): Send email from Flask with AhaSend SMTP and Python smtplib: test in sandbox mode, require STARTTLS and add a server-only command with failure handling. - [How to Send Email with Gin (Go)](https://ahasend.com/docs/guides/gin.md): Send transactional email from a Gin (Go) app with the AhaSend Go SDK: a BasicAuth-protected send route, typed error handling, and verified webhooks. - [How to Send Email from Google Cloud Functions (Go)](https://ahasend.com/docs/guides/google-cloud-functions.md): Send transactional email from Google Cloud Run functions (formerly Cloud Functions) in Go with the AhaSend Go SDK, Secret Manager, and signed webhooks. - [Send Email from Google Cloud Functions (Node.js)](https://ahasend.com/docs/guides/google-cloud-functions-nodejs.md): Send email from Google Cloud Run functions in Node.js with AhaSend: use the Functions Framework, protect the endpoint and run local sandbox tests. - [Send Email from Google Cloud Functions (Python)](https://ahasend.com/docs/guides/google-cloud-functions-python.md): Send email from Google Cloud Run functions in Python through AhaSend, with a protected HTTP function, local sandbox tests and clear failure responses. - [How to Send Email with gorilla/mux (Go)](https://ahasend.com/docs/guides/gorilla-mux.md): Send transactional email from a gorilla/mux (Go) app with the AhaSend Go SDK: sandbox/live mode, idempotent retries, and deduplicated signed webhooks. - [How to Send Email with Hono](https://ahasend.com/docs/guides/hono.md): Send transactional email from a Hono app on Node.js or Bun with the AhaSend TypeScript SDK: protected send route, idempotent retries, and signed webhooks. - [How to Send Email with Koa (Node.js)](https://ahasend.com/docs/guides/koa.md): Send transactional email from a Koa app with the AhaSend Node.js SDK: install, send from a route, and verify AhaSend webhooks with raw-body. - [How to Send Email with Laravel via SMTP](https://ahasend.com/docs/guides/laravel.md): Send email from Laravel through AhaSend SMTP: configure the mailer, require STARTTLS, run a sandbox command and handle failed submissions in your app. - [How to Send Email with NestJS](https://ahasend.com/docs/guides/nestjs.md): Send transactional email from a NestJS app with the AhaSend email API: injectable service, controller route, and verified webhooks with rawBody. - [How to Send Email with Next.js (App Router)](https://ahasend.com/docs/guides/nextjs.md): Send transactional email from Next.js App Router route handlers and Server Actions with the AhaSend SDK, keep API keys server-side, and verify webhooks. - [How to Send Email with Nuxt](https://ahasend.com/docs/guides/nuxt.md): Send transactional email from Nuxt server routes with the AhaSend TypeScript SDK, map runtimeConfig env vars, and verify webhooks in Nitro. - [How to Send Email from Railway (Node.js)](https://ahasend.com/docs/guides/railway.md): Deploy a Node.js app that sends transactional email with the AhaSend SDK to Railway: set variables, expose a public webhook URL, and go live. - [How to Send Email with Remix and React Router](https://ahasend.com/docs/guides/remix.md): Send transactional email from Remix and React Router 7 framework-mode actions with the AhaSend SDK, and verify AhaSend webhooks in a resource route. - [How to Send Email with SvelteKit](https://ahasend.com/docs/guides/sveltekit.md): Send transactional email from SvelteKit server endpoints with the AhaSend TypeScript SDK, keep keys in private env modules, and verify webhooks. - [How to Send Email with Symfony Mailer](https://ahasend.com/docs/guides/symfony.md): Send email with Symfony Mailer and the AhaSend SMTP bridge: install the package, require STARTTLS, test in sandbox mode and handle transport failures. - [How to Send Email from Vercel Functions](https://ahasend.com/docs/guides/vercel.md): Send transactional email from Vercel Functions with the AhaSend Node.js SDK: environment variables, sandboxed Preview deployments, and verified webhook routes. - [How to Send Email from a Vite App](https://ahasend.com/docs/guides/vite.md): Send transactional email from a Vite app safely: an Express backend holds the AhaSend API key while the browser calls an authenticated endpoint. - [Send WordPress Email with the API Plugin](https://ahasend.com/docs/guides/wordpress.md): Set up the AhaSend WordPress email plugin with a legacy API v1 sandbox key, test wp_mail, check plugin limits and prepare your site for live mail. - [How to Send Email from a Bolt.new Project](https://ahasend.com/docs/guides/bolt-new.md): Add transactional email to a Bolt.new app with the AhaSend SDK from a Bolt or Supabase server function or Node backend, with the API key kept server-side. - [How to Add Email to Your App with Claude Code](https://ahasend.com/docs/guides/claude.md): Use Claude Code to build a transactional email workflow on AhaSend: a CLAUDE.md with the real SDK facts, a planned build, and a sandbox test run. - [How to Add Email to Your App with Cursor](https://ahasend.com/docs/guides/cursor.md): Add transactional email with Cursor: an AhaSend project rule in .cursor/rules, a precise Agent prompt, a diff review checklist, and sandbox tests. - [How to Add Email to Your App with GitHub Copilot](https://ahasend.com/docs/guides/github-copilot.md): Delegate an AhaSend email integration to the GitHub Copilot coding agent: write the issue, review the PR, and test safely in sandbox mode. - [How to Send Email from a Lovable App](https://ahasend.com/docs/guides/lovable.md): Send transactional email from a Lovable app with AhaSend: a Supabase Edge Function, API key in Lovable Cloud secrets, and sandbox testing. - [How to Send Email from a v0 App](https://ahasend.com/docs/guides/v0.md): Send transactional email from a v0-generated Next.js app with AhaSend: a server-side Route Handler, Vercel environment variables, and sandbox tests. - [How to Add Email to Your App with Windsurf](https://ahasend.com/docs/guides/windsurf.md): Add transactional email with Windsurf Cascade: an AhaSend rules file, a replayable /ahasend-email Workflow, a diff checklist, and sandbox testing. - [Migrate from SendGrid](https://ahasend.com/docs/migrations/sendgrid.md): Migrate from SendGrid to AhaSend with API field and SMTP setting maps, webhook event changes, suppression import steps and a gradual traffic switch. - [Migrate from Mailgun](https://ahasend.com/docs/migrations/mailgun.md): Migrate from Mailgun to AhaSend with API field and SMTP setting maps, webhook event changes, suppression import steps and a gradual traffic switch. - [Migrate from Postmark](https://ahasend.com/docs/migrations/postmark.md): Migrate from Postmark to AhaSend with API field and SMTP setting maps, webhook event changes, suppression import steps and a gradual traffic switch. - [Migrate from Resend](https://ahasend.com/docs/migrations/resend.md): Migrate from Resend to AhaSend with API field and SMTP setting maps, webhook event changes, suppression import steps and a gradual traffic switch. - [Migrate from Amazon SES](https://ahasend.com/docs/migrations/amazon-ses.md): Migrate from Amazon SES to AhaSend with API field and SMTP setting maps, webhook event changes, suppression import steps and a gradual traffic switch. - [Changelog: Product and API Updates](https://ahasend.com/docs/changelog.md): Monthly AhaSend release notes: new API v2 endpoints, official SDKs, webhook payload changes, SMTP and deliverability improvements, breaking changes and fixes. - [Product Roadmap](https://ahasend.com/docs/roadmap.md): See what AhaSend has recently shipped, is building now and plans next for its transactional email API, SMTP relay, webhooks, sub-accounts and dashboard. ## OpenAPI Specs - [openapi-v1](/docs/openapi-v1.yaml) - [openapi](/docs/openapi.yaml) - [webhooks](/docs/webhooks.yaml) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.