> ## Documentation Index
> Fetch the complete documentation index at: https://docs.puffle.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Sending Domain

> Tear down a sending domain across backing services and the database. Cascade-deletes every inbox on the domain.

**CLI:**

```bash theme={null}
puffle 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.**

<Note>
  This operation shares the URL path `/api/email/domains/{id}` with the update verb. See [Update a sending domain](/api-reference/senders/update-email-domain) to override the cached status without tearing the domain down.
</Note>

## AI agent notes

<Note>
  **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.
</Note>


## OpenAPI

````yaml delete /api/email/domains/{id}
openapi: 3.0.3
info:
  title: Puffle API
  version: 1.0.0
  description: >-
    HTTP API for the Puffle GTM platform - Feed and Lead Finder search
    preparation, campaign-backed Outbound execution, Puffle Agent runs, sender
    management, and Unibox reply workflows. Designed for operation by both
    humans and autonomous AI agents. Agents should start at the [Agent
    Playbook](/guides/agent-playbook) which prescribes a workspace-context check
    (`GET /api/context`) and core user journeys with exact call ordering.
  contact:
    name: Puffle Support
    url: https://puffle.ai
servers:
  - url: https://app.puffle.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Campaigns
    description: >-
      Campaign-backed Outbound execution. These endpoints manage draft,
      launching, active, paused, and completed Outbound runs with sequence
      nodes, contacts, and sender accounts.
  - name: Accounts
    description: Signed-in user account, settings, and workspace context endpoints.
  - name: Billing
    description: Billing customer portal and account billing endpoints.
  - name: Senders
    description: >-
      Connected sender accounts, email inboxes, sending domains, DNS
      verification, warmup, and sender capacity.
  - name: Socials
    description: >-
      Read connected LinkedIn and X accounts, review current and archived posts,
      and reconcile publication status. Creating, editing, scheduling,
      publishing, OAuth connection, analytics, and mentions remain
      dashboard-managed workflows and are not part of the public Bearer-token
      API.
paths:
  /api/email/domains/{id}:
    delete:
      tags:
        - Senders
      summary: Delete Sending Domain
      description: >-
        Tear down a custom sending domain. Deletes the backing domain resource
        (best effort), removes stored DKIM/SPF/DMARC records from managed DNS
        when available (best effort, only rows matching the stored
        `dns_records`), and removes the DB row. **Cascade-deletes all `accounts`
        rows backed by this domain.** External cleanup calls are best-effort;
        only a failure on the final DB delete returns 500. Irreversible.
      operationId: deleteEmailDomain
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            description: Email domain (`email_domains.id`) UUID.
      responses:
        '200':
          description: >-
            Domain deleted. Dependent email accounts are cascade-removed from
            the DB. External cleanup is best-effort.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                required:
                  - success
                additionalProperties: false
        '401':
          description: Missing or invalid Bearer token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Domain doesn't exist or isn't owned by the caller.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: >-
            DB delete failed. External resources may have already been cleaned
            up; retry is safe because cleanup steps are idempotent.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pk_live_...

````