Skip to main content
POST
/
domains
/
{domain}
/
email
Save Email Forwarding
curl --request POST \
  --url https://vicem.com/modules/addons/DomainsReseller/api/index.php/domains/{domain}/email \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'token: <token>' \
  --header 'username: <username>' \
  --data domain=example.com \
  --data-urlencode prefix%5B0%5D=info \
  --data-urlencode prefix%5B1%5D=contact \
  --data-urlencode forwardto%5B0%[email protected] \
  --data-urlencode forwardto%5B1%[email protected]
{
  "success": "success"
}

Headers

username
string<email>
required

Reseller email address registered in WHMCS

token
string
required

HMAC-SHA256 authentication token.

PHP formula: base64_encode(hash_hmac('sha256', $apiKey, $email . ':' . gmdate('y-m-d H')))

Important: hash_hmac without the 3rd parameter true (returns hex, not binary), then base64_encode of the hex result. The token is 88 characters long.

An optional timestamp header (Unix timestamp, 60-second tolerance) can be sent to synchronize time.

Example:

"YTk4YjRmNjI..."

Path Parameters

domain
string
required

Domain name (e.g. example.com)

Example:

"example.com"

Body

application/x-www-form-urlencoded
domain
string
required

Domain name

Example:

"example.com"

prefix
string[]

Array of address prefixes (part before the @)

Example:
["info", "contact"]
forwardto
string[]

Array of destination email addresses (matches prefix by index)

Response

Success

success
string
Example:

"success"