Skip to main content
DELETE
/
v1
/
domains
/
{domain}
curl -X DELETE https://api.bouncy.ai/v1/domains/go.example.com \
  -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY"
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`);
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")
{
  "domain": "go.example.com",
  "message": "Domain deleted successfully",
  "linksReassigned": 12
}
{
  "error": {
    "code": "domain_not_found",
    "message": "Domain not found in your account"
  }
}
{
  "error": {
    "code": "cannot_delete_default_domain",
    "message": "Cannot delete your default domain. Set another domain as default first."
  }
}

Request

Headers

Path Parameters

domain
string
required
The domain name to deleteExample: go.example.com
Deleting a domain will affect all links using that domain. Links will be automatically reassigned to your default domain (bouncy.ai).

Response

domain
string
The deleted domain name
message
string
Success message
Number of links reassigned to default domain
curl -X DELETE https://api.bouncy.ai/v1/domains/go.example.com \
  -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY"
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`);
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")
{
  "domain": "go.example.com",
  "message": "Domain deleted successfully",
  "linksReassigned": 12
}
{
  "error": {
    "code": "domain_not_found",
    "message": "Domain not found in your account"
  }
}
{
  "error": {
    "code": "cannot_delete_default_domain",
    "message": "Cannot delete your default domain. Set another domain as default first."
  }
}