curl --request PATCH \
--url https://api.aisa.one/apis/v1/agentmail/domains/{domain_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedback_enabled": true,
"inbound_enabled": true,
"subdomains_enabled": true,
"tracking_enabled": true
}
'import requests
url = "https://api.aisa.one/apis/v1/agentmail/domains/{domain_id}"
payload = {
"feedback_enabled": True,
"inbound_enabled": True,
"subdomains_enabled": True,
"tracking_enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
feedback_enabled: true,
inbound_enabled: true,
subdomains_enabled: true,
tracking_enabled: true
})
};
fetch('https://api.aisa.one/apis/v1/agentmail/domains/{domain_id}', 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.aisa.one/apis/v1/agentmail/domains/{domain_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'feedback_enabled' => true,
'inbound_enabled' => true,
'subdomains_enabled' => true,
'tracking_enabled' => true
]),
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://api.aisa.one/apis/v1/agentmail/domains/{domain_id}"
payload := strings.NewReader("{\n \"feedback_enabled\": true,\n \"inbound_enabled\": true,\n \"subdomains_enabled\": true,\n \"tracking_enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.aisa.one/apis/v1/agentmail/domains/{domain_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"feedback_enabled\": true,\n \"inbound_enabled\": true,\n \"subdomains_enabled\": true,\n \"tracking_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/agentmail/domains/{domain_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feedback_enabled\": true,\n \"inbound_enabled\": true,\n \"subdomains_enabled\": true,\n \"tracking_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"domain": "<string>",
"domain_id": "<string>",
"feedback_enabled": true,
"records": [
{
"name": "<string>",
"status": "MISSING",
"type": "TXT",
"value": "<string>",
"priority": 123,
"reason": "<string>"
}
],
"status": "NOT_STARTED",
"subdomains_enabled": true,
"tracking_enabled": true,
"updated_at": "2023-11-07T05:31:56Z",
"client_id": "<string>",
"inbound_enabled": true,
"pod_id": "<string>",
"reason": "<string>"
}Manage Domain
CLI:
agentmail domains update --domain-id <domain_id>
Retrieve, update, or delete a domain by its ID, including details such as verification status, DNS records, and notification settings.
curl --request PATCH \
--url https://api.aisa.one/apis/v1/agentmail/domains/{domain_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedback_enabled": true,
"inbound_enabled": true,
"subdomains_enabled": true,
"tracking_enabled": true
}
'import requests
url = "https://api.aisa.one/apis/v1/agentmail/domains/{domain_id}"
payload = {
"feedback_enabled": True,
"inbound_enabled": True,
"subdomains_enabled": True,
"tracking_enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
feedback_enabled: true,
inbound_enabled: true,
subdomains_enabled: true,
tracking_enabled: true
})
};
fetch('https://api.aisa.one/apis/v1/agentmail/domains/{domain_id}', 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.aisa.one/apis/v1/agentmail/domains/{domain_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'feedback_enabled' => true,
'inbound_enabled' => true,
'subdomains_enabled' => true,
'tracking_enabled' => true
]),
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://api.aisa.one/apis/v1/agentmail/domains/{domain_id}"
payload := strings.NewReader("{\n \"feedback_enabled\": true,\n \"inbound_enabled\": true,\n \"subdomains_enabled\": true,\n \"tracking_enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.aisa.one/apis/v1/agentmail/domains/{domain_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"feedback_enabled\": true,\n \"inbound_enabled\": true,\n \"subdomains_enabled\": true,\n \"tracking_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/agentmail/domains/{domain_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"feedback_enabled\": true,\n \"inbound_enabled\": true,\n \"subdomains_enabled\": true,\n \"tracking_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"domain": "<string>",
"domain_id": "<string>",
"feedback_enabled": true,
"records": [
{
"name": "<string>",
"status": "MISSING",
"type": "TXT",
"value": "<string>",
"priority": 123,
"reason": "<string>"
}
],
"status": "NOT_STARTED",
"subdomains_enabled": true,
"tracking_enabled": true,
"updated_at": "2023-11-07T05:31:56Z",
"client_id": "<string>",
"inbound_enabled": true,
"pod_id": "<string>",
"reason": "<string>"
}Request contract
- Method and path: PATCH /apis/v1/agentmail/domains/{domain_id}
- Availability: disabled
- Request URL template:
https://api.aisa.one/apis/v1/agentmail/domains/{domain_id} - domain_id: path; required
{
"operationId": "patch_any_agentmail_apis_v1_agentmail_domains_domain_id",
"method": "PATCH",
"path": "/apis/v1/agentmail/domains/{domain_id}",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"in": "path",
"name": "domain_id",
"required": true,
"schema": {
"description": "The ID of the domain.",
"title": "DomainId",
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"description": "Provide at least one of `feedback_enabled`, `inbound_enabled`,\n`subdomains_enabled`, or `tracking_enabled`. Omitted fields are left\nunchanged; an empty body is rejected. Enabling `inbound_enabled` or\n`subdomains_enabled` on a verified domain returns it to `PENDING` until the\nnewly required MX record (the apex MX, or the wildcard `*.<domain>`) is\npublished and verified.",
"properties": {
"feedback_enabled": {
"description": "Bounce and complaint notifications are sent to your inboxes.",
"title": "FeedbackEnabled",
"type": "boolean"
},
"inbound_enabled": {
"description": "Receive email for this domain. Defaults to `true`. Set `false` for a send-only\ndomain: the apex MX record is not required and is omitted from `records`, so the\ndomain's existing email provider keeps receiving its mail. Inboxes on a send-only\ndomain can still send.",
"title": "InboundEnabled",
"type": "boolean"
},
"subdomains_enabled": {
"description": "Allow inboxes on any subdomain of this domain. Adds a required wildcard MX\nrecord (`*.<domain>`) to `records`.",
"title": "SubdomainsEnabled",
"type": "boolean"
},
"tracking_enabled": {
"description": "Serve open tracking pixels from this domain. Adds a required `link.<domain>`\nCNAME record to `records`, which must be published and verified before\n`track_opens` can be used on a send.",
"title": "TrackingEnabled",
"type": "boolean"
}
},
"title": "UpdateDomainRequest",
"type": "object"
}
}
}
},
"x-aisa-status": "disabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Historical archive: disabled, cannot be called, and no price is published.Authorizations
Body
Provide at least one of feedback_enabled, inbound_enabled,
subdomains_enabled, or tracking_enabled. Omitted fields are left
unchanged; an empty body is rejected. Enabling inbound_enabled or
subdomains_enabled on a verified domain returns it to PENDING until the
newly required MX record (the apex MX, or the wildcard *.<domain>) is
published and verified.
Response
Response with status 200
Why the domain is not (yet) VERIFIED, when known. dns_records_missing / dns_records_invalid point at the DNS records. The ses_* values mean the records look right and sending-infrastructure validation has not converged: ses_dkim_pending / ses_mail_from_pending (still checking), ses_dkim_temporary_failure / ses_mail_from_temporary_failure (a transient error the infrastructure keeps retrying on its own — usually resolves without changes), ses_dkim_failed / ses_mail_from_failed (a terminal verdict; re-verify after fixing), ses_dkim_not_started / ses_mail_from_not_started (the attribute was never configured on the identity — re-verify to push it), and ses_not_verified_for_sending. Absent when VERIFIED.