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

# Delete a domain

> Delete a domain from your account. The domain must not have any active senders. All associated DNS records and provider configurations will be cleaned up.



## OpenAPI

````yaml DELETE /domains/{id}
openapi: 3.1.0
info:
  title: SendKit API
  description: The SendKit API allows you to send transactional emails programmatically.
  version: 1.0.0
servers:
  - url: https://api.sendkit.dev
security:
  - bearerAuth: []
paths:
  /domains/{id}:
    delete:
      tags:
        - Domains
      summary: Delete a domain
      description: >-
        Delete a domain from your account. The domain must not have any active
        senders. All associated DNS records and provider configurations will be
        cleaned up.
      operationId: deleteDomain
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The domain ID.
      responses:
        '204':
          description: Domain deleted successfully
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: Domain has active senders and cannot be deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: >-
                  This domain has senders and cannot be deleted. Remove all
                  senders first.
components:
  responses:
    Unauthorized:
      description: Unauthorized — missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Invalid API key.
    NotFound:
      description: The requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Not found.
  schemas:
    ErrorResponse:
      type: object
      properties:
        name:
          type: string
          description: Error type identifier.
          example: validation_error
        message:
          type: string
          description: Human-readable error message.
          example: The from address domain is not verified.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from your SendKit dashboard. Pass it as a Bearer token in the
        Authorization header.

````