Domains

Delete domains

Deletes one or more domains for the authenticated client.

Deletion Rules

  • Only pending domains can be deleted
  • Domains in other statuses (active, in progress, inactive, etc.) are skipped
  • Skipped domains are returned in the response with a reason

Mailbox Handling

  • All pending mailboxes under the domain are automatically inactivated before domain deletion
  • Domains with active mailboxes (ACTIVE, IN_PROGRESS, etc.) cannot be deleted and are skipped
  • Only domains where all mailboxes are PENDING or INACTIVE can be deleted
  • When a domain is deleted, all its mailboxes are effectively removed (inactivated)

Identifiers

You can specify domains to delete using:

  • ids: Array of domain IDs
  • domains: Array of domain names
  • Or both (they will be combined)

Slot Management

  • Domain slots are automatically freed after successful deletion
  • Mailbox slots are automatically freed based on the number of mailboxes that were inactivated
delete/api/v1/domains

Request

  • Base URL: https://api.aerosend.io
  • URL: https://api.aerosend.io/api/v1/domains
  • Auth: API key in header X-API-Key

Request body

idsinteger[]

List of domain IDs to delete

domainsstring[]

List of domain names to delete

Example request

{
  "ids": [
    123,
    456
  ],
  "domains": [
    "example.com",
    "test.com"
  ]
}

Response

Domains deleted successfully

successboolean

Success flag

timestampstring

Response timestamp

Example response

{
  "success": true,
  "data": {
    "deleted_count": 2,
    "skipped_domains": [
      {
        "identifier": "example.com",
        "reason": "Domain is not in pending status"
      }
    ]
  },
  "timestamp": "2025-12-14T10:30:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.