Public/Get-GCEmailsDomain.ps1

<#
.SYNOPSIS
    Retrieves a single email domain by ID.

.DESCRIPTION
    Returns the details of a specific email routing domain from Genesys Cloud.
    Uses the GET /api/v2/routing/email/domains/{domainId} endpoint.

.PARAMETER DomainId
    The unique identifier of the email domain to retrieve.

.EXAMPLE
    Get-GCEmailsDomain -DomainId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'

.NOTES
    Genesys Cloud API: GET /api/v2/routing/email/domains/{domainId}
#>

function Get-GCEmailsDomain {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$DomainId
    )

    $endpoint = "routing/email/domains/$DomainId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method GET
}