Skip to main content
POST
AhaSend Go SDK
The dkim_private_key parameter is currently only supported for Platform Partner accounts.

Authorizations

Authorization
string
header
required

API key for authentication

Headers

Idempotency-Key
string

Optional idempotency key for safe request retries. Must be a unique string for each logical request. Requests with the same key will return the same response. Keys for non-secret responses expire after 24 hours. API-key create responses include a one-time secret_key, so their encrypted replay responses expire after 5 minutes.

Maximum string length: 255

Path Parameters

account_id
string<uuid>
required

Account ID

Body

application/json
domain
string<hostname>
required

Fully qualified domain name

dkim_private_key
string

DKIM Private Key for the domain. Only RSA keys with a minimum key size of 1024 bits are supported.

Note: This parameter is only supported on Platform Partner accounts.

Key size of at least 1024 bits is supported; 2048 bit keys are strongly recommended for improved security.

tracking_subdomain
string

Optional custom tracking subdomain. Omit to use the default on create. Applies to both manual-DNS and managed-DNS domains.

return_path_subdomain
string

Optional custom return-path subdomain. Omit to use the default on create. Applies to both manual-DNS and managed-DNS domains.

subscription_subdomain
string

Optional custom subscription management subdomain. Omit to use the default on create. Applies to both manual-DNS and managed-DNS domains.

media_subdomain
string

Optional custom media subdomain. Omit to use the default on create. Applies to both manual-DNS and managed-DNS domains.

dkim_rotation_interval_days
integer

Optional custom DKIM rotation interval in days. Only supported for managed DNS domains on eligible plans.

dkim_selector
string | null

Optional custom DKIM selector for the domain. Omit, send null, or send an empty or whitespace-only string to use the default selector (no per-domain override); the value is trimmed before it is interpreted, so whitespace-only input is treated as empty.

When provided, it is normalized to lowercase and must be a single DNS label: 1-62 characters using lowercase letters, numbers, and hyphens only, without a leading or trailing hyphen.

Note: This parameter is only supported on Platform Partner accounts.

Response

Domain created successfully

object
enum<string>
required

Object type identifier

Available options:
domain
id
string<uuid>
required

Unique identifier for the domain

created_at
string<date-time>
required

When the domain was created

updated_at
string<date-time>
required

When the domain was last updated

domain
string
required

The domain name

account_id
string<uuid>
required

Account ID this domain belongs to

dns_records
object[]
required

DNS records required for domain verification

dns_valid
boolean
required

Whether all required DNS records are properly configured

last_dns_check_at
string<date-time> | null

When DNS records were last checked

tracking_subdomain
string | null

Custom tracking subdomain. Null means the account or product default is used. Applies to both manual-DNS and managed-DNS domains.

return_path_subdomain
string | null

Custom return-path subdomain. Null means the account or product default is used. Applies to both manual-DNS and managed-DNS domains.

subscription_subdomain
string | null

Custom subscription management subdomain. Null means the account or product default is used. Applies to both manual-DNS and managed-DNS domains.

media_subdomain
string | null

Custom media subdomain. Null means the account or product default is used. Applies to both manual-DNS and managed-DNS domains.

dkim_rotation_interval_days
integer | null

Custom DKIM rotation interval in days. Null means the account default is used. Only supported for managed DNS domains.

dkim_selector
string | null

Per-domain DKIM selector override. Null means no per-domain override is set.

This reports the configured per-domain override only, not the effective selector used for DKIM signing. The effective selector is resolved separately and can differ — for example, a selector locked after DNS verification takes precedence over this override.

rotation_ready
boolean

Whether the standby DKIM slot is ready for rotation.

dsn_recipient
string | null

Optional recipient address for delivery status notifications.