Skip to main content

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):

Token YOUR_API_KEY

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"
}

Try in Swagger UI

Check Domain Status

After adding a domain, poll for the result:

GET https://api.appliku.com/api/team/{team_path}/applications/{application_id}/domains

Try in Swagger UI

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).

Remove a Custom Domain

DELETE https://api.appliku.com/api/team/{team_path}/applications/{application_id}/domains/{id}

Try in Swagger UI