anon_email
API referenceAliases

Create an alias

POST
/aliases

Create an alias that forwards to the given recipients, or to the account's default recipient when recipient_ids is omitted.

  • local_part is generated from random words when omitted.
  • The address is <local_part>@<domain>, where <domain> is the first entry of GET /domain-options.
  • Every recipient must be verified and active, and count against the plan's recipient quota (recipients are shared, not per alias).
  • Creating an alias consumes one slot of the plan's alias quota.

Authorization

CognitoUserPool
headerAuthorizationBearer <token>

Cognito user pool ID token. API Gateway validates the token (identity token: no OAuth scopes are configured on the authorizer) and forwards its claims; the sub claim is the tenant key.

Request Body

application/json
  1. body
local_part?string

Local part of the address: 2–64 characters of a-z, 0-9, hyphen, or underscore, starting alphanumeric. Generated from random words when omitted.

Match^[a-z0-9][a-z0-9_-]{1,63}$
description?string

Free-form label.

recipient_ids?array<string>

Recipients to forward to. Every id must be a verified, active recipient owned by the caller. When omitted or empty, the account's default recipient is used.

Response Body

Alias created.

application/json
  1. response
alias_id*string

Opaque id, stable for the life of the alias.

alias_email*string

The full forwarding address.

Formatemail
description*string

Free-form label. Empty when never set.

active*boolean

Whether the alias currently accepts mail.

destination_emails*array<>

Addresses this alias forwards to.

emails_sent*integer

Messages accepted for forwarding, as reported by SES.

emails_delivered*integer
emails_bounced*integer
emails_complaint*integer
emails_replied*integer
emails_blocked*integer
datetime_last_sent*|

Unix epoch milliseconds, or null when the event has not occurred.

datetime_last_delivered*|

Unix epoch milliseconds, or null when the event has not occurred.

datetime_last_bounced*|

Unix epoch milliseconds, or null when the event has not occurred.

datetime_last_complaint*|

Unix epoch milliseconds, or null when the event has not occurred.

datetime_last_blocked*|

Unix epoch milliseconds, or null when the event has not occurred.

datetime_last_replied*|

Unix epoch milliseconds, or null when the event has not occurred.

datetime_created*integer

Creation time, unix epoch milliseconds.

datetime_updated*integer

Last modification time, unix epoch milliseconds.

datetime_deleted*|

Unix epoch milliseconds, or null when the event has not occurred.

curl -X POST "https://example.com/aliases" \  -H "Content-Type: application/json" \  -d '{}'
{  "alias_id": "string",  "alias_email": "user@example.com",  "description": "string",  "active": true,  "destination_emails": [    "user@example.com"  ],  "emails_sent": 0,  "emails_delivered": 0,  "emails_bounced": 0,  "emails_complaint": 0,  "emails_replied": 0,  "emails_blocked": 0,  "datetime_last_sent": 0,  "datetime_last_delivered": 0,  "datetime_last_bounced": 0,  "datetime_last_complaint": 0,  "datetime_last_blocked": 0,  "datetime_last_replied": 0,  "datetime_created": 0,  "datetime_updated": 0,  "datetime_deleted": 0}