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

# Remove a domain.

> Remove a domain.



## OpenAPI

````yaml api-reference/openapi.json post /v1.DomainService/DeleteDomain
openapi: 3.1.0
info:
  title: SimpleEmailAPI
  description: >-
    The SimpleEmailAPI is a type-safe email API for sending transactional emails
    with real-time event streaming. Built on Connect RPC for maximum type safety
    and developer experience.
  contact:
    name: SimpleEmailAPI Support
    url: https://simpleemailapi.dev
    email: support@simpleemailapi.dev
  version: 1.0.0
servers:
  - url: https://api.simpleemailapi.dev
    description: Production
security:
  - BearerAuth: []
tags:
  - name: v1.DomainService
    description: |-
      DomainService handles sending domains.
       To send emails with good deliverability, you need to:
       1. Add a domain (AddDomain)
       2. Configure the DNS records we give you
       3. Verify the layout (VerifyDomain)
  - name: v1.EmailService
    description: >-
      EmailService is the core service for sending emails and listening to
      events.
       It provides a simple, stateless API designed for developer happiness.
paths:
  /v1.DomainService/DeleteDomain:
    post:
      tags:
        - v1.DomainService
      summary: Remove a domain.
      description: Remove a domain.
      operationId: v1.DomainService.DeleteDomain
      parameters:
        - name: Connect-Protocol-Version
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/connect-protocol-version'
        - name: Connect-Timeout-Ms
          in: header
          schema:
            $ref: '#/components/schemas/connect-timeout-header'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1.DeleteDomainRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1.DeleteDomainResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
components:
  schemas:
    connect-protocol-version:
      type: number
      title: Connect-Protocol-Version
      enum:
        - 1
      description: Define the version of the Connect protocol
      const: 1
    connect-timeout-header:
      type: number
      title: Connect-Timeout-Ms
      description: Define the timeout, in ms
    v1.DeleteDomainRequest:
      type: object
      properties:
        id:
          type: string
          title: id
      title: DeleteDomainRequest
      additionalProperties: false
    v1.DeleteDomainResponse:
      type: object
      properties:
        message:
          type: string
          title: message
      title: DeleteDomainResponse
      additionalProperties: false
    connect.error:
      type: object
      properties:
        code:
          type: string
          examples:
            - not_found
          enum:
            - canceled
            - unknown
            - invalid_argument
            - deadline_exceeded
            - not_found
            - already_exists
            - permission_denied
            - resource_exhausted
            - failed_precondition
            - aborted
            - out_of_range
            - unimplemented
            - internal
            - unavailable
            - data_loss
            - unauthenticated
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/connect.error_details.Any'
          description: >-
            A list of messages that carry the error details. There is no limit
            on the number of messages.
      title: Connect Error
      additionalProperties: true
      description: >-
        Error type returned by Connect:
        https://connectrpc.com/docs/go/errors/#http-representation
    connect.error_details.Any:
      type: object
      properties:
        type:
          type: string
          description: >-
            A URL that acts as a globally unique identifier for the type of the
            serialized message. For example:
            `type.googleapis.com/google.rpc.ErrorInfo`. This is used to
            determine the schema of the data in the `value` field and is the
            discriminator for the `debug` field.
        value:
          type: string
          format: binary
          description: >-
            The Protobuf message, serialized as bytes and base64-encoded. The
            specific message type is identified by the `type` field.
        debug:
          oneOf:
            - type: object
              title: Any
              additionalProperties: true
              description: Detailed error information.
          discriminator:
            propertyName: type
          title: Debug
          description: >-
            Deserialized error detail payload. The 'type' field indicates the
            schema. This field is for easier debugging and should not be relied
            upon for application logic.
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message, with an additional debug
        field for ConnectRPC error details.
  securitySchemes:
    BearerAuth:
      type: http
      description: >-
        API key authentication. Get your API key from the SimpleEmailAPI
        dashboard and include it in the Authorization header as: Bearer
        sea_live_xxxxx
      scheme: bearer

````