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

> Delete a custom domain from your organization. Use when managing email-channel provisioning — domain verification, unsubscribe handling, outbound email injection.

# Delete a custom domain



## OpenAPI

````yaml delete /email/domains/{domainName}
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /email/domains/{domainName}:
    delete:
      summary: Delete a custom domain
      description: >

        Delete a custom domain from your organization. This will prevent you
        from sending emails from this domain.
      operationId: deleteCustomDomain
      parameters:
        - schema:
            type: string
          in: path
          name: domainName
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomainMutationOutputDto'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomainErrorDto'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomainErrorDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomainErrorDto'
components:
  schemas:
    CustomDomainMutationOutputDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/CustomDomainMutationOutputDto'
      type: object
      properties:
        success:
          type: boolean
          const: true
      required:
        - success
      additionalProperties: false
    CustomDomainErrorDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/CustomDomainErrorDto'
      type: object
      properties:
        statusCode:
          anyOf:
            - type: number
              const: 400
            - type: number
              const: 404
            - type: number
              const: 503
        message:
          type: string
        error:
          type: string
          enum:
            - domain_registered_elsewhere
            - domain_create_failed
            - domain_not_found
            - domain_verify_failed
            - domain_delete_failed
            - domain_provider_unavailable
      required:
        - statusCode
        - message
        - error
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````