Mail Alias Resource

Mail aliases are used to forward mails from your applications environment.

List Mail Aliases

Returns a list of mail alias resources associated with the current application.

GET /rest/applications/<APPLICATION_ID>/mailaliases

Response

[
   {
       "forward": "john.smith@example.com",
       "_links": {
          "href": "https://d9tready.com/rest/applications/<APPLICATION_ID>/mailaliases/john",
          "rel": "self"
       },
       "local": "john",
       "id": "john"
   },
   ...
]

Attributes

  • id - Unique identifier of resource.
  • local - Local part of applications email.
  • forward - Target of forwarding.
  • _links - Link relations.

HTTP Status Codes

Status Code Description
200 OK No error, operation successful
403 FORBIDDEN Authentication failure
503 SERVICE UNAVAILABLE Service not/partially reachable

Retrieve Mail Alias

Retrieve a single mail alias resources.

GET /rest/applications/<APPLICATION_ID>/mailaliases/john

Response

{
    "id": "admin",
    "local": "admin",
    "forward": "or@d9t.de",
}

Attributes

  • id - Unique identifier of resource.
  • local - Local part of applications email.
  • forward - Target of forwarding.

HTTP Status Codes

Status Code Description
200 OK No error, operation successful
403 FORBIDDEN Authentication failure
404 NOT FOUND Resource not found
503 SERVICE UNAVAILABLE Service not/partially reachable

Create Mail Alias

Add a mail alias to the application.

POST /rest/applications/<APPLICATION_ID>/mailaliases

Payload

{
   "local": "john",
   "forward": "john.smith@example.com"
}
  • local - Local part of applications email.
  • forward - Target of forwarding.

Response

On successful creation the URL to the new domain resource is set in the Location-Header.

HTTP/1.0 201 CREATED
Location: https://d9tready.com/rest/applications/<APPLICATION_ID>/mailaliases/john

HTTP Status Codes

Status Code Description
201 CREATED Successful creation of resource
400 BAD REQUEST Malformed syntax or bad query
403 FORBIDDEN Authentication failure

Delete Mail Alias

Permanently delete a mail alias resource.

DELETE /rest/applications/<APPLICATION_ID>/mailaliases/<MAILALIAS_ID>

HTTP Status Codes

Status Code Description
204 NO CONTENT Successful deletion of resource
400 BAD REQUEST Malformed syntax or bad query
403 FORBIDDEN Authentication failure