Automate Custom Domain Management¶
If you run a SaaS and want to let your customers add their own custom domains, you can automate this using the Appliku API.
Generate an API Key¶
Go to Account Settings → API and generate an API key.
Save it immediately — you won't be able to retrieve it again, only generate a new one. Keep it secret, as it provides full access to your Appliku account.
Check DNS Setup¶
Before adding a domain, verify the DNS configuration is correct:
POST https://api.appliku.com/api/team/{team_path}/applications/{application_id}/domain_check
{
"domain": "your-custom-domain.com"
}
You can test this in the Swagger UI. Use the lock icon to authenticate with your API key — prefix it with Token (note the space):
DNS rules:
- AAAA records must not be present
- A record can differ from the server IP (Cloudflare proxied mode is supported)
Warning
If your customers use Cloudflare, warn them that the SSL mode must be set to Full in Cloudflare. Flexible mode causes redirect loops.
Add a Custom Domain¶
POST https://api.appliku.com/api/team/{team_path}/applications/{application_id}/domains
{
"domain": "your-custom-domain.com"
}
Check Domain Status¶
After adding a domain, poll for the result:
Example response:
[
{
"id": 18,
"domain": "mycustomdomainname.com",
"a_records": ["3.126.219.48"],
"aaaa_records": [],
"deployment_status": "2",
"deployment_status_text": "Deployed",
"logs": "Deploying domain configuration\nDeployment successful\n"
}
]
Note
The logs field is internal — you typically won't want to expose this to your users.
CNAME Support¶
For CNAME-based setups, create an A record at a subdomain like cn.yourapp.com pointing to your server. Your customers then create a CNAME record pointing to cn.yourapp.com. (the trailing dot matters).