Create alias

Create (add) an alias

  • HTTP Method: POST
  • URL: https://example.domain.tld/api/v1/aliases/
  • Require authentication: Yes
  • Permission level required: MasterAdmin / DomainAdmin

Request parameters

Parameter Type Description Required
alias str Alias address Required
recipients str Comma separated list of recipient addresses Required

Caution

You can add a catch-all alias with the format @domain.tld. Configuring a catch-all alias is discouraged as it accepts mail from spammers to non-existent addresses.

Response parameters

Parameter Type Description
alias str Alias address
recipients str Comma separated list of recipient addresses

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/aliases/"
data = {
"alias" : "alias@vonmail.com",
"recipients" : "u1@vonmail.com, u2@vonmail.com"
}
r = requests.post(url, json=data, auth=("admin","long-auth_token-here"))
try:
    pprint(r.json())
except: 
    print(r.text)

Example response (JSON)

{'alias': 'alias@vonmail.com', 'recipients': 'u1@vonmail.com,u2@vonmail.com'}