Get Domain
curl --request GET \
--url https://app.lettr.com/api/domains/{domain} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.lettr.com/api/domains/{domain}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.lettr.com/api/domains/{domain}', 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://app.lettr.com/api/domains/{domain}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.lettr.com/api/domains/{domain}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.lettr.com/api/domains/{domain}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/domains/{domain}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Domain retrieved successfully.",
"data": {
"domain": "example.com",
"status": "approved",
"status_label": "Approved",
"can_send": true,
"cname_status": "valid",
"dkim_status": "valid",
"dmarc_status": "valid",
"spf_status": "valid",
"is_primary_domain": false,
"tracking_domain": "tracking.example.com",
"dns": {
"dkim": {
"selector": "scph0123",
"public": "MIGfMA0GCSqGSIb3DQEBA...",
"headers": "from:to:subject:date"
}
},
"dns_provider": null,
"created_at": "2024-01-15T10:30:00+00:00",
"updated_at": "2024-01-16T14:45:00+00:00"
}
}Domains
Get Domain
Retrieve details of a single sending domain including DNS records and tracking domain configuration.
GET
/
domains
/
{domain}
Get Domain
curl --request GET \
--url https://app.lettr.com/api/domains/{domain} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.lettr.com/api/domains/{domain}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.lettr.com/api/domains/{domain}', 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://app.lettr.com/api/domains/{domain}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.lettr.com/api/domains/{domain}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.lettr.com/api/domains/{domain}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/domains/{domain}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Domain retrieved successfully.",
"data": {
"domain": "example.com",
"status": "approved",
"status_label": "Approved",
"can_send": true,
"cname_status": "valid",
"dkim_status": "valid",
"dmarc_status": "valid",
"spf_status": "valid",
"is_primary_domain": false,
"tracking_domain": "tracking.example.com",
"dns": {
"dkim": {
"selector": "scph0123",
"public": "MIGfMA0GCSqGSIb3DQEBA...",
"headers": "from:to:subject:date"
}
},
"dns_provider": null,
"created_at": "2024-01-15T10:30:00+00:00",
"updated_at": "2024-01-16T14:45:00+00:00"
}
}Retrieves details for a specific sending domain, including its current verification status and DNS record configuration.
Authorizations
API key for authentication
Path Parameters
The domain name to retrieve
Example:
"example.com"
Was this page helpful?
⌘I