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

# Delete domain

> **Endpoint:** `v1/domains/{id}`

Delete a specific domain. This action cannot be undone.




## OpenAPI

````yaml api-reference/openapi.yml delete /domains/{id}
openapi: 3.1.0
info:
  title: Send Email API
  description: >
    Send transactional emails through MailDiver.


    ### Base URL

    All API endpoints are prefixed with `api.` subdomain:

    ```

    https://api.maildiver.com

    ```


    For the self-hosted version, if your domain is `example.com`:

    ```

    https://api.example.com

    ```


    ### Endpoint

    ```

    v1/emails

    ```


    ### Authentication

    All API requests require authentication using your API key in the
    Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.maildiver.com/v1
    description: Production server
    variables:
      domain:
        default: yourdomain.com
        description: Your domain (without the api. prefix)
security:
  - bearerAuth: []
paths:
  /domains/{id}:
    delete:
      tags:
        - Domain
      summary: Delete domain
      description: |
        **Endpoint:** `v1/domains/{id}`

        Delete a specific domain. This action cannot be undone.
      operationId: deleteDomain
      parameters:
        - name: id
          in: path
          required: true
          description: Unique identifier of the domain
          schema:
            type: string
          example: 0195a927-b706-725a-94dd-372770d920f2
      responses:
        '204':
          description: Domain successfully deleted
          content:
            application/json:
              examples:
                success:
                  summary: Success response
                  value: {}
        '403':
          description: Forbidden (API key is missing or invalid)
          content:
            application/json:
              examples:
                invalidKey:
                  summary: Invalid API key error
                  value:
                    message: Invalid API key
                    code: invalid_api_key
                invalidHeader:
                  summary: Invalid authorization header error
                  value:
                    message: Invalid authorization header
                    code: invalid_authorization_header
        '404':
          description: Domain not found
          content:
            application/json:
              examples:
                notFound:
                  summary: Domain not found error
                  value:
                    message: Domain not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with format "Bearer {your-api-key}"

````