Emails::Domain

Create Email Domain

Changed on

Provision a sending domain for a workspace. Find-or-create: returns 200 with the existing record if a domain with this name already exists for the workspace, or 201 with freshly generated DNS records if it was just created. These are email sending domains (DKIM/SPF/DMARC) - for website/hosting domains, see listDomains. The response includes the email-transport records; dkim_record can be null until the DKIM key finishes generating, and POSTing the same name again retries provisioning. Provisioning also creates a no-reply@<name> sender address on the new domain. Follow next_steps, which distinguishes the required ownership step, the required transport records, and the recommended return-path record; verified SMTP replaces DKIM/SPF/DMARC. Ownership (ownership_verified) is proved by connecting the domain, as www.example.com or another subdomain of it, to this workspace as a website/hosting domain in the ClickFunnels app, not through this API. Ownership is confirmed at the root domain, so provision example.com rather than a subdomain such as mail.example.com, which is rejected with 422 naming the root domain to use instead. Then call verifyEmailsDomains until ready_for_sending is true; a 200 there means the check ran, not that it passed. The top-level verified field means transport only; sender readiness requires both ownership and transport. Return-path verification is independent. Once ready, create addresses via POST /workspaces/{workspace_id}/emails/addresses with emails_domain_id set to this domain's numeric id.

post/workspaces/{workspace_id}/emails/domains

Request

Path parameters

workspace_idstring required

Request body

Example request

{
  "emails_domain": {
    "name": "example.com"
  }
}

Response

OK - a sending domain with this name already existed for the workspace and is returned as-is.

idinteger

Email Domain ID

public_idstring nullable

Email Domain public ID

workspace_idinteger

Workspace ID

namestring

The sending domain name (lowercase), e.g. example.com - the part after the @ shared by every email address created on this domain.

ownership_verifiedboolean

Whether ClickFunnels has confirmed that this workspace owns the domain name. It becomes true when the same name is connected to this workspace as a website/hosting domain whose ownership is verified - done in the ClickFunnels app, not through this API. No API call can make it true; ask the customer to connect the domain.

verifiedboolean

Whether email transport is verified. True once DKIM, SPF, and DMARC are all verified via DNS, or when a verified SMTP setting exists. This field does not prove domain ownership and is not sufficient by itself to send.

ready_for_sendingboolean

Whether addresses on this custom domain can be used as senders. True only when both ownership_verified and the transport-only verified field are true. The return-path record is independent and does not control this value.

dkim_verifiedboolean

Whether the domain's DKIM DNS record is verified.

spf_verifiedboolean

Whether the domain's SPF DNS record is verified.

dmarc_verifiedboolean

Whether the domain's DMARC DNS record is verified.

smtp_verifiedboolean

Whether email transport is verified via a verified SMTP setting (an alternative to DKIM/SPF/DMARC verification). When true, verified can be true while dkim_verified/spf_verified/dmarc_verified are false; ownership must still be verified before ready_for_sending becomes true.

return_address_verifiedboolean

Whether the domain's return-path CNAME record (used for bounce handling) is verified. This is independent of verified and ready_for_sending and is not required for either one to become true.

next_stepsstring[]

Plain-English guidance you can surface to users. It distinguishes the required ownership step (connect the domain to the workspace in ClickFunnels) and the required transport records from the recommended ClickFunnels return path, accounts for verified SMTP, and explains how to re-check readiness.

created_atstring date-time nullable

Created at datetime

updated_atstring date-time nullable

Updated at datetime

Example response

{
  "id": 1,
  "public_id": "QrStUv",
  "workspace_id": 42000,
  "name": "example.com",
  "ownership_verified": false,
  "verified": false,
  "ready_for_sending": false,
  "dkim_verified": false,
  "spf_verified": false,
  "dmarc_verified": false,
  "smtp_verified": false,
  "return_address_verified": false,
  "dkim_record": {
    "type": "TXT",
    "name": "second._domainkey.example.com",
    "value": "v=DKIM1; k=rsa; p=...",
    "ttl": 300,
    "verified": false
  },
  "spf_record": {
    "type": "TXT",
    "name": "example.com",
    "value": "v=spf1 include:mailer.myclickfunnels.com -all",
    "ttl": 300,
    "verified": false
  },
  "dmarc_record": {
    "type": "TXT",
    "name": "_dmarc.example.com",
    "value": "v=DMARC1; p=none;",
    "ttl": 300,
    "verified": false
  },
  "return_address_record": {
    "type": "CNAME",
    "name": "cf2mail.example.com",
    "value": "mailer.myclickfunnels.com",
    "ttl": 300,
    "verified": false
  },
  "next_steps": [
    "Connect example.com to this workspace in ClickFunnels so ownership is confirmed. Addresses on this domain cannot send until it is, even once every record below verifies.",
    "Add dkim_record, spf_record, and dmarc_record at the DNS provider for example.com to authenticate email transport.",
    "Recommended for ClickFunnels bounce handling: add return_address_record at the DNS provider.",
    "DNS changes can take up to 48 hours to propagate. Re-check with POST /api/v2/emails/domains/QrStUv/verify; results are cached for about 10 minutes.",
    "Manual setup help: https://support.myclickfunnels.com/docs/email-settings-how-to-verify-email-dns-records"
  ],
  "created_at": "2025-01-01T00:00:00.000Z",
  "updated_at": "2025-01-01T00:00:00.000Z"
}

Changes