List Domains
curl --request GET \
--url https://app.lettr.com/api/domains \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.lettr.com/api/domains"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/domains")
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": "Domains retrieved successfully.",
"data": {
"domains": [
{
"domain": "example.com",
"status": "approved",
"status_label": "Approved",
"can_send": true,
"cname_status": "valid",
"dkim_status": "valid",
"created_at": "2024-01-15T10:30:00+00:00",
"updated_at": "2024-01-16T14:45:00+00:00"
},
{
"domain": "pending.example.com",
"status": "pending",
"status_label": "Pending Review",
"can_send": false,
"cname_status": null,
"dkim_status": null,
"created_at": "2024-01-17T09:00:00+00:00",
"updated_at": "2024-01-17T09:00:00+00:00"
}
]
}
}Domains
List Domains
Retrieve all sending domains registered with your account. Returns domains with their current status, verification state, and timestamps.
GET
/
domains
List Domains
curl --request GET \
--url https://app.lettr.com/api/domains \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.lettr.com/api/domains"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/domains")
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": "Domains retrieved successfully.",
"data": {
"domains": [
{
"domain": "example.com",
"status": "approved",
"status_label": "Approved",
"can_send": true,
"cname_status": "valid",
"dkim_status": "valid",
"created_at": "2024-01-15T10:30:00+00:00",
"updated_at": "2024-01-16T14:45:00+00:00"
},
{
"domain": "pending.example.com",
"status": "pending",
"status_label": "Pending Review",
"can_send": false,
"cname_status": null,
"dkim_status": null,
"created_at": "2024-01-17T09:00:00+00:00",
"updated_at": "2024-01-17T09:00:00+00:00"
}
]
}
}Returns all sending domains configured for your team, including their verification status and DNS record information.
Was this page helpful?
⌘I