DirectAdmin API and Workflow Customization: A Complete Guide to Custom Items, Widgets, Skins, and Building Specialized Packages

This article provides a comprehensive guide to the DirectAdmin API and the full customization ecosystem available within DirectAdmin. It covers API usage, custom domain and package items, admin restricted restore behavior, widget control, skin customization, plugin permissions, and how to combine these features to build specialized packages such as an “E Mail Only” plan. All examples, paths, and scripts are included for practical implementation.

DirectAdmin APIcustom package items, feature setswidget control, skin customization, email-only package

~3 min read • Updated Mar 1, 2026

1. Understanding the DirectAdmin API


The DirectAdmin API allows your scripts—local or remote—to communicate with DirectAdmin and perform tasks programmatically. API calls behave like browser requests, sending data in the same format, but CMD_API responses are structured and machine readable.


Note: Not all CMD_API commands are listed in api.html. You must search the version system for the full list.


---

2. Custom Domain and Package Items


Custom items allow you to add new configurable options to User/Reseller packages or domains. These items can be any standard input type (text, checkbox, listbox, etc.).


Where values are stored:


  • user.conf and reseller.conf — for package items
  • domain.com.conf — for domain items

These custom values can be used inside hook scripts such as:


  • user_create_post.sh
  • user_modify_post.sh
  • domain_create_post.sh

This allows you to automate actions based on the selected custom options.


---

3. Limiting Custom Item Restore to Admin Level


Inside:


/usr/local/directadmin/data/admin/custom_domain_items.conf

You can append:


&admin_restore_only=yes

This ensures that during a restore:


  • If restore is done at Admin Level → the custom item is restored
  • If restore is done at User or Reseller Level → the item is ignored

---

4. Custom Widgets per User or Reseller


DirectAdmin allows widget visibility control via user.conf and reseller.conf.


Available options:


  • widgets=ON — all widgets enabled (default)
  • widgets=OFF — all widgets disabled
  • widgets=ON:WGT_DB|WGT_PLUGINS_HELLO_WORLD — only these widgets enabled
  • widgets=OFF:WGT_DB — only this widget disabled

This feature is not yet exposed in the UI, but can be controlled using custom package items.


---

5. Skin Customization


5.1 Customizing Evolution via the UI


Use the “Customize Evolution Skin” feature in the panel. All changes are stored in:


/usr/local/directadmin/data/users/{username}/skin_customizations/evolution

5.2 Creating a custom skin.conf


Evolution uses a default skin.conf located at:


/usr/local/directadmin/data/skins/evolution/skin.conf

You can override specific values by creating:


/usr/local/directadmin/data/users/CREATOR/skin_customizations/evolution/skin.conf

Example: limiting widgets:


user_widgets=WGT_DB|WGT_EMAIL

Only the overridden lines are needed; no need to copy the entire file.


5.3 Creating a custom skin manually


cd /usr/local/directadmin/data/skins
cp -Rp enhanced yourskin

Skins support embedded scripting (PHP, Perl, etc.) and conditional logic.


---

6. General DirectAdmin Options


DirectAdmin includes hundreds of configuration options. Always document any changes you make to directadmin.conf so you can revert them if needed.


---

7. Combining Features to Build an “E Mail Only” Package


This example shows how to combine custom package items, hook scripts, and command restrictions to create a specialized package.


7.1 Create a custom package item


File:


/usr/local/directadmin/data/admin/custom_package_items.conf

Content:


account_allow=type=listbox&item1txt=All Features&item1val=all&item2txt=E-Mail Only&item2val=email&string=Select Featureset&desc=Ability to select core features&default=all

7.2 Create user_create_post.sh hook


#!/bin/sh
CA=/usr/local/directadmin/data/users/$username/commands.allow
if [ "${account_allow}" = "email" ]; then
      cp -f /root/allows/email.list $CA
fi
if [ "${account_allow}" = "" ] || [ "${account_allow}" = "all" ]; then
       rm -f $CA
fi
exit 0;

Make executable:


chmod 755 /usr/local/directadmin/scripts/custom/user_create_post.sh

7.3 Create email.list


This file contains all email related commands:


CMD_EMAIL_POP
CMD_EMAIL_FORWARDER
CMD_EMAIL_LIST
CMD_EMAIL_AUTORESPONDER
CMD_EMAIL_VACATION
CMD_EMAIL_USAGE
CMD_WEBMAIL_LOGIN
CMD_PASSWD
CMD_LOGIN
CMD_LOGOUT
CMD_USER_STATS
CMD_USER_HISTORY
CMD_TICKET
CMD_TICKET_CREATE
CMD_WIDGET
...

7.4 Apply same logic to user_modify_post.sh


cd /usr/local/directadmin/scripts/custom
ln -s user_create_post.sh user_modify_post.sh

Now the “E Mail Only” package is fully functional. You may also want to set related limits to zero (e.g., 0 databases, 0 FTP accounts).


Written & researched by Dr. Shahin Siami