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

# Delete domain

> **Remove a domain from your workspace**

Delete a domain and all associated resources. This is a destructive operation.

## Important Notes

- Campaigns linked to this domain are archived automatically during deletion
- All inboxes associated with the domain will be deleted
- All external resources (DNS, email services) will be cleaned up
- This action cannot be undone

## Deletion Modes

- `archive` (default): Campaigns become archived (view-only, permanent)
- `pause_and_detach`: Campaigns are paused so they can be resumed later
  with inboxes from a different domain

## Example Usage

```python
import requests

domain_id = "550e8400-e29b-41d4-a716-446655440000"

response = requests.delete(
    f"https://api.coldsend.io/api/public/v1/domains/{domain_id}",
    headers={"X-API-Key": "your-api-key"},
    params={"deletion_mode": "pause_and_detach"}
)
```



## OpenAPI

````yaml /public_openapi.json delete /api/public/v1/domains/{domain_id}
openapi: 3.0.3
info:
  title: ColdSend Public API
  description: >-
    Programmatic access to ColdSend for managing cold email campaigns and sender
    accounts.
  version: 1.0.0
  contact:
    name: ColdSend Support
    email: support@coldsend.pro
    url: https://coldsend.pro
servers:
  - url: https://api.coldsend.pro
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/public/v1/domains/{domain_id}:
    delete:
      tags:
        - Domains
      summary: Delete domain
      description: >-
        **Remove a domain from your workspace**


        Delete a domain and all associated resources. This is a destructive
        operation.


        ## Important Notes


        - Campaigns linked to this domain are archived automatically during
        deletion

        - All inboxes associated with the domain will be deleted

        - All external resources (DNS, email services) will be cleaned up

        - This action cannot be undone


        ## Deletion Modes


        - `archive` (default): Campaigns become archived (view-only, permanent)

        - `pause_and_detach`: Campaigns are paused so they can be resumed later
          with inboxes from a different domain

        ## Example Usage


        ```python

        import requests


        domain_id = "550e8400-e29b-41d4-a716-446655440000"


        response = requests.delete(
            f"https://api.coldsend.io/api/public/v1/domains/{domain_id}",
            headers={"X-API-Key": "your-api-key"},
            params={"deletion_mode": "pause_and_detach"}
        )

        ```
      operationId: delete_domain_api_public_v1_domains__domain_id__delete
      parameters:
        - name: domain_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Domain Id
        - name: deletion_mode
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/DomainDeletionMode'
            description: >-
              How to handle campaigns: 'archive' (view-only) or
              'pause_and_detach' (resumable)
            default: archive
          description: >-
            How to handle campaigns: 'archive' (view-only) or 'pause_and_detach'
            (resumable)
      responses:
        '200':
          description: Domain deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicDomainDeleteResponse'
        '400':
          description: Cannot delete domain (in use)
        '401':
          description: Missing or invalid API key
        '403':
          description: Insufficient permissions - requires 'domains:delete' scope
        '404':
          description: Domain not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DomainDeletionMode:
      type: string
      enum:
        - archive
        - pause_and_detach
      title: DomainDeletionMode
      description: How to handle campaigns when deleting a domain.
    PublicDomainDeleteResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
        domain_id:
          type: string
          format: uuid
          title: Domain Id
          description: Deleted domain ID
        domain_name:
          type: string
          title: Domain Name
          description: Deleted domain name
        deleted:
          type: boolean
          title: Deleted
          description: Whether the domain was successfully deleted
      type: object
      required:
        - success
        - message
        - domain_id
        - domain_name
        - deleted
      title: PublicDomainDeleteResponse
      description: Simple domain deletion response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with format cs_live_xxx

````