• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Question Create subscription with temp domain using REST API

Riculum

New Pleskian
Server operating system version
Ubuntu 24.04.2 LTS
Plesk version and microupdate number
18.0.71
Is it possible to create a Plesk subscription using the REST API with a temporary or generated domain name by plesk and later update or replace it with the customer's real domain? Are there any constraints, best practices, or pitfalls to consider when using a placeholder domain for subscriptions created via the API?

I’m using Plesk Obsidian (REST API) for automated onboarding, and sometimes the actual domain isn’t available at the moment of subscription creation. My idea is to generate a random/temporary domain, create the subscription, and let the customer update it to their real domain later. Is this supported, and does it cause any issues for future domain management or hosting configuration in Plesk?

Thanks in advance for any guidance or example API calls!
 
As far as I know it's temporary generated Plesk domains are only available via GUI. But you could of course create a subscription with any (sub) domain you own as a placeholder and rename the subscription domain later. I am not sure whether there are any constraints or pitfalls. I can't think of any, but I recommend testing this yourself.

However, by default there is a preview URL available for each domain. Which functions as an alternative access URL to the domain. The preview URL can be customize via Tools & Settings > Website Preview. Perhaps this fulfills your need as well. A drawback of the preview URL however is that secured connections aren't supported.

As for related API calls/methods, you can use the /cli endpoint of the REST API to run any of the supported Plesk CLI commands. Including the subscription utility, which allows you to rename a subscription domain. Have a look at the REST API playground on your server for examples of the /cli endpoint.
 
Back
Top