GET
/
api
/
v2
/
domains
/
{id}
import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('YOUR_API_KEY')

const { data: domain, error } = await inbound.domain.get('dom_abc123')
if (error) {
  console.error('Error:', error)
} else {
  console.log('Domain:', domain.domain, 'Status:', domain.status)
}
{
  "id": "dom_abc123",
  "domain": "example.com",
  "status": "verified",
  "canReceiveEmails": true,
  "hasMxRecords": true,
  "domainProvider": "Cloudflare",
  "providerConfidence": "high",
  "lastDnsCheck": "2024-01-15T10:30:00Z",
  "lastSesCheck": "2024-01-15T10:30:00Z",
  "isCatchAllEnabled": true,
  "catchAllEndpointId": "end_xyz789",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "userId": "user_123",
  "stats": {
    "totalEmailAddresses": 5,
    "activeEmailAddresses": 4,
    "emailsLast24h": 12,
    "emailsLast7d": 89,
    "emailsLast30d": 345
  },
  "catchAllEndpoint": {
    "id": "end_xyz789",
    "name": "Main Webhook",
    "type": "webhook",
    "isActive": true
  },
  "verificationCheck": {
    "dnsRecords": [
      {
        "type": "TXT",
        "name": "_amazonses.example.com",
        "value": "abc123def456ghi789",
        "isVerified": true
      },
      {
        "type": "MX",
        "name": "example.com", 
        "value": "10 inbound-smtp.us-east-1.amazonaws.com",
        "isVerified": true
      }
    ],
    "sesStatus": "Success",
    "dkimStatus": "Success",
    "dkimVerified": true,
    "dkimTokens": ["abc123", "def456", "ghi789"],
    "mailFromDomain": "mail.example.com",
    "mailFromStatus": "Success",
    "mailFromVerified": true,
    "isFullyVerified": true,
    "lastChecked": "2024-01-15T10:30:00Z"
  },
  "authRecommendations": {
    "spf": {
      "name": "example.com",
      "value": "v=spf1 include:amazonses.com ~all",
      "description": "SPF record for root domain (recommended)"
    }
  }
}

Overview

This endpoint retrieves comprehensive information about a specific domain, including statistics, configuration, and optional real-time verification status.

Authentication

Authorization
string
required
Bearer token for API authentication. Format: Bearer YOUR_API_KEY

Parameters

id
string
required
The unique identifier of the domain to retrieve.
check
string
Perform real-time DNS and SES verification checks. Set to true to include current verification status in response (DKIM and MAIL FROM included) and recommendations for SPF/DMARC when missing. This may slow down the response but provides live verification results.

Response

id
string
required
Unique identifier for the domain.
domain
string
required
The domain name (e.g., “example.com”).
status
string
required
Current verification status: pending, verified, or failed.
canReceiveEmails
boolean
required
Whether the domain is configured to receive emails.
hasMxRecords
boolean
required
Whether the domain has valid MX records configured.
domainProvider
string | null
Detected domain provider (e.g., “Cloudflare”, “GoDaddy”).
providerConfidence
string | null
Confidence level of provider detection: high, medium, low.
lastDnsCheck
string | null
ISO 8601 timestamp of the last DNS verification check.
lastSesCheck
string | null
ISO 8601 timestamp of the last AWS SES verification check.
mailFromDomain
string | null
Configured MAIL FROM domain (if set). This eliminates “via amazonses.com” attribution.
mailFromDomainStatus
string | null
MAIL FROM domain status: Pending, Success, Failed, or NotSet.
mailFromDomainVerifiedAt
string | null
ISO 8601 timestamp when the MAIL FROM domain was verified.
isCatchAllEnabled
boolean
required
Whether catch-all email forwarding is enabled for this domain.
catchAllEndpointId
string | null
ID of the endpoint used for catch-all email forwarding.
createdAt
string
required
ISO 8601 timestamp when the domain was added.
updatedAt
string
required
ISO 8601 timestamp when the domain was last updated.
userId
string
required
ID of the user who owns this domain.
stats
object
required
Detailed domain statistics and usage information.
catchAllEndpoint
object | null
Information about the catch-all endpoint (if configured).
verificationCheck
object
Real-time verification status (only included when check=true parameter is used).
authRecommendations
object
Recommended DNS records to improve deliverability (present when SPF/DMARC are missing).

Examples

Basic Request

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('YOUR_API_KEY')

const { data: domain, error } = await inbound.domain.get('dom_abc123')
if (error) {
  console.error('Error:', error)
} else {
  console.log('Domain:', domain.domain, 'Status:', domain.status)
}

Request with Verification Check

import { InboundEmailClient } from '@inboundemail/sdk'

const inbound = new InboundEmailClient('YOUR_API_KEY')

// Note: SDK automatically handles check parameter internally
const { data: domain, error } = await inbound.domain.get('dom_abc123')
if (error) {
  console.error('Error:', error)
} else {
  console.log('Domain:', domain.domain)
  console.log('Verification Status:', domain.verificationCheck?.isFullyVerified)
  console.log('SES Status:', domain.verificationCheck?.sesStatus)
}

Response (with Verification Check)

{
  "id": "dom_abc123",
  "domain": "example.com",
  "status": "verified",
  "canReceiveEmails": true,
  "hasMxRecords": true,
  "domainProvider": "Cloudflare",
  "providerConfidence": "high",
  "lastDnsCheck": "2024-01-15T10:30:00Z",
  "lastSesCheck": "2024-01-15T10:30:00Z",
  "isCatchAllEnabled": true,
  "catchAllEndpointId": "end_xyz789",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "userId": "user_123",
  "stats": {
    "totalEmailAddresses": 5,
    "activeEmailAddresses": 4,
    "emailsLast24h": 12,
    "emailsLast7d": 89,
    "emailsLast30d": 345
  },
  "catchAllEndpoint": {
    "id": "end_xyz789",
    "name": "Main Webhook",
    "type": "webhook",
    "isActive": true
  },
  "verificationCheck": {
    "dnsRecords": [
      {
        "type": "TXT",
        "name": "_amazonses.example.com",
        "value": "abc123def456ghi789",
        "isVerified": true
      },
      {
        "type": "MX",
        "name": "example.com", 
        "value": "10 inbound-smtp.us-east-1.amazonaws.com",
        "isVerified": true
      }
    ],
    "sesStatus": "Success",
    "dkimStatus": "Success",
    "dkimVerified": true,
    "dkimTokens": ["abc123", "def456", "ghi789"],
    "mailFromDomain": "mail.example.com",
    "mailFromStatus": "Success",
    "mailFromVerified": true,
    "isFullyVerified": true,
    "lastChecked": "2024-01-15T10:30:00Z"
  },
  "authRecommendations": {
    "spf": {
      "name": "example.com",
      "value": "v=spf1 include:amazonses.com ~all",
      "description": "SPF record for root domain (recommended)"
    }
  }
}

Error Responses

{
  "error": "Domain not found"
}

Important Notes

The check=true parameter performs real-time DNS and SES verification checks, which may slow down the response but provides the most current verification status.
Use the check=true parameter when you need to verify the current status of a domain, especially after making DNS changes or when troubleshooting verification issues.
The verificationCheck field is only included when check=true is specified. This parameter may increase response time as it performs live DNS lookups and AWS SES API calls.

Notes

  • The catchAllEndpoint field is only populated when isCatchAllEnabled is true and a valid endpoint is configured
  • Email statistics are calculated in real-time and may take a moment to update after configuration changes
  • Only verified domains can receive emails and will have meaningful statistics
  • When check=true is used, the domain status may be automatically updated based on current SES verification status
  • The mailFromDomain fields are only populated if a MAIL FROM domain has been configured to eliminate “via amazonses.com” attribution
  • The authRecommendations field provides suggested SPF and DMARC records when they are missing or not verified

1.0 - ✅