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

# Remove a custom domain (revert to the shared domain)

> Removes your brand's custom domain of the given kind, reverting to the shared-domain default. The brand is the one your key owns; the brand_id in the path must match your X-Brand-Id.



## OpenAPI

````yaml /openapi/public-openapi.json delete /v1/account/brands/{brand_id}/domains/{kind}
openapi: 3.1.0
info:
  title: Purple API
  version: 0.0.0
servers:
  - url: https://api.dev.purplelabelmd.com
security: []
tags:
  - description: Sign a patient in and out and manage the browser session.
    name: Sessions & authentication
  - description: Run the server-driven intake questionnaire question by question.
    name: Intake
  - description: Address autocomplete for the intake flow.
    name: Addresses
  - description: Read the public status of a patient's enrollment.
    name: Enrollment
  - description: Track a client's onboarding progress.
    name: Onboarding
  - description: Read back the platform configuration stored for your brand.
    name: Brand configuration
  - description: Enable offerings for your brand and set their display copy.
    name: Offering configuration
  - description: Start and track payments for an order.
    name: Payments
  - description: Subscribe to platform events and manage delivery endpoints.
    name: Webhooks
paths:
  /v1/account/brands/{brand_id}/domains/{kind}:
    parameters:
      - $ref: '#/components/parameters/AccountBrandIdPath'
      - $ref: '#/components/parameters/DomainKindPath'
    delete:
      tags:
        - Brand configuration
      summary: Remove a custom domain (revert to the shared domain)
      description: >-
        Removes your brand's custom domain of the given kind, reverting to the
        shared-domain default. The brand is the one your key owns; the brand_id
        in the path must match your X-Brand-Id.
      operationId: removeAccountBrandDomain
      parameters:
        - $ref: '#/components/parameters/BrandIdHeader'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      removed:
                        type: boolean
                    required:
                      - removed
                    type: object
                required:
                  - data
                type: object
          description: whether a row was removed
        '401':
          $ref: '#/components/responses/EdgeUnauthorized'
        '404':
          $ref: '#/components/responses/EdgeNotFound'
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/EdgeProblem'
          description: >-
            the durable domain registry is unavailable (nothing activated;
            retryable)
      security:
        - apiKey: []
components:
  parameters:
    AccountBrandIdPath:
      description: >-
        the brand whose custom domains to view or manage (must match
        X-Brand-Id).
      in: path
      name: brand_id
      required: true
      schema:
        pattern: ^brd_[A-Za-z0-9][A-Za-z0-9_-]*$
        type: string
    DomainKindPath:
      description: >-
        the custom-domain kind — login (the auth domain) or member (the
        member-portal domain).
      in: path
      name: kind
      required: true
      schema:
        enum:
          - login
          - member
        type: string
    BrandIdHeader:
      description: >-
        Opaque brand id (brd_...). Validated to belong to the resolved client
        (§2).
      in: header
      name: X-Brand-Id
      required: true
      schema:
        pattern: ^brd_[A-Za-z0-9][A-Za-z0-9_-]*$
        type: string
  responses:
    EdgeUnauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/EdgeProblem'
      description: >-
        missing, unknown, or revoked API key - one opaque body (no
        enumeration/timing oracle, §1)
    EdgeNotFound:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/EdgeProblem'
      description: >-
        brand not found for this tenant - identical for unknown and foreign
        brands (404, never 403; no cross-tenant existence leak, §2)
  schemas:
    EdgeProblem:
      description: RFC 7807 problem+json error body.
      properties:
        detail:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          format: uri-reference
          type: string
      required:
        - type
        - title
        - status
      type: object
  securitySchemes:
    apiKey:
      description: 'Per-client API key (M2M). Presented as `Authorization: Bearer <key>`.'
      scheme: bearer
      type: http

````