emcognito
Back to Blog

Integrating an Email Alias API for Custom Software: Routing, Limits, and Implementation

September 12, 2026

Updated

Developer APIEmail AliasesREST APISoftware ArchitectureEmail Privacy

Keep your real inbox private.

Create unlimited aliases. The first 100 forwarded emails each month are free.

Create a free alias →

Evaluating an Email Alias API for Custom Software vs. In-House Postfix Relay

An email alias API for custom software provisions isolated, programmatic forwarding addresses on demand without requiring you to build and maintain mail exchange infrastructure. When building multi-tenant platforms, automated testing suites, or user-facing privacy features, applications frequently need to generate inbound email endpoints dynamically. Choosing between an external REST API and a self-hosted Postfix relay comes down to ongoing maintenance costs, deliverability overhead, and operational scope.

Running an in-house mail transfer agent (MTA) appears straightforward initially: you deploy an open-source Postfix instance, configure virtual alias maps, and accept inbound traffic. However, running production mail infrastructure demands continuous engineering time. You should ensure standard SMTP compliance for envelope senders, manage delivery queue backpressure, keep your IP reputation clean, and configure Sender Policy Framework (SPF) alongside DomainKeys Identified Mail (DKIM) signatures. When upstream receiving providers like Google Workspace or Microsoft 365 alter spam heuristics or throttle your relay IP, your engineers spend hours triaging delivery drops instead of building core product features.

Using a documented REST API for email aliases replaces MTA maintenance with standard HTTP requests. Instead of modifying database lookup tables on a Linux host, your application issues a POST request and receives an active, reply-capable forwarding address in milliseconds. This programmatic approach eliminates downstream data leaks across microservices, isolates testing pipelines from production user mailboxes, and ensures that leaked database credentials only reveal isolated forwarders rather than operational inboxes.

Before adopting any managed service, you must account for infrastructure realities. Emcognito aliases use the shared emcognito.com domain. Custom subdomain support is planned, but custom domains are not available today. If your application architecture mandates white-labeled domain branding on every generated address, an in-house relay or an enterprise-specific platform will be necessary. If your priority is rapid deployment, reliable TLS forwarding, and isolated routing without server management, an alias API provides immediate leverage.

Operational Metric In-House Postfix Relay Emcognito REST API
Provisioning Mechanism Database query, hash file updates, or custom daemon Standard HTTP POST /v1/aliases call
Infrastructure Burden MTA patches, reverse DNS, DKIM key rotation, IP warming Zero infrastructure; fully managed REST service
Outbound Deliverability Subject to self-managed IP reputation and sender scoring Managed relay via Postfix and Amazon SES over TLS
Domain Configuration Any domain with accessible MX records Shared emcognito.com routing domain
Engineering Cost High initial setup; recurring maintenance and on-call triage Predictable monthly subscription ($2/mo or $4/mo)

How Programmatic Email Forwarding Operates Under the Hood

Programmatic email forwarding relies on clean envelope address manipulation. When an external entity sends mail to a generated alias, the inbound mail server processes the message through an MTA queue before forwarding it to the verified recipient inbox. Understanding this lifecycle ensures that your custom software handles header references, spam diagnostics, and reply threads accurately.

According to the standard Postfix Architecture Overview, an MTA ingests inbound traffic via the smtpd daemon, resolves virtual alias maps to determine the target recipient, and hands the message to a cleanup service that standardizes headers. In a managed alias architecture like Emcognito, mail transits Postfix and relays via Amazon SES over TLS. During ingestion, the original To: address remains visible in the header so the recipient knows which alias received the message, but the envelope recipient (RCPT TO) is rewritten to point directly to your primary verified inbox.

[External Sender]
       │
       ▼ (SMTP over TLS)
[Emcognito Ingestion: Postfix]
       │
       ├─► Validates active alias status
       ├─► Rewrites Reply-To to reverse routing address
       ├─► Checks monthly forward cap
       │
       ▼ (SES Relay over TLS)
[Verified Destination Mailbox]

Reverse routing mechanics allow two-way communication without exposing your primary inbox. When an inbound message forwards to your personal email address, the service modifies the Reply-To header. The live Reply-To token is a plaintext substitution and the correspondent's address is readable in the header by anyone who sees it. It is not an encrypted, hashed, or opaque token. When you click reply in your client, the response routes back through the forwarding relay. The service strips your real email address, inserts the alias in the From: field, and transmits the response to the external sender. This allows engineering teams to implement programmatic customer communication or replying to forwarded mail without writing mail parsing engines.

Technical evaluators often ask about data retention during transit. Emcognito forwards mail over TLS-encrypted transport and does not read message contents or retain them after delivery, apart from a brief hold on mail that arrives over your monthly forward cap, but it is not end-to-end encrypted. For content confidentiality, pair it with an encrypted mailbox such as Proton Mail or Tuta. Furthermore, Emcognito is not a zero-knowledge service. It does not read or analyse message contents, or retain them after delivery, apart from a brief hold on mail that arrives over your monthly forward cap, but it necessarily handles mail in readable form in order to deliver it.

Operational monitoring requires clear logging boundaries. Emcognito collects no personal information beyond a destination address and does not retain message bodies after delivery, apart from a brief hold on mail that arrives over your monthly forward cap, but it keeps the delivery and operational logs any mail service needs. That is data minimisation, not a no-log policy. These transaction logs record timestamps, message IDs, and delivery status codes to ensure bounced messages can be diagnosed without preserving message bodies.

API Architecture: Authentication, Quotas, and Daily Rate Caps

Integrating an email alias API for custom software requires understanding authentication protocols and usage rate ceilings. Emcognito accounts use passwordless magic-link authentication for web dashboard access, ensuring no static administrative passwords exist to be compromised. From the dashboard, account holders generate long-lived API bearer tokens scoped to programmatic endpoints.

Developer API access is strictly gated on paid subscriptions. The Free tier includes unlimited aliases created via the web interface or extension, but it does not grant API access. Programmatic automation requires either the Plus tier (a measurable budget per month or a measurable budget per year) or the Pro tier (a measurable budget per month or a measurable budget per year). Each tier enforces distinct programmatic creation caps:

  • Plus Plan: Developer API capped at 50 new aliases per day.
  • Pro Plan: Developer API capped at 200 new aliases per day.

It is vital to distinguish between alias creation caps and monthly forwarding volume. On every Emcognito tier, the total number of aliases stored on your account is unlimited. You are rarely forced to prune old aliases to remain within an arbitrary inventory ceiling. What is metered is forwarded email volume and daily programmatic API requests. Plus accounts receive 2,500 forwards per month, while Pro accounts receive 15,000 forwards per month.

Applications interacting with the API must implement proper rate limit handling. If your software exceeds its daily alias creation ceiling, the API returns an HTTP 429 response. The MDN Web Docs HTTP 429 specification defines this status code as indicating that the user has sent too many requests in a given amount of time. Production code should read the Retry-After response header and queue subsequent requests rather than throwing unhandled exceptions.

// Example HTTP 429 Rate Limit Response Header
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 3600

{ "error": "rate_limit_exceeded", "message": "Daily alias creation limit reached for this tier.", "daily_limit": 50, "resets_in_seconds": 3600 }

Step-by-Step Integration: Calling the Email Alias API for Custom Software

Deploying automated email alias creation within your application takes only a few standard REST calls. The following implementation walkthrough uses curl and Node.js examples to illustrate alias provisioning, tagging, and programmatic deactivation.

1. Provisioning a New Alias via POST Request

To mint an address, your service sends a JSON payload to POST /v1/aliases. Emcognito mints a nine-character random alias, which matches the shortest random format in the category. Several services also let you choose your own local part. You can supply an optional metadata label to track which user, order ID, or automated test container initiated the creation.

curl -X POST https://api.emcognito.com/v1/aliases \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "tenant-sandbox-user-891",
    "description": "Integration test runner ephemeral alias"
  }'

A successful response returns HTTP 201 with the full address record:

{
  "id": "al_9x8f2k1m7",
  "email": "k3m9p2x1a@emcognito.com",
  "label": "tenant-sandbox-user-891",
  "created_at": "2026-09-12T14:32:00Z",
  "status": "active",
  "forward_to": "ops-receiver@yourcompany.com"
}

2. Programmatic Node.js Implementation with Backoff

When you automate email alias creation within continuous integration or microservice provisioning, wrap the HTTP client in a retry mechanism that monitors rate caps:

import axios from 'axios';

const EMCOGNITO_API_URL = 'https://api.emcognito.com/v1/aliases'; const API_TOKEN = process.env.EMCOGNITO_API_TOKEN;

async function createTenantAlias(tenantId) { try { const response = await axios.post( EMCOGNITO_API_URL, { label: tenant-${tenantId}, description: 'Auto-provisioned tenant contact address' }, { headers: { 'Authorization': Bearer ${API_TOKEN}, 'Content-Type': 'application/json' } } ); return response.data.email; } catch (error) { if (error.response && error.response.status === 429) { const waitSeconds = error.response.headers['retry-after'] || 60; console.warn(Rate ceiling reached. Backing off for ${waitSeconds} seconds.); // Implement queue delay or administrative alert } throw error; } }

3. Managing the Alias Lifecycle: Suspension and Deletion

Any alias can be suspended or deleted individually with one click in the web interface, or via a single API call in code. Suspending an alias keeps its routing address registered to your account but immediately drops inbound mail at the SMTP boundary. Deletion permanently purges the address from your account.

To suspend an alias after an automated testing cycle completes, issue a PATCH request:

curl -X PATCH https://api.emcognito.com/v1/aliases/al_9x8f2k1m7 \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "suspended"
  }'

When external services suffer security incidents or begin sending unsolicited newsletters to an address generated for an integration, suspending the alias cuts off the inbound stream instantly. Because your custom software assigns a distinct alias to each provider or tenant, the alias itself identifies precisely which system leaked the data.

Volume Planning: Choosing Between the Plus and Pro Tiers

Choosing the correct subscription tier for your software integration depends on two variables: your required daily programmatic alias generation volume and your projected monthly forwarding traffic. Review the breakdown on our pricing page before deploying production workloads.

Plan Feature Free Plan Plus Plan Pro Plan
Pricing $0 (No card required) $2/month or $20/year $4/month or $36/year
Developer REST API Not available 50 aliases / day 200 aliases / day
Forwarding Limit 100 messages / month 2,500 messages / month 15,000 messages / month
Alias Inventory Unlimited Unlimited Unlimited
Reply to Forwarded Mail Included Included Included
Compose New Mail Not available Included Included (Higher daily cap)
Message Footer Small sponsor card Clean (No sponsor card) Clean (No sponsor card)

For small software projects, internal development tools, or staging environments creating fewer than 50 addresses per day, the Plus plan (a measurable budget per month or a measurable budget per year) offers sufficient capacity alongside 2,500 forwarded messages per month. If your application handles multi-tenant customer notifications, automated QA test suites running continuous deployments, or marketplace communication, the Pro plan (a measurable budget per month or a measurable budget per year) provides a 200 alias-per-day generation cap and 15,000 monthly forwards. Pro yearly at a measurable budget per year represents the best annual value at three months free.

A critical technical distinction between the Free tier and paid plans involves message composition. Free tier users can receive forwarded mail and send replies indefinitely without cost. However, composing brand-new mail from an alias is the only capability the Free tier cannot do at any usage level. Replying to forwarded mail is free on every tier. If your custom application requires initiating outbound outreach directly from an alias without first receiving an inbound message, you must integrate against a paid plan supporting composing new mail from an alias.

Both Plus and Pro subscriptions include a 7-day free trial. An active credit card starts the trial, but your payment method is not charged until the seven-day period concludes. Paid tiers also completely strip the small, clearly-labelled sponsor card that appears at the bottom of messages forwarded on the Free tier, maintaining clean transactional formatting across all forwarded traffic.

Error Handling, Bounce Protocols, and Leaked Address Remediation

Production software relying on programmatic email forwarding must account for delivery failures, bounce codes, and traffic spikes. Email delivery is inherently asynchronous; your application needs robust remediation strategies when messages fail to reach their final destination.

Forwarded messages encounter two primary categories of delivery failure:

  • Hard SMTP Bounces (5xx status codes): These occur if your downstream primary recipient mailbox is deleted, disabled, or rejecting mail due to aggressive spam filtering. The relay records the bounce in delivery logs. If a recipient mailbox continuously generates hard bounces, forwarding to that destination is paused to protect IP reputation.
  • Soft Capacity Throttles (4xx status codes): These occur when your downstream provider temporarily rate-limits inbound traffic. The Postfix queue automatically retries delivery using standard exponential backoff intervals over a 48-hour window before discarding the message.

Another operational edge case is handling traffic bursts that exceed your plan's forward limits. If your integration receives traffic beyond your monthly forward cap (for example, exceeding 2,500 messages on Plus or 15,000 on Pro), Emcognito does not silently drop your data. Inbound messages that arrive over your monthly forward cap enter a brief hold buffer. This temporary buffer ensures you have time to upgrade your tier or resolve looping mail scripts without losing critical inbound correspondence.

Phishing and credential harvesting represent ongoing concerns for software administrators handling automated communication. In their official FTC phishing guidance, regulators advise organizations and consumers to treat unexpected messages and requests for sensitive data with high caution. When a database breach or compromised third-party SaaS vendor leaks an alias, inbound malicious traffic often spikes. Because an email alias API for custom software provisions dedicated, isolated endpoints for each vendor, you can diagnose the leak origin instantly and suspend the affected alias via API. The attacking sender is cut off at the relay edge, and no malicious traffic reaches your primary inbox.

When planning for business continuity and long-term platform resilience, teams must understand system exit terms. Emcognito publishes a wind-down commitment: advance notice before a planned shutdown and alias export so accounts can be migrated, on a best-efforts basis. It is not a contractual guarantee. If a project shuts down or migrates elsewhere, administrators can export their active routing tables to preserve routing records.

Technical Scope: When This API Is the Right Choice and When It Is Not

No single developer tool fits every software architecture. Evaluating an email alias API for custom software requires evaluating specific engineering constraints, legal compliance mandates, and functional boundaries.

When Emcognito Is the Right Choice

  • Automated Testing and CI/CD Pipelines: Your test suites need to create unique, ephemeral accounts across staging applications, verify transactional confirmation emails, and tear down addresses programmatically.
  • Privacy-Preserving User Communication: Two-sided marketplaces, dating apps, or freelancer networks where users must communicate back and forth via email without exposing personal addresses to one another.
  • Third-Party SaaS and Vendor Isolation: Centralized internal tools that generate isolated addresses for vendor registrations, preventing vendor database breaches from compromising internal corporate addresses.
  • Simple, Cardless Evaluation: Developers can test manual routing and inbound parsing on the Free plan immediately using passwordless magic links, upgrading to a paid tier only when API automation is ready for implementation.

When Emcognito Is the Wrong Choice

  • Custom Domain Branding Requirements: If your product requires inbound routing under your own company domain (e.g., user@custombrand.com), Emcognito cannot serve this requirement. Emcognito does not offer custom domains, is not open source, and cannot be self-hosted.
  • On-Premises or Air-Gapped Deployments: Organizations with strict data residency policies requiring internal server hosting should deploy an in-house Postfix or OpenSMTPD cluster instead of calling a cloud API.
  • Mass Marketing Outbound Sending: Emcognito is an alias and forwarding platform, not an outbound marketing engine like SendGrid or Mailgun. While paid plans support composing new mail from an alias, daily send caps are designed for conversational email, not bulk newsletter distribution.

For security-focused engineering teams handling confidential communications, routing architecture should be decoupled from mailbox security. Forwarding traffic through an alias API masks identity at the transport layer. Pairing that transport layer with an encrypted, zero-knowledge destination mailbox like Proton Mail or Tuta ensures that while mail transits standard TLS networks, message bodies rest fully encrypted at their final destination.

Frequently Asked Questions

Does Emcognito allow alias creation via API on the Free tier?

No. The Free tier provides unlimited manual alias creation through the web dashboard and browser extension, 100 forwarded messages per month, and free replies, with no credit card required. However, programmatic API access is strictly reserved for paid plans. You must subscribe to either the Plus tier (50 aliases per day) or the Pro tier (200 aliases per day) to generate bearer tokens and access the REST endpoints.

Can custom software compose new outbound emails through the developer API?

Paid accounts on Plus and Pro tiers include the ability to compose new mail from an alias, with higher daily send allowances allocated to Pro accounts. Outbound composition allows you to initiate brand-new email threads from an alias address rather than merely replying to inbound forwarded messages. Outbound sending is calibrated for conversational communication rather than high-volume bulk marketing.

What happens when forwarded mail exceeds the monthly tier limit?

If your forwarded message volume exceeds your plan's monthly allocation (100 messages on Free, 2,500 on Plus, or 15,000 on Pro), inbound messages are not silently discarded. Instead, mail that arrives over your monthly forward cap enters a brief hold buffer. This temporary hold allows administrators time to upgrade their tier before any incoming messages bounce.

Can I connect my own domain to the Emcognito API?

No. Emcognito aliases use the shared emcognito.com domain. Custom subdomain support is planned, but custom domains are not available today. If your application strictly requires forwarding addresses minted under your own private domain, an in-house Postfix configuration or a domain-level email relay service will be required.

Evaluate the REST API on Emcognito Plus or Pro with a 7-day free trial at https://emcognito.com/pricing to automate your alias workflow with up to 200 creations per day.

Sources and further reading

Ready to protect your email?

100 forwarded emails a month at no cost, no credit card, passwordless sign-in.

Create anonymous email now →