πŸ“Š
Plesk

Using the Plesk API for Automation

πŸ“… 8 October 2026 ✏️ 8 October 2026 ⏱ 4 min leestijd

Learn how to use the Plesk API to automate domains, email, and accounts, including authentication, code examples, and practical tips.

The Plesk API makes it possible to automate tasks in your hosting environment without manually opening the control panel. Think of creating domains, email accounts, or backups via scripts. In this article you’ll learn how to create an API token, how to make your first calls, and which practical automations you can apply right away.

What is the Plesk API

The Plesk API offers programmatic access to virtually all functions of the control panel: creating domains, configuring subdomains, managing email accounts, triggering backups, and more. Instead of performing every action through the interface, you send an HTTP request that Plesk processes directly.

This is especially valuable if you manage many customers or domains: new accounts can be created automatically as soon as an order comes in, email addresses are set up immediately, and your own systems can communicate directly with Plesk. The result is less manual work, fewer errors, and processes that scale along with your customer base.

Your scriptPlesk APIDomainsEmailAccounts

Authentication and getting started

Before you can use the API, you create an API token in your Plesk environment. You then send this token along with every call for authentication.

1

Create an API token

Log in to your Plesk panel, go to your profile, and open the API Tokens section. Click “New token” and copy the generated value immediately, since you won’t be able to see it again later.

2

Test the connection

Send a first request with curl: curl -H "X-API-Key: YourToken" https://your-server.com:8443/api/v1/domains. If you get a list of domains back, the connection works.

3

Set up your development environment

Use a REST client such as Postman to test requests, then write scripts in, for example, Python, PHP, or Node.js for structural automation.

πŸ’‘ Tip: Never hardcode your API token in your code. Store it in an environment variable and rotate the token regularly.

Practical automation examples

A few concrete applications you can start with right away:

Automatically create a domain: with a POST request to /api/v1/domains and a body containing, among other things, the domain name and admin ID, you set up a new domain without opening the panel. Useful if you register domain names yourself and want to link them directly, see also domain names.

Managing email accounts: via /api/v1/mail/mailboxes you automatically create mailboxes as soon as a new customer or employee is added. This fits well with business email with correct SPF, DKIM, and DMARC settings.

Triggering backups: you can start or manage scheduled backups via the backup endpoints, so your own system keeps track of when a backup has succeeded.

Webhooks and monitoring: link your own system to events in Plesk, such as a deleted domain or a subscription upgrade, so you can respond immediately without manual checking.

Security and token management

Since an API token can grant full access to your hosting environment, careful management is important. Only give tokens the permissions they need, use separate tokens per system or integration, and remove tokens that are no longer in use. Periodically check which tokens are active via your profile in Plesk.

If you get stuck setting up an integration, you’ll find more background articles in the knowledge base. If you’re considering switching to a provider where Plesk is available by default on all servers, check out the options to switch to Tandata.

Frequently Asked Questions

Is the Plesk API secure?

Yes, the API works via HTTPS and token-based authentication. Just make sure you store your tokens securely and only grant the necessary permissions.

Which programming languages can I use?

Any language that can send HTTP requests works, such as Python, PHP, Node.js, or Java. The API is not bound to a single language.

Can I also automate backups?

Yes, you can start and manage backups via the API’s backup endpoints, allowing this process to run fully automated.

Are there limits on the number of API calls?

This may vary depending on the Plesk version and configuration. Consult the official Plesk documentation for the current situation in your environment.

Does the Plesk API work on every hosting environment?

The API is available as soon as Plesk is installed on the server. Check with your provider whether Plesk is included by default with the web hosting.

Conclusion

With the Plesk API, you automate repetitive tasks such as creating domains, email accounts, and backups, without constantly opening the control panel. Start with a well-secured API token, test simple requests, and then build scripts step by step that support your workflows.

View web hosting β†’

Was dit artikel nuttig?