curl
curl -X POST "https://api.deliveryman.ai/api/v1/domain/setup/" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain_id": 0,
"naming_strategy": "string",
"custom_names": [],
"country": "string"
}'import requests
url = "https://api.deliveryman.ai/api/v1/domain/setup/"
payload = {
"domain_id": 123,
"country": "United States",
"custom_names": ["John Smith", "Priya Sharma"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
domain_id: 123,
country: 'United States',
custom_names: ['John Smith', 'Priya Sharma']
})
};
fetch('https://api.deliveryman.ai/api/v1/domain/setup/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.deliveryman.ai/api/v1/domain/setup/",
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([
'domain_id' => 123,
'country' => 'United States',
'custom_names' => [
'John Smith',
'Priya Sharma'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.deliveryman.ai/api/v1/domain/setup/"
payload := strings.NewReader("{\n \"domain_id\": 123,\n \"country\": \"United States\",\n \"custom_names\": [\n \"John Smith\",\n \"Priya Sharma\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.deliveryman.ai/api/v1/domain/setup/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"domain_id\": 123,\n \"country\": \"United States\",\n \"custom_names\": [\n \"John Smith\",\n \"Priya Sharma\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/domain/setup/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain_id\": 123,\n \"country\": \"United States\",\n \"custom_names\": [\n \"John Smith\",\n \"Priya Sharma\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Domains
Start Domain Setup
Creates the domain’s email accounts using the chosen naming strategy and sets up its mail server. The domain’s nameservers must be verified first (see Check Domain Nameservers), and setup can only be started once per domain.
Setup runs in the background and returns 202 straight away. Poll Retrieve Domain to follow progress: setup_complete becomes true and the status moves to warmup when it’s done.
POST
/
api
/
v1
/
domain
/
setup
/
curl
curl -X POST "https://api.deliveryman.ai/api/v1/domain/setup/" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domain_id": 0,
"naming_strategy": "string",
"custom_names": [],
"country": "string"
}'import requests
url = "https://api.deliveryman.ai/api/v1/domain/setup/"
payload = {
"domain_id": 123,
"country": "United States",
"custom_names": ["John Smith", "Priya Sharma"]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
domain_id: 123,
country: 'United States',
custom_names: ['John Smith', 'Priya Sharma']
})
};
fetch('https://api.deliveryman.ai/api/v1/domain/setup/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.deliveryman.ai/api/v1/domain/setup/",
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([
'domain_id' => 123,
'country' => 'United States',
'custom_names' => [
'John Smith',
'Priya Sharma'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.deliveryman.ai/api/v1/domain/setup/"
payload := strings.NewReader("{\n \"domain_id\": 123,\n \"country\": \"United States\",\n \"custom_names\": [\n \"John Smith\",\n \"Priya Sharma\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.deliveryman.ai/api/v1/domain/setup/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"domain_id\": 123,\n \"country\": \"United States\",\n \"custom_names\": [\n \"John Smith\",\n \"Priya Sharma\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/domain/setup/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain_id\": 123,\n \"country\": \"United States\",\n \"custom_names\": [\n \"John Smith\",\n \"Priya Sharma\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Body
application/json
Required when naming_strategy is custom, and must be omitted otherwise. Up to 5 full names in Firstname Lastname format, using letters only. Every part of a name must be at least 2 characters long, and the first 2 letters of the first and last name must be different.
Required array length:
1 - 5 elementsMinimum string length:
1Example:
["John Smith", "Priya Sharma"]