Read and set the email forwarding rules on a domain. Each rule forwards mail sent to a prefix at the domain to a destination address.
Email forwarding depends on the registrar module backing your account. The current sandbox registrar returns a 501 “Function not supported by the registrar module” for both calls. The shapes below describe the intended behavior on a registrar that supports forwarding; the observed sandbox response is shown at the end of each section.

Get email forwarding

Return the forwarding rules for a domain. GET /domains/{domain}/email

Parameters

text
required
The domain to read, for example example.com.

Request

Response

On a registrar that supports forwarding, this returns the current rules. On the sandbox registrar it returns:

Save email forwarding

Replace the forwarding rules on a domain. Send matching prefix[] and forwardto[] arrays: the first prefix forwards to the first destination, and so on. POST /domains/{domain}/email

Parameters

text
required
The domain to update, for example example.com.
array
The local parts to forward, for example info. Repeat as prefix[] for each rule.
array
The destination addresses, aligned by index with prefix. Repeat as forwardto[] for each rule.

Request

Response

On a registrar that supports forwarding, this returns a success status once the rules are stored. On the sandbox registrar it returns: