List Domains
curl --request GET \
--url https://api.example.com/domainsimport requests
url = "https://api.example.com/domains"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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://api.example.com/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/domains")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{}
],
"pagination": {}
}Domains
List Domains
Get your verified domains
List Domains
curl --request GET \
--url https://api.example.com/domainsimport requests
url = "https://api.example.com/domains"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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://api.example.com/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/domains")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{}
],
"pagination": {}
}Description
Get a paginated list of all your configured domains.Parameters
Results per page. Default: 20. Maximum: 100
Page number. Default: 1
Sort order. Default:
descResponse
Array of domains.
Pagination information.
Examples
curl "https://api.usesendly.app/v1/domains" \
-H "Authorization: Bearer se_your_api_key"
const response = await client.domains.list()
response.data.forEach(domain => {
console.log(`${domain.domain} - ${domain.status}`)
})
// List domains using SDK
import { Sendly } from '@sendlyapp/sdk'
const client = new Sendly()
const response = await client.domains.list()
Find Verified Domains
const response = await client.domains.list()
const verified = response.data.find(d => d.status === 'VERIFIED')
if (verified) {
console.log(`Can send from: ${verified.domain}`)
}
curl "https://api.usesendly.app/v1/domains?limit=100" \
-H "Authorization: Bearer se_your_api_key" | jq '.data[] | select(.status == "VERIFIED")'
Need help? Contact support@usesendly.app
⌘I