Create an email address
curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/email/addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "support",
"address": "support@yourcompany.com",
"agent_uuid": "<string>",
"from_name": "Acme Support"
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/email/addresses"
payload = {
"slug": "support",
"address": "support@yourcompany.com",
"agent_uuid": "<string>",
"from_name": "Acme Support"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: 'support',
address: 'support@yourcompany.com',
agent_uuid: '<string>',
from_name: 'Acme Support'
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/email/addresses', 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://{subdomain}.mihu.ai/api/v1/email/addresses",
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([
'slug' => 'support',
'address' => 'support@yourcompany.com',
'agent_uuid' => '<string>',
'from_name' => 'Acme Support'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{subdomain}.mihu.ai/api/v1/email/addresses"
payload := strings.NewReader("{\n \"slug\": \"support\",\n \"address\": \"support@yourcompany.com\",\n \"agent_uuid\": \"<string>\",\n \"from_name\": \"Acme Support\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{subdomain}.mihu.ai/api/v1/email/addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"support\",\n \"address\": \"support@yourcompany.com\",\n \"agent_uuid\": \"<string>\",\n \"from_name\": \"Acme Support\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/email/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"slug\": \"support\",\n \"address\": \"support@yourcompany.com\",\n \"agent_uuid\": \"<string>\",\n \"from_name\": \"Acme Support\"\n}"
response = http.request(request)
puts response.read_bodyEmail Addresses
Create an email address
type=subdomain creates an instant address on the shared sending domain (requires slug). type=custom_domain or custom_email connects your own address (requires address); custom_domain returns DNS records to add, custom_email sends a verification link. Limits: each agent may have only one email address, and the number of connected addresses is capped per plan (Freemium 0, Starter 1, Growth 3, Pro 5, Premium 10, Enterprise 20) — exceeding either returns 422.
POST
/
api
/
v1
/
email
/
addresses
Create an email address
curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/email/addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slug": "support",
"address": "support@yourcompany.com",
"agent_uuid": "<string>",
"from_name": "Acme Support"
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/email/addresses"
payload = {
"slug": "support",
"address": "support@yourcompany.com",
"agent_uuid": "<string>",
"from_name": "Acme Support"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
slug: 'support',
address: 'support@yourcompany.com',
agent_uuid: '<string>',
from_name: 'Acme Support'
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/email/addresses', 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://{subdomain}.mihu.ai/api/v1/email/addresses",
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([
'slug' => 'support',
'address' => 'support@yourcompany.com',
'agent_uuid' => '<string>',
'from_name' => 'Acme Support'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{subdomain}.mihu.ai/api/v1/email/addresses"
payload := strings.NewReader("{\n \"slug\": \"support\",\n \"address\": \"support@yourcompany.com\",\n \"agent_uuid\": \"<string>\",\n \"from_name\": \"Acme Support\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{subdomain}.mihu.ai/api/v1/email/addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slug\": \"support\",\n \"address\": \"support@yourcompany.com\",\n \"agent_uuid\": \"<string>\",\n \"from_name\": \"Acme Support\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/email/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"slug\": \"support\",\n \"address\": \"support@yourcompany.com\",\n \"agent_uuid\": \"<string>\",\n \"from_name\": \"Acme Support\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Body
application/json
Available options:
subdomain, custom_domain, custom_email Required for subdomain
Example:
"support"
Required for custom_domain/custom_email
Example:
"support@yourcompany.com"
Agent to handle this address (optional)
Example:
"Acme Support"
Response
Created
⌘I