Skip to main content
DELETE
/
api
/
email
/
domains
/
{id}
Delete an email domain
curl --request DELETE \
  --url https://app.puffle.ai/api/email/domains/{id} \
  --header 'Authorization: Bearer <token>'
{ "success": true }

Overview

Deletes the domain from AgentMail (best effort), removes the stored DKIM/SPF/DMARC records from Cloudflare (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. AgentMail + Cloudflare deletes are fire-and-forget; failures are logged but do not block the DB delete. Both are idempotent on retry.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Email domain (email_domains.id) UUID.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

Domain deleted. Dependent email accounts are cascade-removed from the DB. AgentMail/Cloudflare cleanup best-effort.

success
enum<boolean>
required
Available options:
true