Verify Domain
Verify an existing domain.
POST
/
domains
/
:domain_id
/
verify
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.verify(
'd91cd9bd-1176-453e-8fc1-35364d380206',
// Optional: verify only the Forge record
// { scope: ['forge'] },
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->domains->verify('d91cd9bd-1176-453e-8fc1-35364d380206');
// Optional: verify only the Forge record
// $resend->domains->verify('d91cd9bd-1176-453e-8fc1-35364d380206', ['scope' => ['forge']]);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Domains.verify(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
# Optional: verify only the Forge record
# resend.Domains.verify(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206", params={"scope": ["forge"]})
require "resend"
Resend.api_key = "re_xxxxxxxxx"
Resend::Domains.verify("d91cd9bd-1176-453e-8fc1-35364d380206")
# Optional: verify only the Forge record
# Resend::Domains.verify("d91cd9bd-1176-453e-8fc1-35364d380206", scope: ["forge"])
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Domains.Verify("d91cd9bd-1176-453e-8fc1-35364d380206")
// Optional: verify only the Forge record (also import "context")
// client.Domains.VerifyWithOptions(context.Background(), "d91cd9bd-1176-453e-8fc1-35364d380206", &resend.VerifyDomainOptions{Scope: []resend.VerifyDomainScope{"forge"}})
}
use resend_rs::{
types::{VerifyDomainOptions, VerifyDomainScope},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let options = VerifyDomainOptions::new();
// Optional: verify only the Forge record
// let options = VerifyDomainOptions::new().with_scope([VerifyDomainScope::Forge]);
resend
.domains
.verify("d91cd9bd-1176-453e-8fc1-35364d380206", options)
.await?;
Ok(())
}
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.domains.model.VerifyDomainOptions;
import com.resend.services.domains.model.VerifyDomainResponse;
import com.resend.services.domains.model.VerifyDomainScope;
import java.util.List;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
VerifyDomainResponse verified = resend.domains().verify("d91cd9bd-1176-453e-8fc1-35364d380206");
// Optional: verify only the Forge record
// resend.domains().verify("d91cd9bd-1176-453e-8fc1-35364d380206", VerifyDomainOptions.builder().scope(List.of(VerifyDomainScope.FORGE)).build());
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.DomainVerifyAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ) );
// Optional: verify only the Forge record
// await resend.DomainVerifyAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ), new[] { DomainVerificationScope.Forge } );
curl -X POST 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206/verify' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json'
resend domains verify d91cd9bd-1176-453e-8fc1-35364d380206
# Optional: verify only the Forge record
# resend domains verify d91cd9bd-1176-453e-8fc1-35364d380206 --scope forge
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206"
}
Calling this API endpoint triggers an asynchronous domain verification
process. Records that are already verified stay
verified while the
verification is in progress, so sending and receiving aren’t interrupted.
Records that aren’t verified are marked as pending. If a verified record is
no longer found, it’s marked as failed once the verification times out.
Since this request initiates the complete domain verification cycle, it will
trigger domain.updated webhook events as the domain status changes during
the verification process.Claimed a domain? A domain claim transfers the
domain into your account as a brand-new domain with its own DKIM keys, so the
previous account’s DNS records can’t be reused. After the claim is
completed, fetch the domain with Retrieve
Domain, update your DNS with the new DKIM
record(s) it returns, then call this endpoint to verify it before sending or
receiving email. See DKIM
records for details.Path Parameters
Body Parameters
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.verify(
'd91cd9bd-1176-453e-8fc1-35364d380206',
// Optional: verify only the Forge record
// { scope: ['forge'] },
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->domains->verify('d91cd9bd-1176-453e-8fc1-35364d380206');
// Optional: verify only the Forge record
// $resend->domains->verify('d91cd9bd-1176-453e-8fc1-35364d380206', ['scope' => ['forge']]);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Domains.verify(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
# Optional: verify only the Forge record
# resend.Domains.verify(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206", params={"scope": ["forge"]})
require "resend"
Resend.api_key = "re_xxxxxxxxx"
Resend::Domains.verify("d91cd9bd-1176-453e-8fc1-35364d380206")
# Optional: verify only the Forge record
# Resend::Domains.verify("d91cd9bd-1176-453e-8fc1-35364d380206", scope: ["forge"])
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Domains.Verify("d91cd9bd-1176-453e-8fc1-35364d380206")
// Optional: verify only the Forge record (also import "context")
// client.Domains.VerifyWithOptions(context.Background(), "d91cd9bd-1176-453e-8fc1-35364d380206", &resend.VerifyDomainOptions{Scope: []resend.VerifyDomainScope{"forge"}})
}
use resend_rs::{
types::{VerifyDomainOptions, VerifyDomainScope},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let options = VerifyDomainOptions::new();
// Optional: verify only the Forge record
// let options = VerifyDomainOptions::new().with_scope([VerifyDomainScope::Forge]);
resend
.domains
.verify("d91cd9bd-1176-453e-8fc1-35364d380206", options)
.await?;
Ok(())
}
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.domains.model.VerifyDomainOptions;
import com.resend.services.domains.model.VerifyDomainResponse;
import com.resend.services.domains.model.VerifyDomainScope;
import java.util.List;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
VerifyDomainResponse verified = resend.domains().verify("d91cd9bd-1176-453e-8fc1-35364d380206");
// Optional: verify only the Forge record
// resend.domains().verify("d91cd9bd-1176-453e-8fc1-35364d380206", VerifyDomainOptions.builder().scope(List.of(VerifyDomainScope.FORGE)).build());
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.DomainVerifyAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ) );
// Optional: verify only the Forge record
// await resend.DomainVerifyAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ), new[] { DomainVerificationScope.Forge } );
curl -X POST 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206/verify' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json'
resend domains verify d91cd9bd-1176-453e-8fc1-35364d380206
# Optional: verify only the Forge record
# resend domains verify d91cd9bd-1176-453e-8fc1-35364d380206 --scope forge
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206"
}
Was this page helpful?
⌘I
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.domains.verify(
'd91cd9bd-1176-453e-8fc1-35364d380206',
// Optional: verify only the Forge record
// { scope: ['forge'] },
);
$resend = Resend::client('re_xxxxxxxxx');
$resend->domains->verify('d91cd9bd-1176-453e-8fc1-35364d380206');
// Optional: verify only the Forge record
// $resend->domains->verify('d91cd9bd-1176-453e-8fc1-35364d380206', ['scope' => ['forge']]);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Domains.verify(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206")
# Optional: verify only the Forge record
# resend.Domains.verify(domain_id="d91cd9bd-1176-453e-8fc1-35364d380206", params={"scope": ["forge"]})
require "resend"
Resend.api_key = "re_xxxxxxxxx"
Resend::Domains.verify("d91cd9bd-1176-453e-8fc1-35364d380206")
# Optional: verify only the Forge record
# Resend::Domains.verify("d91cd9bd-1176-453e-8fc1-35364d380206", scope: ["forge"])
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Domains.Verify("d91cd9bd-1176-453e-8fc1-35364d380206")
// Optional: verify only the Forge record (also import "context")
// client.Domains.VerifyWithOptions(context.Background(), "d91cd9bd-1176-453e-8fc1-35364d380206", &resend.VerifyDomainOptions{Scope: []resend.VerifyDomainScope{"forge"}})
}
use resend_rs::{
types::{VerifyDomainOptions, VerifyDomainScope},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let options = VerifyDomainOptions::new();
// Optional: verify only the Forge record
// let options = VerifyDomainOptions::new().with_scope([VerifyDomainScope::Forge]);
resend
.domains
.verify("d91cd9bd-1176-453e-8fc1-35364d380206", options)
.await?;
Ok(())
}
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.domains.model.VerifyDomainOptions;
import com.resend.services.domains.model.VerifyDomainResponse;
import com.resend.services.domains.model.VerifyDomainScope;
import java.util.List;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
VerifyDomainResponse verified = resend.domains().verify("d91cd9bd-1176-453e-8fc1-35364d380206");
// Optional: verify only the Forge record
// resend.domains().verify("d91cd9bd-1176-453e-8fc1-35364d380206", VerifyDomainOptions.builder().scope(List.of(VerifyDomainScope.FORGE)).build());
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.DomainVerifyAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ) );
// Optional: verify only the Forge record
// await resend.DomainVerifyAsync( new Guid( "d91cd9bd-1176-453e-8fc1-35364d380206" ), new[] { DomainVerificationScope.Forge } );
curl -X POST 'https://api.resend.com/domains/d91cd9bd-1176-453e-8fc1-35364d380206/verify' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json'
resend domains verify d91cd9bd-1176-453e-8fc1-35364d380206
# Optional: verify only the Forge record
# resend domains verify d91cd9bd-1176-453e-8fc1-35364d380206 --scope forge
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206"
}