Delete Sending Domain
curl --request DELETE \
--url https://app.pixie.ai/api/email/domains/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pixie.ai/api/email/domains/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pixie.ai/api/email/domains/{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://app.pixie.ai/api/email/domains/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.pixie.ai/api/email/domains/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.pixie.ai/api/email/domains/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pixie.ai/api/email/domains/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Sending Domains
Delete Sending Domain
Tear down a sending domain across backing services and the database. Cascade-deletes every inbox on the domain.
DELETE
/
api
/
email
/
domains
/
{id}
Delete Sending Domain
curl --request DELETE \
--url https://app.pixie.ai/api/email/domains/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.pixie.ai/api/email/domains/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.pixie.ai/api/email/domains/{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://app.pixie.ai/api/email/domains/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.pixie.ai/api/email/domains/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.pixie.ai/api/email/domains/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pixie.ai/api/email/domains/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}CLI:
pixie email domain delete --id <id>
Overview
Deletes the backing domain resource (best effort), removes the stored DKIM/SPF/DMARC records from managed DNS when available (best effort), and removes the DB row. This cascade-deletes every email sender account backed by the domain.This operation shares the URL path
/api/email/domains/{id} with the update verb. See Update a sending domain to override the cached status without tearing the domain down.AI agent notes
Cascade delete is real. Deleting a domain removes every
accounts row whose domain_id points at it. Agents should enumerate dependent inboxes (via listEmailAccounts) and confirm with the human before calling.External cleanup is best-effort. Backing-domain and managed-DNS deletes are fire-and-forget; failures are logged but do not block the DB delete. Both are idempotent on retry.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Email domain (email_domains.id) UUID.
Minimum string length:
1Response
Domain deleted. Dependent email accounts are cascade-removed from the DB. External cleanup is best-effort.
Available options:
true Was this page helpful?