Create domain alias
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias}"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request POST \
--url https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias} \
--header 'X-API-Key: <api-key>'{
"domain": {
"domain": "<string>",
"subscriptionHandle": "<string>",
"admins": [
"<string>"
],
"downstreamAddresses": [
{
"priority": 1,
"weight": 1,
"port": 1,
"target": "<string>"
}
],
"aliases": [
"<string>"
],
"settings": {
"abusePolicy": "block",
"abusePolicyOverride": true,
"spamHeaderName": "<string>",
"spamHeaderValue": "<string>"
}
},
"alias": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}Create domain alias
Create an alias for the domain
POST
/
domains
/
{domain}
/
alias
/
{alias}
Create domain alias
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias}"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}curl --request POST \
--url https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias} \
--header 'X-API-Key: <api-key>'{
"domain": {
"domain": "<string>",
"subscriptionHandle": "<string>",
"admins": [
"<string>"
],
"downstreamAddresses": [
{
"priority": 1,
"weight": 1,
"port": 1,
"target": "<string>"
}
],
"aliases": [
"<string>"
],
"settings": {
"abusePolicy": "block",
"abusePolicyOverride": true,
"spamHeaderName": "<string>",
"spamHeaderValue": "<string>"
}
},
"alias": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}Was this page helpful?
⌘I

