Custom domain management (Ledger + Cloudflare + Billing)
List all domains
Returns all domains for the authenticated user from Ledger.
Note: This is a fast operation that returns Ledger data only. Status fields may be empty - use the Refresh endpoint to get fresh Cloudflare status for individual domains.
List all domains › Responses
List of domains
successerror_codeError code if listing failed
error_messageHuman-readable error description
Create a new domain
Creates a new custom domain for the authenticated user.
Orchestrates across:
- Ledger: Registers domain ownership
- Cloudflare: Creates custom hostname with SSL
- Chargebee: Updates addon quantity if beyond free tier
Returns DNS validation records that the user must add.
Create a new domain › Request Body
domainDomain hostname to add (e.g., track.example.com)
Create a new domain › Responses
Domain created successfully
successerror_codeError code if creation failed (e.g., DOMAIN_EXISTS, DOMAIN_ALREADY_OWNED)
error_messageHuman-readable error description
messageSuccess message
Check domain configuration
Verifies that a domain is correctly configured to route to FunnelFlux.
Performs:
- HTTP request to {domain}/debug/domain-check
- TLS handshake validation
- Response verification
Note: Requires authentication for rate limiting and audit logging.
Check domain configuration › Request Body
domainDomain hostname to check (e.g., track.example.com)
Check domain configuration › Responses
Domain check result
successfoundDomain routes to FunnelFlux (redirect check passed)
ssl_validSSL certificate is valid (TLS handshake succeeded)
http_statusHTTP status from debug endpoint
ssl_errorSSL error message if TLS failed
response_time_msResponse time in milliseconds
error_messageError message if check failed
check_timestampUnix timestamp when check was performed
cloudflare_statusCloudflare hostname status (pending, active, moved, deleted)
cloudflare_ssl_statusCloudflare SSL status (initializing, pending_validation, active)
Get domain details
Returns detailed information about a specific domain including Cloudflare status and DNS validation records.
path Parameters
domainDomain hostname (e.g., track.example.com)
Get domain details › Responses
Domain details
successerror_codeError code if lookup failed (e.g., NOT_FOUND)
error_messageHuman-readable error description
Delete a domain
Deletes a custom domain.
Orchestrates across:
- Cloudflare: Removes custom hostname
- Ledger: Removes domain registration
- Chargebee: Updates addon quantity if applicable
path Parameters
domainDomain hostname to delete
Delete a domain › Responses
Domain deleted successfully
successmessageerror_codeError code if deletion failed
error_messageHuman-readable error description
Refresh domain status
Fetches fresh status for a domain from Cloudflare and runs a redirect check.
Use this when users click "Recheck" in the UI to verify their DNS setup. This endpoint:
- Gets current Cloudflare custom hostname status
- Runs HTTP redirect check to verify routing
- Returns combined status
Note: This does NOT call Cloudflare's refresh endpoint - it just fetches current status. Cloudflare periodically rechecks DNS automatically.
path Parameters
domainDomain hostname to refresh
Refresh domain status › Responses
Refreshed domain status