Get Domain
Retrieve a sending domain with its DNS records and their status as of the last check.
This endpoint does not look the records up again. To check them now, call Verify Domain.
Endpoint
GET /email/domains/:id
Returns: 200 OK
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer <your-api-key> | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The domain ID |
Response
{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"name": "mail.acme.com",
"status": "verified",
"verified_at": "2026-03-08T12:20:00.000Z",
"created_at": "2026-03-08T12:00:00.000Z",
"records": [
{
"type": "CNAME",
"name": "4hbfxq3v2nkd6wz5ymtj7ra2ue3lc5po._domainkey.mail.acme.com",
"value": "4hbfxq3v2nkd6wz5ymtj7ra2ue3lc5po.dkim.amazonses.com",
"purpose": "dkim",
"required": true,
"status": "verified"
},
{
"type": "CNAME",
"name": "s7kq2mwx9pzr4tbv6ny3hd8cgj5fa2le._domainkey.mail.acme.com",
"value": "s7kq2mwx9pzr4tbv6ny3hd8cgj5fa2le.dkim.amazonses.com",
"purpose": "dkim",
"required": true,
"status": "verified"
},
{
"type": "CNAME",
"name": "zt5c8rjd2wqy7mhn4xkb9vp3ga6fe2us._domainkey.mail.acme.com",
"value": "zt5c8rjd2wqy7mhn4xkb9vp3ga6fe2us.dkim.amazonses.com",
"purpose": "dkim",
"required": true,
"status": "verified"
},
{
"type": "TXT",
"name": "mail.acme.com",
"value": "v=spf1 include:amazonses.com ~all",
"purpose": "spf",
"required": false,
"status": "verified"
},
{
"type": "TXT",
"name": "_dmarc.mail.acme.com",
"value": "v=DMARC1; p=none;",
"purpose": "dmarc",
"required": false,
"status": "pending"
}
]
}
A domain is verified once its required records are found, so a verified domain can still list a recommended record as pending.
Domain fields
| Field | Type | Description |
|---|---|---|
id | string | The domain ID |
name | string | The domain name |
status | string | pending, verified or failed. Only a verified domain can send. |
verified_at | string | null | When the domain was verified (ISO 8601) |
created_at | string | When the domain was added (ISO 8601) |
records | array | The DNS records to publish at the domain's DNS provider |
Record fields
| Field | Type | Description |
|---|---|---|
type | string | DNS record type, e.g. CNAME or TXT |
name | string | The record's host name, fully qualified. Some DNS providers want only the part before your domain. |
value | string | The record's value |
purpose | string | dkim, spf, dmarc or mail_from |
required | boolean | The domain cannot become verified until every required record is published. The others are recommended for deliverability. |
status | string | pending or verified, as of the last check |
Examples
- cURL
- JavaScript
- Python
- C#
- PHP
curl "https://api.arsel.sa/v1/email/domains/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer $ARSEL_API_KEY"
const response = await fetch("https://api.arsel.sa/v1/email/domains/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a", {
headers: {
Authorization: `Bearer ${process.env.ARSEL_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) {
throw new Error(`${data.name}: ${data.message}`);
}
console.log(data);
import os
import requests
response = requests.get(
"https://api.arsel.sa/v1/email/domains/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
headers={"Authorization": f"Bearer {os.environ['ARSEL_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
using System.Net.Http.Headers;
var client = new HttpClient(); // share one instance across requests
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ARSEL_API_KEY"));
var response = await client.GetAsync("https://api.arsel.sa/v1/email/domains/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a");
var body = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
throw new HttpRequestException($"{(int)response.StatusCode}: {body}");
Console.WriteLine(body);
<?php
$ch = curl_init("https://api.arsel.sa/v1/email/domains/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ARSEL_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) {
throw new Exception("{$data['name']}: {$data['message']}");
}
print_r($data);
Error Responses
- 404 Not Found
- 401 Unauthorized
{
"status_code": 404,
"name": "not_found",
"message": "Domain not found"
}
{
"status_code": 401,
"name": "unauthorized",
"message": "Invalid API Key"
}