import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.remove(
'd91cd9bd-1176-453e-8fc1-35364d380206',
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->domains->remove('d91cd9bd-1176-453e-8fc1-35364d380206');
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Domains.remove(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
Resend.api_key = ENV["RESEND_API_KEY"]
Resend::Domains.remove("d91cd9bd-1176-453e-8fc1-35364d380206")
package main
import "github.com/resend/resend-go/v3"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Domains.Remove("d91cd9bd-1176-453e-8fc1-35364d380206")
}
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _deleted = resend
.domains
.delete("d91cd9bd-1176-453e-8fc1-35364d380206")
.await?;
Ok(())
}
import com.resend.*;
public class Main {
public static void main(String[] args) {
Resend resend = new Resend("re_xxxxxxxxx");
RemoveDomainResponse removed = resend.domains().remove("d91cd9bd-1176-453e-8fc1-35364d380206");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.DomainDeleteAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ) );
curl -X DELETE 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206' \
-H 'Authorization: Bearer re_xxxxxxxxx'
resend domains delete d91cd9bd-1176-453e-8fc1-35364d380206
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206",
"deleted": true
}
Delete Domain
Remove an existing domain.
DELETE
/
domains
/
:domain_id
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.remove(
'd91cd9bd-1176-453e-8fc1-35364d380206',
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->domains->remove('d91cd9bd-1176-453e-8fc1-35364d380206');
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Domains.remove(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
Resend.api_key = ENV["RESEND_API_KEY"]
Resend::Domains.remove("d91cd9bd-1176-453e-8fc1-35364d380206")
package main
import "github.com/resend/resend-go/v3"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Domains.Remove("d91cd9bd-1176-453e-8fc1-35364d380206")
}
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _deleted = resend
.domains
.delete("d91cd9bd-1176-453e-8fc1-35364d380206")
.await?;
Ok(())
}
import com.resend.*;
public class Main {
public static void main(String[] args) {
Resend resend = new Resend("re_xxxxxxxxx");
RemoveDomainResponse removed = resend.domains().remove("d91cd9bd-1176-453e-8fc1-35364d380206");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.DomainDeleteAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ) );
curl -X DELETE 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206' \
-H 'Authorization: Bearer re_xxxxxxxxx'
resend domains delete d91cd9bd-1176-453e-8fc1-35364d380206
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206",
"deleted": true
}
Removing a domain with a configured custom tracking subdomain
will also remove the Resend provisioned proxy, breaking any existing email links that use that subdomain.To keep links working, set up your own proxy pointing to Resend’s tracking DNS records before removing the domain.
Path Parameters
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.remove(
'd91cd9bd-1176-453e-8fc1-35364d380206',
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->domains->remove('d91cd9bd-1176-453e-8fc1-35364d380206');
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Domains.remove(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
Resend.api_key = ENV["RESEND_API_KEY"]
Resend::Domains.remove("d91cd9bd-1176-453e-8fc1-35364d380206")
package main
import "github.com/resend/resend-go/v3"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Domains.Remove("d91cd9bd-1176-453e-8fc1-35364d380206")
}
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _deleted = resend
.domains
.delete("d91cd9bd-1176-453e-8fc1-35364d380206")
.await?;
Ok(())
}
import com.resend.*;
public class Main {
public static void main(String[] args) {
Resend resend = new Resend("re_xxxxxxxxx");
RemoveDomainResponse removed = resend.domains().remove("d91cd9bd-1176-453e-8fc1-35364d380206");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.DomainDeleteAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ) );
curl -X DELETE 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206' \
-H 'Authorization: Bearer re_xxxxxxxxx'
resend domains delete d91cd9bd-1176-453e-8fc1-35364d380206
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206",
"deleted": true
}
Was this page helpful?
⌘I