Verify Domain
curl --request POST \
--url https://api.example.com/domains/{identifier}/verifyimport requests
url = "https://api.example.com/domains/{identifier}/verify"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/domains/{identifier}/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/domains/{identifier}/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/domains/{identifier}/verify"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/domains/{identifier}/verify")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/domains/{identifier}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"status": "<string>"
}Domains
Verify Domain
Verify DNS records
Verify Domain
curl --request POST \
--url https://api.example.com/domains/{identifier}/verifyimport requests
url = "https://api.example.com/domains/{identifier}/verify"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/domains/{identifier}/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/domains/{identifier}/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/domains/{identifier}/verify"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/domains/{identifier}/verify")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/domains/{identifier}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"status": "<string>"
}Description
Verify that DNS records are correctly configured for a domain.Parameters
Domain ID or name.
Response
VERIFIED if successful.Examples
curl -X POST https://api.usesendly.app/v1/domains/mail.yourdomain.com/verify \
-H "Authorization: Bearer se_your_api_key"
const result = await client.domains.verify('mail.yourdomain.com')
if (result.status === 'VERIFIED') {
console.log('✅ Domain verified successfully')
} else {
console.log('❌ Verification failed - check DNS records')
}
import { Sendly } from '@sendlyapp/sdk'
const client = new Sendly()
const result = await client.domains.verify('mail.yourdomain.com')
Complete Domain Setup
// 1. Create domain
const domain = await client.domains.create({
domain: 'mail.yourdomain.com'
})
console.log(`Domain created. Add these DNS records:`)
console.log(domain.records)
// 2. Wait 24-48 hours...
// 3. Verify
const verified = await client.domains.verify(domain.id)
if (verified.status === 'VERIFIED') {
console.log('Ready to send!')
// 4. Send email from this domain
await client.emails.send({
from: 'noreply@mail.yourdomain.com',
to: 'user@example.com',
subject: 'Email',
html: '<p>Content</p>'
})
}
# 1. Create
DOMAIN_ID=$(curl -X POST https://api.usesendly.app/v1/domains \
-H "Authorization: Bearer se_your_api_key" \
-H "Content-Type: application/json" \
-d '{"domain": "mail.yourdomain.com"}' | jq -r '.id')
echo "Domain created: $DOMAIN_ID"
# 2. After DNS setup...
# 3. Verify
curl -X POST "https://api.usesendly.app/v1/domains/$DOMAIN_ID/verify" \
-H "Authorization: Bearer se_your_api_key"
Verification Process
- Create domain with create endpoint
- Copy DNS records from response
- Add records in your DNS provider (GoDaddy, Namecheap, etc.)
- Wait 24-48 hours for propagation
- Verify with this endpoint
- Start sending from that domain
DNS Records Required
| Type | Purpose |
|---|---|
| DKIM | Authenticates emails are from you |
| SPF | Authorizes Sendly to send from your domain |
| DMARC | Defines what to do with auth failures |
Need help? Contact support@usesendly.app
⌘I