Create Email Domain
Changed onProvision 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.
Request
- Base URLhttps://myworkspace.myclickfunnels.com/api/v2
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://accounts.myclickfunnels.com/oauth/authorizeToken URLhttps://accounts.myclickfunnels.com/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
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.
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
- info
endpoint added
- info