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."
}
}
Domains
Delete Domain
Remove a custom domain from your account
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
Deleting a domain will affect all links using that domain. Links will be automatically reassigned to your default domain (bouncy.ai).
Response
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."
}
}