Delete an email domain
Deletes an email domain configuration. Verified domains require force=true, and shared domains are read-only for non-owner accounts.
DELETE
/
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
});
await client.emailDomains.delete('id');import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.email_domains.delete(
"id",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.EmailDomains.Delete(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
}
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();
client.emailDomains().delete("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_domain = telnyx.email_domains.delete("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->delete(
'id',
);
var_dump($email_domain);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-domains delete \
--api-key 'My API Key' \
--id idcurl --request DELETE \
--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": [
{
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested email domain was not found"
}
]
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "domain is invalid",
"source": {
"pointer": "/data/attributes/domain"
}
}
]
}{
"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
Query Parameters
Required as true when deleting verified domains
Response
Email domain deleted
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
});
await client.emailDomains.delete('id');import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
client.email_domains.delete(
"id",
)
package main
import (
"context"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.EmailDomains.Delete(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
}
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();
client.emailDomains().delete("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_domain = telnyx.email_domains.delete("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->delete(
'id',
);
var_dump($email_domain);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-domains delete \
--api-key 'My API Key' \
--id idcurl --request DELETE \
--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": [
{
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested email domain was not found"
}
]
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "domain is invalid",
"source": {
"pointer": "/data/attributes/domain"
}
}
]
}{
"errors": [
{
"code": "500",
"title": "Internal Server Error",
"detail": "An unexpected error occurred"
}
]
}