Email Alias API: Create aliases programmatically.
The Emcognito API is a small REST surface for creating and listing email aliases from your own code: scripts, CI pipelines, signup flows, or internal tools. Authenticate with a single API key sent as a Bearer token, send and receive JSON, and every alias you create behaves exactly like one made in the dashboard. API access is included with Plus and Pro plans.
Quick start
Create an alias:
curl -X POST https://api.emcognito.com/v1/aliases \
-H "Authorization: Bearer emk_your_key" \
-H "Content-Type: application/json" \
-d '{"label": "acme-signup"}'List your aliases:
curl https://api.emcognito.com/v1/aliases \
-H "Authorization: Bearer emk_your_key"The POST body is optional JSON. label, note, source and category are free text; single_use (boolean) burns the alias after one forwarded message, and expires_at (epoch seconds, between 5 minutes and 366 days out) schedules its deletion.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/aliases | Create an alias. Optional JSON body: label, note, source, category, single_use, expires_at. |
| GET | /v1/aliases | List your aliases. Optional limit (1–100) and cursor pagination via last_key. |
| GET | /v1/aliases/{id} | One alias, under alias. 404 for any id that is not yours. |
| PATCH | /v1/aliases/{id} | Update status (active or suspended), label, note, source or category. Returns the alias. |
| DELETE | /v1/aliases/{id} | Delete the alias: 204. The address is never reissued, and mail to it is dropped. |
Webhooks Pro
Set one HTTPS URL under Settings → Developer. After every forward to one of your aliases we POST an alias.mail_received event there: the alias id, address, label and source, the sender's domain, the delivery id and how many tracking pixels were stripped. It never includes the subject, the body or any address but the alias.
The URL must be https:// on port 443 at a public hostname: no IP addresses, nothing private, local or internal, and not Emcognito itself. We check it when you set it and again before every delivery, and we never follow redirects — a 3xx counts as a refusal, not a retry.
POST https://your.example/hooks/emcognito
Content-Type: application/json
X-Emcognito-Event: alias.mail_received
X-Emcognito-Delivery: 3f1c…
X-Emcognito-Timestamp: 1760745600
X-Emcognito-Signature: sha256=<HMAC-SHA256(secret, raw body)>
{"event":"alias.mail_received","delivery_id":"3f1c…","received_at":1760745600,
"alias":{"id":"k7m4-9xrt","address":"k7m4-9xrt@emcognito.com","label":"shop","source":"Best Buy"},
"sender_domain":"shop.example","trackers_blocked":2,"account":{"email_hash":"…"}}Verify by computing HMAC-SHA256 of the raw request body with the secret shown once when you set the URL, and comparing it to the header. Reply with any 2xx within 10 seconds. Anything else is retried 1, 5 and 25 minutes later, then dropped.
account.email_hash is an opaque, stable identifier for the account the alias belongs to — a keyed hash, so it cannot be derived from or matched against an email address. Use it to tell accounts apart when several point at one endpoint; it does not change when the secret is rotated. (Its value changed once on 18 October 2026 when the keying was added.)
Responses
GET /v1/aliases returns a page of aliases plus an opaque cursor. Pass next_cursor straight back as ?last_key= to fetch the next page; it is null on the last one.
{
"aliases": [
{
"id": "01hq…",
"address": "01hq…@emcognito.com",
"status": "active",
"created_at": 1786000000,
"forward_count": 3,
"note": "",
"source": "",
"label": "acme-signup",
"category": "",
"single_use": false,
"expires_at": null
}
],
"next_cursor": null,
"has_more": false
}POST /v1/aliases returns the one alias it created, in the same shape, under alias:
{ "alias": { "id": "01hq…", "address": "01hq…@emcognito.com", … } }Two fields appear only when they apply: replies_enabled when replies have been configured on the alias, and suspended_reason when status is suspended.
Rate limits
Two separate budgets apply. The per-minute burst limit is counted per API key and covers every call; the daily cap counts alias creation only, so listing your aliases never consumes it.
| Calls | Burst | Daily |
|---|---|---|
Reads — GET /v1/aliases | 60/min | — |
Writes — POST /v1/aliases | 60/min | Plus 50/day · Pro 200/day |
Both return 429. The burst limit clears within the minute; the daily cap resets at 00:00 UTC.
Authentication
Every request carries your API key as a Bearer token in the Authorization header. Keys are managed at /settings/developer — one key per account. Rotating or revoking a key invalidates the old one immediately, and keys only work while the account is on a Plus or Pro plan.
Errors
| Status | Meaning |
|---|---|
400 | A malformed limit or last_key, or an invalid single_use / expires_at in the body. |
401 | Invalid or revoked API key. |
403 | plan_required — the account is on the Free plan; the API needs Plus or Pro. |
403 | plan_past_due — a payment failed. Paid API access pauses immediately until payment recovery restores paid access. |
403 | plan_canceled — the subscription was canceled. |
409 | Address collision while minting the alias. The API now redraws and retries internally, so a single collision never reaches you — a 409 means three independent draws all collided, which points at the service, not at your request. Retrying is still safe. |
429 | Over the burst limit or the daily creation cap. See rate limits above. |
503 | Rate limiting is temporarily unavailable, so /v1 is closed while the limiter is down. Honour the Retry-After header. This protects the service while the rate limiter is down. Nothing you send causes it, and retrying is correct. It normally clears in seconds. If it persists past a few minutes it is an incident on our side, not the routine case. The two responses are identical, so how long it lasts is the only way to tell them apart. Mail hello@wm.emcognito.com and we will tell you what is happening. |
Plan and key errors carry {"code", "description"}; the rest carry {"message"}. Key off the status and the code where present.
Frequently asked questions
Is there a free API tier?
No. API keys are available on Plus ($2.50/month) and Pro ($4/month). Alias creation in the dashboard and extension is unlimited on both plans — the API is for programmatic use, and keeping it on paid tiers is how we keep it abuse-resistant and stable.
How many API keys can I have?
One per account. Generating a new key rotates the old one, which stops working immediately — the same applies when you revoke a key.
What are the rate limits?
Every call is capped at 60 per minute, counted per API key. Alias creation has a second, daily cap on top of that — 50/day on Plus and 200/day on Pro. Listing aliases does not consume the daily cap. Both limits return 429, and your existing aliases and mail forwarding are unaffected either way.
What happens to my API key if a payment fails?
Paid API access pauses immediately when payment is overdue. Calls return 403 plan_past_due until payment recovery restores paid access. Updating a card alone does not settle an invoice. Canceling outright returns 403 plan_canceled immediately.
Can I delete or suspend aliases through the API?
Not yet. v1 covers creating and listing aliases; suspend, resume, and delete from the dashboard.