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

# Delete Domain

> Remove a custom domain from your account

## Request

### Headers

### Path Parameters

<ParamField path="domain" type="string" required>
  The domain name to delete

  **Example:** `go.example.com`
</ParamField>

<Warning>
  Deleting a domain will affect all links using that domain. Links will be automatically reassigned to your default domain (bouncy.ai).
</Warning>

## Response

<ResponseField name="domain" type="string">
  The deleted domain name
</ResponseField>

<ResponseField name="message" type="string">
  Success message
</ResponseField>

<ResponseField name="linksReassigned" type="number">
  Number of links reassigned to default domain
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.bouncy.ai/v1/domains/go.example.com \
    -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.bouncy.ai/v1/domains/go.example.com',
    {
      method: 'DELETE',
      headers: {
        'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY'
      }
    }
  );

  const result = await response.json();
  console.log(result.message);
  console.log(`${result.linksReassigned} links reassigned to default domain`);
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      'https://api.bouncy.ai/v1/domains/go.example.com',
      headers={'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY'}
  )

  result = response.json()
  print(result['message'])
  print(f"{result['linksReassigned']} links reassigned to default domain")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "domain": "go.example.com",
    "message": "Domain deleted successfully",
    "linksReassigned": 12
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": {
      "code": "domain_not_found",
      "message": "Domain not found in your account"
    }
  }
  ```

  ```json 403 Forbidden theme={null}
  {
    "error": {
      "code": "cannot_delete_default_domain",
      "message": "Cannot delete your default domain. Set another domain as default first."
    }
  }
  ```
</ResponseExample>
