Retrieve an email domain
Shared (type: shared) Telnyx-managed domains are included/readable for every account, in addition to the accountโs own custom domains.
GET
/
email_domains
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const EmailDomain = await client.emailDomains.retrieve('id');
console.log(EmailDomain.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
email_domain = client.email_domains.retrieve(
"id",
)
print(email_domain.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
emailDomain, err := client.EmailDomains.Get(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", emailDomain.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.emailDomains().retrieve("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_domain = telnyx.email_domains.retrieve("id")
puts(email_domain)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$email_domain = $client->emailDomains->retrieve(
'id',
);
var_dump($email_domain);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-domains retrieve \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/email_domains/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"record_type": "email_domain",
"domain": "example.com",
"type": "custom",
"status": "pending",
"usable_for_sending": false,
"usable_for_inbound": false,
"verification": {
"ownership": "pending",
"spf": "missing_optional",
"dkim": "pending",
"dmarc": "missing_optional",
"mx": "not_required"
},
"dns_records": [],
"dkim": {
"selector": null,
"algorithm": null,
"key_length": null,
"active": false,
"rotated_at": null
},
"inbound": {
"enabled": false,
"catch_all": false,
"mx_required": false
},
"dmarc_policy": {
"p": "none",
"pct": 100,
"rua": "mailto:dmarc@telnyx.com"
},
"tracking": {
"open_tracking": false,
"click_tracking": false,
"unsubscribe_tracking": false
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"verified_at": null
}
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested email domain was not found"
}
]
}{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "An unexpected error occurred"
}
]
}Authorizations
Telnyx API key supplied as Authorization: Bearer <token>. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.
Path Parameters
Email domain UUID
Response
Email domain details
Show child attributes
Show child attributes
Example:
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"record_type": "email_domain",
"domain": "example.com",
"type": "custom",
"status": "pending",
"usable_for_sending": false,
"usable_for_inbound": false,
"verification": {
"ownership": "pending",
"spf": "missing_optional",
"dkim": "pending",
"dmarc": "missing_optional",
"mx": "not_required"
},
"dns_records": [],
"dkim": {
"selector": null,
"algorithm": null,
"key_length": null,
"active": false,
"rotated_at": null
},
"inbound": {
"enabled": false,
"catch_all": false,
"mx_required": false
},
"dmarc_policy": {
"p": "none",
"pct": 100,
"rua": "mailto:dmarc@telnyx.com"
},
"tracking": {
"open_tracking": false,
"click_tracking": false,
"unsubscribe_tracking": false
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"verified_at": null
}
Was this page helpful?
โI
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const EmailDomain = await client.emailDomains.retrieve('id');
console.log(EmailDomain.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
email_domain = client.email_domains.retrieve(
"id",
)
print(email_domain.data)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
emailDomain, err := client.EmailDomains.Get(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", emailDomain.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.emailDomains().retrieve("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_domain = telnyx.email_domains.retrieve("id")
puts(email_domain)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$email_domain = $client->emailDomains->retrieve(
'id',
);
var_dump($email_domain);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-domains retrieve \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/email_domains/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"record_type": "email_domain",
"domain": "example.com",
"type": "custom",
"status": "pending",
"usable_for_sending": false,
"usable_for_inbound": false,
"verification": {
"ownership": "pending",
"spf": "missing_optional",
"dkim": "pending",
"dmarc": "missing_optional",
"mx": "not_required"
},
"dns_records": [],
"dkim": {
"selector": null,
"algorithm": null,
"key_length": null,
"active": false,
"rotated_at": null
},
"inbound": {
"enabled": false,
"catch_all": false,
"mx_required": false
},
"dmarc_policy": {
"p": "none",
"pct": 100,
"rua": "mailto:dmarc@telnyx.com"
},
"tracking": {
"open_tracking": false,
"click_tracking": false,
"unsubscribe_tracking": false
},
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"verified_at": null
}
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested email domain was not found"
}
]
}{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "An unexpected error occurred"
}
]
}