Skip to content

Cookie settings

Choose which kinds of cookies you allow. You can change your choice at any time via Cookie settings at the bottom of every page. Privacy statement

Necessary

Always on

Needed to log in, keep your cart and remember your choices. These are always on.

Which cookies?
  • weboke_sessie, weboke_klant, weboke_remember: your session and staying logged in
  • weboke_basket: your cart
  • wkBtwIncl: showing prices with or without VAT
  • wok_cookies: your cookie choice, 12 months

Measures which ad leads to a visit or order, so we do not pay for ads that do nothing.

Which cookies?
  • Google Ads via Google Tag Manager (_gcl_au, _gcl_aw), up to 90 days
  • OpenAI Ads, ads in ChatGPT
  • wok_aff: which partner referred you to us (affiliate programme), 60 days

4.6

Country and language

Each country has its own site, with prices and VAT for that country.

View

Using the DirectAdmin API: manage your package with scripts

DirectAdmin has an API: a way to manage your package with a script or program instead of with the mouse. Almost everything you do in the panel can also be done through the API. Think of updating a DNS record when your IP address at home changes, creating mailboxes from your own software or requesting a list of your databases every night.

Can I use the API with my package?

Yes. The API works with every package that includes DirectAdmin: all web hosting packages and the email packages too. Resellers can also use it to manage their own customers' accounts. You don't need to request anything and it costs nothing extra.

A script has exactly the same permissions as you have in DirectAdmin. So it can only access your own package, and only the things your package allows.

How it works

  • Address: you talk to the API at the same place where you log in: https://servernaam:2222. You can find your server name in My WebOké at the package under Manage. Always use the server name and not your own domain name with :2222, because then your script will get a certificate error. Read How we protect DirectAdmin.
  • Two kinds of commands: the new API, with addresses starting with /api/ and responses in JSON, and the older API with commands like /CMD_API_.... Start with the new API. Anything that isn't in it yet can be found in the old API. Add ?json=yes there to get a response in JSON.
  • Logging in: every command sends your DA username and a password along (HTTP Basic authentication). Preferably use a login key for this and not your real DA password, see below.
  • Documentation in your own panel: in DirectAdmin you'll find the API Documentation under Support & Help. There you can see all commands of the new API and try them out right away with your own account.

An example

With this command you request the databases of your package. Replace gebruiker (your username), sleutel (your key) and servernaam (your server name) with your own details:

curl -u 'gebruiker:sleutel' https://servernaam:2222/api/db-show/databases

You'll get a list in JSON back. It works the same way from PHP, Python or any other language that can request a web address.

Working safely with a login key

Never give a script your regular DA password. Create a separate key in DirectAdmin under Login Keys. You can restrict such a key:

  • to only the commands the script really needs;
  • to only the IP address of the computer or server where the script runs;
  • with an expiry date, if you only need access for a short while.

In any case, exclude the commands CMD_LOGIN_KEYS and CMD_PASSWD, so the key can't create new keys and can't change your password. If the key does leak, you delete it and create a new one, without having to change your password.

How to create a key is explained step by step in the DirectAdmin manual: Login Keys: logging in for scripts and programs.

Good to know

  • If a script often tries to log in with a wrong password or a wrong key, our firewall blocks that IP address. Check Am I blocked? if your script suddenly can't connect anymore.
  • We're happy to help if the API itself isn't working, but we don't write or review your own scripts. Use the DirectAdmin documentation below for that.
  • Would you rather manage your hosting with Claude, ChatGPT or Mistral, without programming yourself? Then take a look at our MCP server for AI.

DirectAdmin documentation

The DirectAdmin documentation is in English:

See also in the DirectAdmin manual: Finding your server name and DA username.

Was this article helpful?

← Back to DirectAdmin and WebOké control panel

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…