Create an alias
POST
/api/v1/aliases
const url = 'https://app.shroud.email/api/v1/aliases';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"domain":"example.com","local_part":"myemail","notes":"Used for shopping receipts","title":"Acme"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.shroud.email/api/v1/aliases \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "domain": "example.com", "local_part": "myemail", "notes": "Used for shopping receipts", "title": "Acme" }'Creates an enabled alias with a random or custom address. Random addresses use
the default shared domain (@fog.shroud.email on hosted Shroud.email).
OAuth scope: aliases:create.
Authorizations
Section titled “ Authorizations ”Request Body
Section titled “ Request Body ”Optional alias settings
Media type application/json
CreateAlias
Omit both local_part and domain for a random alias; otherwise supply both strings.
object
domain
A custom domain owned by your account.
string
local_part
string
notes
string
title
string
Example
{ "domain": "example.com", "local_part": "myemail", "notes": "Used for shopping receipts", "title": "Acme"}Responses
Section titled “ Responses ”Created alias
Media type application/json
EmailAlias
object
address
required
string format: email
blocked
required
integer
blocked_addresses
required
Array<string>
enabled
required
boolean
forwarded
required
integer
notes
required
string
title
required
string
Example
{ "address": "myemail@example.com", "blocked": 0, "blocked_addresses": [], "enabled": true, "forwarded": 0, "notes": "Used for shopping receipts", "title": "Acme"}Invalid token
Media type application/json
Error
object
error
required
string
Example
{ "error": "Invalid token"}Insufficient scope, unconfirmed/inactive account, or free plan alias limit reached
Media type application/json
Error
object
error
required
string
Example
{ "error": "Invalid token"}Invalid metadata, address, or domain
Media type application/json
Error
object
error
required
string
Example
{ "error": "Domain not found"}