Get an email domain
email_security.settings.domains.get(intdomain_id, DomainGetParams**kwargs) -> DomainGetResponse
GET/accounts/{account_id}/email-security/settings/domains/{domain_id}
Gets configuration details for a specific domain in email security.
Security
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
Get an email domain
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_email=os.environ.get("CLOUDFLARE_EMAIL"), # This is the default and can be omitted
api_key=os.environ.get("CLOUDFLARE_API_KEY"), # This is the default and can be omitted
)
domain = client.email_security.settings.domains.get(
domain_id=2400,
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(domain.id){
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": 2400,
"allowed_delivery_modes": [
"API"
],
"created_at": "2023-11-14T22:13:20Z",
"domain": "example.com",
"drop_dispositions": [
"MALICIOUS",
"SPAM"
],
"ip_restrictions": [
"string"
],
"last_modified": "2023-11-14T22:13:20Z",
"lookback_hops": 2,
"regions": [
"GLOBAL"
],
"transport": "example.com",
"authorization": {
"authorized": true,
"timestamp": "2019-12-27T18:11:19.117Z",
"status_message": "status_message"
},
"dmarc_status": "good",
"emails_processed": {
"timestamp": "2019-12-27T18:11:19.117Z",
"total_emails_processed": 0,
"total_emails_processed_previous": 0
},
"folder": "Inbox",
"inbox_provider": "Microsoft",
"integration_id": "a5dbb180-60ea-4578-84bb-d01a5d4e50c3",
"o365_tenant_id": "c3c3239d-8858-47df-9618-0e2d9bdf6aa8",
"require_tls_inbound": false,
"require_tls_outbound": true,
"spf_status": "good"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"id": 2400,
"allowed_delivery_modes": [
"API"
],
"created_at": "2023-11-14T22:13:20Z",
"domain": "example.com",
"drop_dispositions": [
"MALICIOUS",
"SPAM"
],
"ip_restrictions": [
"string"
],
"last_modified": "2023-11-14T22:13:20Z",
"lookback_hops": 2,
"regions": [
"GLOBAL"
],
"transport": "example.com",
"authorization": {
"authorized": true,
"timestamp": "2019-12-27T18:11:19.117Z",
"status_message": "status_message"
},
"dmarc_status": "good",
"emails_processed": {
"timestamp": "2019-12-27T18:11:19.117Z",
"total_emails_processed": 0,
"total_emails_processed_previous": 0
},
"folder": "Inbox",
"inbox_provider": "Microsoft",
"integration_id": "a5dbb180-60ea-4578-84bb-d01a5d4e50c3",
"o365_tenant_id": "c3c3239d-8858-47df-9618-0e2d9bdf6aa8",
"require_tls_inbound": false,
"require_tls_outbound": true,
"spf_status": "good"
},
"success": true
}