Bulk create login links
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({domains: [{domain: '<string>'}]})
};
fetch('https://api.mailchannels.net/inbound/v1/domains/batch/login-link', 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/batch/login-link"
payload = { "domains": [{ "domain": "<string>" }] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailchannels.net/inbound/v1/domains/batch/login-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domains' => [
[
'domain' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/batch/login-link \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"domains": [
{
"domain": "<string>"
}
]
}
'{
"successes": [
{
"domain": "<string>",
"code": 200,
"comment": "<string>",
"loginLink": "<string>"
}
],
"errors": [
{
"domain": "<string>",
"code": 200,
"comment": "<string>",
"loginLink": "<string>"
}
]
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}Bulk create login links
Generate a batch of links that allow a user to log in as a domain administrator to their different domains. Maximum of 1000 links per request.
POST
/
domains
/
batch
/
login-link
Bulk create login links
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({domains: [{domain: '<string>'}]})
};
fetch('https://api.mailchannels.net/inbound/v1/domains/batch/login-link', 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/batch/login-link"
payload = { "domains": [{ "domain": "<string>" }] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mailchannels.net/inbound/v1/domains/batch/login-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domains' => [
[
'domain' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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/batch/login-link \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"domains": [
{
"domain": "<string>"
}
]
}
'{
"successes": [
{
"domain": "<string>",
"code": 200,
"comment": "<string>",
"loginLink": "<string>"
}
],
"errors": [
{
"domain": "<string>",
"code": 200,
"comment": "<string>",
"loginLink": "<string>"
}
]
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}{
"errors": [
"<string>"
],
"code": 123,
"message": "<string>"
}Authorizations
Body
application/json
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
Was this page helpful?
⌘I

