Legacy API

More custom CMD_API_ commands can be added upon request.

Most new CMD_API_ calls are only listed in the versions system, which can be searched please check the versions system if it's not listed below.

DirectAdmin Uses port 2222 which may or may not be secure (SSL). The default is not, so if you need to chose one, chose non SSL. Authentication is basic web authentication using base64 encryption of "username:password"

The values "ON or OFF" generally indicate a checkbox, so if the checkbox is not checked, the name will not be passed and OFF is assumed. If a checkbox value is to be OFF, then the variable should not be passed at all.

A return value of Text means that a website will be returned with text showing the result. If the return value is Location, then a Location header will be returned as a redirect to send the client to a new page. If return value is url encoded, a url encoded string is returned after the DirectAdmin Headers. If its a list, it'll be in the list[] array. Use "unhtmlentities()" then "parse_str()" with PHP to get the values. This is the code I use for decoding with all API testing: http://help.directadmin.com/item.php?id=204

You MUST have the proper permissions with your account in order use the API. For example, a User cannot get the list of all the Users on the server, only an Admin can.

Endpoints

Creating Accounts

Create Admin:
FunctionTo create a new admin account
CommandCMD_ACCOUNT_ADMIN
MethodGET or POST
Success ReturnsText
Failure ReturnsText
Form Values:
NameValue
actioncreate
usernameThe Admin's username. 4-8 characters, alphanumeric
emailA valid email address
passwdThe admins password. 5+ characters, ascii
passwd2Password double check. 5+ characters, ascii
notifyyes or no. If yes, an email will be sent to email
Create Admin:
FunctionTo create a new admin account. Exactly the same as CMD_ACCOUNT_ADMIN except return value
CommandCMD_API_ACCOUNT_ADMIN
MethodGET or POST
Success Returnserror=0&text=text&details=details
Failure Returnserror=1&text=text&details=details
Create Reseller:
FunctionTo create a new reseller account using a pre-made package
CommandCMD_ACCOUNT_RESELLER
MethodGET or POST
Success ReturnsText
Failure ReturnsText
Form Values:
NameValue
actioncreate
addSubmit
usernameThe Reseller's username. 4-8 characters, alphanumeric
emailA valid email address
passwdThe admins password. 5+ characters, ascii
passwd2Password double check. 5+ characters, ascii
domainA valid domain name in the form: domain.com
packageOne of the Reseller packages created by an admin
ipshared, sharedreseller or assign. If shared, domain will use the server's main ip. assign will use one of the reseller's ips. sharedreseller will set the resellers ip to shared and assign the reseller to it.
notifyyes or no. If yes, an email will be sent to email
Create Custom Reseller:
FunctionTo create a new reseller account without the need for a reseller package
CommandCMD_ACCOUNT_RESELLER
MethodGET or POST
Success ReturnsText
Failure ReturnsText
Form Values:
NameValue
actioncreate
addSubmit
usernameThe Reseller's username. 4-8 characters, alphanumeric
emailA valid email address
passwdThe admins password. 5+ characters, ascii
passwd2Password double check. 5+ characters, ascii
domainA valid domain name in the form: domain.com
bandwidthAmount of bandwidth Reseller will be allowed to use. Number, in Megabytes
ubandwidthON or OFF. If ON, bandwidth is ignored and no limit is set
quotaAmount of disk space Reseller will be allowed to use. Number, in Megabytes
uquotaON or OFF. If ON, quota is ignored and no limit is set
vdomainsNumber of domains the reseller and his/her User's are allowed to create
uvdomainsON or OFF. If ON, vdomains is ignored and no limit is set
nsubdomainsNumber of subdomains the reseller and his/her User's are allowed to create
unsubdomainsON or OFF. If ON, nsubdomains is ignored and no limit is set
ipsNumber of ips that will be allocated to the Reseller upon account during account
nemailsNumber of pop accounts the reseller and his/her User's are allowed to create
unemailsON or OFF Unlimited option for nemails
nemailfNumber of forwarders the reseller and his/her User's are allowed to create
unemailfON or OFF Unlimited option for nemailf
nemailmlNumber of mailing lists the reseller and his/her User's are allowed to create
unemailmlON or OFF Unlimited option for nemailml
nemailrNumber of autoresponders the reseller and his/her User's are allowed to create
unemailrON or OFF Unlimited option for nemailr
mysqlNumber of MySQL databases the reseller and his/her User's are allowed to create
umysqlON or OFF Unlimited option for mysql
domainptrNumber of domain pointers the reseller and his/her User's are allowed to create
udomainptrON or OFF Unlimited option for domainptr
ftpNumber of ftp accounts the reseller and his/her User's are allowed to create
uftpON or OFF Unlimited option for ftp
aftpON or OFF If ON, the reseller and his/her users will be able to have anonymous ftp accounts.
phpON or OFF If ON, the reseller and his/her users will have the ability to run php scripts.
cgiON or OFF If ON, the reseller and his/her users will have the ability to run cgi scripts in their cgi-bins.
sslON or OFF If ON, the reseller and his/her users will have the ability to access their websites through secure https://.
sshON or OFF If ON, the reseller will be have an ssh account.
usersshON or OFF If ON, the reseller will be allowed to create ssh accounts for his/her users.
dnscontrolON or OFF If ON, the reseller will be able to modify his/her dns records and to create users with or without this option.
dnsOFF or TWO or THREE. If OFF, no dns's will be created. TWO: domain ip for ns1 and another ip for ns2. THREE: domain has own ip. ns1 and ns2 have their own ips
serveripON or OFF If ON, the reseller will have the ability to create users using the servers main ip.
ipshared or assign. If shared, domain will use the server's main ip. assign will use one of the reseller's ips
notifyyes or no. If yes, an email will be sent to email
Create Reseller:
FunctionTo create a new reseller account. Exactly the same as CMD_ACCOUNT_RESELLER except return value
CommandCMD_API_ACCOUNT_RESELLER
MethodGET or POST
Success Returnserror=0&text=text&details=details
Failure Returnserror=1&text=text&details=details
Create User:
FunctionTo create a new user account using a pre-made package
CommandCMD_API_ACCOUNT_USER
MethodGET or POST
Success ReturnsText
Failure ReturnsText
Form Values:
NameValue
actioncreate
addSubmit
usernameThe User's username. 4-8 characters, alphanumeric
emailA valid email address
passwdThe User's password. 5+ characters, ascii
passwd2Password double check. 5+ characters, ascii
domainA valid domain name in the form: domain.com
packageOne of the User packages created by the Reseller
ipOne of the ips which is available for user creation. Only free or shared ips are allowed.
notifyyes or no. If yes, an email will be sent to email
Create Custom User:
FunctionTo create a new user account without the need for a user package
CommandCMD_API_ACCOUNT_USER
MethodGET or POST
Success ReturnsText
Failure ReturnsText
Form Values:
NameValue
actioncreate
addSubmit
usernameThe Users's username. 4-8 characters, alphanumeric
emailA valid email address
passwdThe User's password. 5+ characters, ascii
passwd2Password double check. 5+ characters, ascii
domainA valid domain name in the form: domain.com
bandwidthAmount of bandwidth User will be allowed to use. Number, in Megabytes
ubandwidthON or OFF. If ON, bandwidth is ignored and no limit is set
quotaAmount of disk space User will be allowed to use. Number, in Megabytes
uquotaON or OFF. If ON, quota is ignored and no limit is set
inodeInode limit for the User Number, positive integer
uinodeON or OFF. If ON, inode is ignored and no limit is set
vdomainsNumber of domains the User will be allowed to create
uvdomainsON or OFF. If ON, vdomains is ignored and no limit is set
nsubdomainsNumber of subdomains the User will be allowed to create
unsubdomainsON or OFF. If ON, nsubdomains is ignored and no limit is set
nemailsNumber of pop accounts the User will be allowed to create
unemailsON or OFF Unlimited option for nemails
nemailfNumber of forwarders the User will be allowed to create
unemailfON or OFF Unlimited option for nemailf
nemailmlNumber of mailing lists the User will be allowed to create
unemailmlON or OFF Unlimited option for nemailml
nemailrNumber of autoresponders the User will be allowed to create
unemailrON or OFF Unlimited option for nemailr
mysqlNumber of MySQL databases the User will be allowed to create
umysqlON or OFF Unlimited option for mysql
domainptrNumber of domain pointers the User will be allowed to create
udomainptrON or OFF Unlimited option for domainptr
ftpNumber of ftp accounts the User will be allowed to create
uftpON or OFF Unlimited option for ftp
aftpON or OFF If ON, the User will be able to have anonymous ftp accounts.
cgiON or OFF If ON, the User will have the ability to run cgi scripts in their cgi-bin.
phpON or OFF If ON, the User will have the ability to run php scripts.
spamON or OFF If ON, the User will have the ability to run scan email with SpamAssassin.
cronON or OFF If ON, the User will have the ability to creat cronjobs.
catchallON or OFF If ON, the User will have the ability to enable and customize a catch-all email (*@domain.com).
sslON or OFF If ON, the User will have the ability to access their websites through secure https://.
sshON or OFF If ON, the User will have an ssh account.
sysinfoON or OFF If ON, the User will have access to a page that shows the system information.
login_keysON or OFF If ON, the User will have access to the Login Key system for extra account passwords.
dnscontrolON or OFF If ON, the User will be able to modify his/her dns records.
suspend_at_limitON or OFF If ON, the User will be suspended if their User bandwidth limit is exceeded.
skinevolution or enhanced, etc. The skin the User will use (optional).
languageen or other if installed. The language the User will use (optional).
ipOne of the ips which is available for user creation. Only free or shared ips are allowed. See "Getting List of IPs and IP info" for the list of ips allowed here
notifyyes or no. If yes, an email will be sent to email
Create User:
FunctionTo create a new User account. Exactly the same as CMD_ACCOUNT_USER except return value
CommandCMD_API_ACCOUNT_USER
MethodGET or POST
Success Returnserror=0&text=text&details=details
Failure Returnserror=1&text=text&details=details

Get Reseller's List of IP and IP information

Get List of IPs and get IP info:
FunctionTo get the list of IPs currently owned by this reseller. If value ip is passed, information about that IP is returned instead
CommandCMD_API_SHOW_RESELLER_IPS
MethodGET or POST
Success Returnsurl encoded array in list[] OR url encoded string
Failure Returnserror=1
Form Values:
NameValue
( ip )Optional. If passed, info about the ip is generated. If not, the list of IPs is generated in the list[]. Information includes: ns: if a nameserver is on this ip, it will be listed here, reseller: if allocated to a reseller, their username will be here , status: "server" (server's ip) "owned" or "free", value:if owned, the user who owns it, else the # of users using it

Deleting Accounts

Deleting *ANY* usertype:
FunctionTo delete an Admin, a Reseller, or a User
CommandCMD_API_SELECT_USERS
MethodPOST
Success ReturnsText
Failure ReturnsText
Form Values:
NameValue
confirmedConfirm
deleteyes
select0The name of the admin/reseller/user
( select1 ...)The name of the admin/reseller/user. Not required, but you can keep adding more users by increasing the number (select2, select3, etc..)

Suspending/Activating Accounts

Suspending/Activating *ANY* usertype:
FunctionTo suspend an Admin, a Reseller, or a User, or activate if they are already suspended
New API set for this: http://www.directadmin.com/features.php?id=807
CommandCMD_API_SELECT_USERS
MethodPOST
Success ReturnsLocation of location
Failure ReturnsText
Form Values:
NameValue
locationCMD_ADMIN_SHOW or CMD_RESELLER_SHOW or CMD_SELECT_USERS. Tells DirectAdmin where to return to after its done
suspendSuspend/Unsuspend
select0The name of the admin/reseller/user
( select1 ...)The name of the admin/reseller/user. Not required, but you can keep adding more users by increasing the number (select2, select3, etc..)

Listing User Accounts

Get List of Users owned by Reseller:
FunctionTo get the list of Users currently owned by this reseller. If value reseller is passed, the list of Users created by that Reseller will be shown instead
CommandCMD_API_SHOW_USERS
MethodGET or POST
Success Returnsurl encoded array in list[]
Failure Returnserror=1
Form Values:
NameValue
( reseller )Optional. If passed, the list of Users created by the Reseller identified by reseller will be given. Else, the list of Users created by the Reseller calling the function will be produced

Listing Reseller accounts

Get List of Resellers on server:
FunctionTo get the list of Resellers currently on the server.
CommandCMD_API_SHOW_RESELLERS
MethodGET or POST
Success Returnsurl encoded array in list[]
Failure Returnserror=1

Listing Admin accounts

Get List of Admins on server:
FunctionTo get the list of Admins currently on the server.
CommandCMD_API_SHOW_ADMINS
MethodGET or POST
Success Returnsurl encoded array in list[]
Failure Returnserror=1

Get List of all Users on server

Get List of Users owned by Reseller:
FunctionTo get the list of all the Users currently on the server.
CommandCMD_API_SHOW_ALL_USERS
MethodGET or POST
Success Returnsurl encoded array in list[]
Failure Returnserror=1

Modifying Accounts

Save User Email:
FunctionTo allow a user to change his/her email for their account. This is their account email and does not modify their ticket/messaging system email
CommandCMD_API_CHANGE_INFO
MethodPOST
Success ReturnsLocation with the users stats screen: CMD_USER_STATS
Form Values:
NameValue
evalueA valid email address
domainAny domain in the users account. Its only purpose it to provide a return link to that domain's stats page
emailSave. Used to determine what value is being saved. With email being passed, DirectAdmin will know its supposed to be saving an email
Save User Email for Ticket/Messaging system:
FunctionTo allow a user to change his/her email for the message/ticket system. This email address is the one that will be used when tickets or messages are sent back and forth
CommandCMD_API_TICKET
MethodPOST
Success ReturnsLocation of the messaging system: CMD_TICKET
Failure ReturnsText
Form Values:
NameValue
emailA valid email address
ONyes or no this is a checkbox to tell the ticket system if it should send an email out for each message.
saveSave. Button for the form (not actually required)
Modify User Settings:
FunctionTo allow a reseller to update the settings of one of his/her users
CommandCMD_API_MODIFY_USER
MethodPOST
Success ReturnsLocation: CMD_USER_SHOW
Failure ReturnsText
Form Values:
NameValue
actioncustomize
userthe username of the User to be modified
bandwidthAmount of bandwidth User will be allowed to use. Number, in Megabytes
ubandwidthON or OFF. If ON, bandwidth is ignored and no limit is set
quotaAmount of disk space User will be allowed to use. Number, in Megabytes
uquotaON or OFF. If ON, quota is ignored and no limit is set
vdomainsNumber of domains the User will be allowed to create
uvdomainsON or OFF. If ON, vdomains is ignored and no limit is set
nsubdomainsNumber of subdomains the User will be allowed to create
unsubdomainsON or OFF. If ON, nsubdomains is ignored and no limit is set
nemailsNumber of pop accounts the User will be allowed to create
unemailsON or OFF Unlimited option for nemails
nemailfNumber of forwarders the User will be allowed to create
unemailfON or OFF Unlimited option for nemailf
nemailmlNumber of mailing lists the User will be allowed to create
unemailmlON or OFF Unlimited option for nemailml
nemailrNumber of autoresponders the User will be allowed to create
unemailrON or OFF Unlimited option for nemailr
mysqlNumber of MySQL databases the User will be allowed to create
umysqlON or OFF Unlimited option for mysql
domainptrNumber of domain pointers the User will be allowed to create
udomainptrON or OFF Unlimited option for domainptr
ftpNumber of ftp accounts the User will be allowed to create
uftpON or OFF Unlimited option for ftp
aftpON or OFF If ON, the User will be able to have anonymous ftp accounts.
cgiON or OFF If ON, the User will have the ability to run cgi scripts in their cgi-bin.
phpON or OFF If ON, the User will have the ability to run php scripts.
spamON or OFF If ON, the User will have the ability to turn on spamassassin.
cronON or OFF If ON, the User will have the ability to run cron jobs
sslON or OFF If ON, the User will have the ability to access their websites through secure https://.
sysinfoON or OFF If ON, the User will have the ability to view the system information page.
sshON or OFF If ON, the User will have an ssh account.
dnscontrolON or OFF If ON, the User will be able to modify his/her dns records.
skinSkin name that the user will use. Selected from the Resellers list of skins. If the skin doesn't exist or is invalid, it will not be changed
ns1Name server 1 that the user will use. Will remove the old one and replace it with this one
ns2Name server 2 that the user will use. Will remove the old one and replace it with this one

Server Information

Get Server Statistics:
FunctionGet all server statistics and usages
CommandCMD_API_ADMIN_STATS
MethodGET
Success Returnsurl encoded array
Failure Returnserror=1
Form Values:
NameValue
RXNumber of megabytes currently received through the adaptor with units, as returned by 'ifconfig'. eg. 1045.4 Mb
TXNumber of megabytes currently sent through the adaptor with units, as returned by 'ifconfig'. eg. 5345.4 Mb
bandwidthNumber of megabytes sent and recorded by DirectAdmin
quotaNumber of megabytes of disk space used by users as recorded by DirectAdmin
disk1Disk Usage as returned by 'df'. Stored in a colon separated list. eg: /dev/hda6:381139:276138:85323:77%:/ Where data is: Filesystem:1k-blocks:Used:Available:Use%:Mounted on
( disk2 ... )Repeat of disk1, with one disk# for each partition.
domainptrNumber of domain pointers on the server
ftpNumber of ftp accounts on the server
mysqlNumber of databases on the server
nemailfNumber of email forwarders on the server
nemailmlNumber of mailing lists on the server
nemailrNumber of autoresponders on the server
nemailsNumber of pop accounts on the server
nresellersNumber of resellers on the server
nsubdomainsNumber of subdomains on the server
nusersNumber of users on the server
vdomainsNumber of virtual domains on the server
Get User Usage:
FunctionRetrieve the user's usages
CommandCMD_API_SHOW_USER_USAGE
MethodGET
Success Returnsurl encoded array
Failure Returnserror=1
Form Values:
NameValue
userUsername of the user for which you wish to view the stats
Array Returns Values
NameValue
bandwidthNumber of megabytes sent by the user
quotaNumber of megabytes of disk space used by the user
domainptrNumber of domain pointers used
ftpNumber of ftp accounts used
mysqlNumber of databases used
nemailfNumber of email forwarders used
nemailmlNumber of mailing lists used
nemailrNumber of autoresponders used
nemailsNumber of pop accounts used
nsubdomainsNumber of subdomains used
vdomainsNumber of virtual domains used
Get User Limits and Configurations:
FunctionRetrieve the user's upper limits and settings that defines their account
CommandCMD_API_SHOW_USER_CONFIG
MethodGET
Success Returnsurl encoded array
Failure Returnserror=1
Form Values:
NameValue
userUsername of the user for which you wish to view the stats
Array Returns Values
NameValue
accountOne of ON or OFF. Used to determine the state of an account. Manually suspendig a user will set this to off. Automatic suspensions will not.
additional_bandwidthNumber of extra meg User is allowed to use this month.
aftpOne of ON or OFF. Used to determine if the user can have an anonymous ftp account
catchallOne of ON or OFF. Used to determine if the user can have a catch-all address
cgiOne of ON or OFF. Used to determine if the user can have a cgi-bin
creatorname of the account used to create this user
cronOne of ON or OFF. Used to determine if the user can have cronjobs
date_createdDate the User was created. May not exist on older accounts.
dnscontrolOne of ON or OFF. Used to determine if the user is allowed to modify their dns records
docsrootlocal path (relative to /usr/local/directadmin) to the user's current selected skin
domainThe main domain for the user. Will be the domain included when the account was created
emailThe current email account, as set by the user. Note that this may differ from the email set in their messaging system
ipCurrent ip assigned to the user
languageCurrent language assigned to the user
lastquotaupdateUnix timestamp of when the User click the Update button for their disk usage
login_keysOne of ON or OFF. Used to determine if the user can create Login Keys
ns1 and ns2Current nameservers assigned to the user
packagePackage used to create the user. Will be custom if their settings were modified.
sentwarningTo determine if the usage warning email has already been sent out
skinName of the user's current skin
spamOne of ON or OFF. Does the user have access to enable SpamAssassin
sshOne of ON or OFF. Does the user have ssh
sslOne of ON or OFF. Does the user have ssl
suspend_at_limitOne of ON or OFF. Will the user be suspended at his bandwidth limit
suspendedOne of yes or no. Is the user currently suspended.
sysinfoOne of ON or OFF. Does the user have access to view the System Information page
usernameThe username of the username.
usertypeOne of user, reseller or admin. Type of user account
zoomDepreciated setting where you can set the permanent ZOOM token. Will set the webpage to be zoomed at this level
bandwidthMaximum number of megabytes allowed by the user
quotaMaximum megabytes of disk space allowed by the user
domainptrNumber of domain pointers allowed
ftpNumber of ftp accounts allowed
mysqlNumber of databases allowed
nemailfNumber of email forwarders allowed
nemailmlNumber of mailing lists allowed
nemailrNumber of autoresponders allowed
nemailsNumber of pop accounts allowed
nsubdomainsNumber of subdomains allowed
vdomainsNumber of virtual domains allowed
Get User Domains:
FunctionRetrieve the list of domains owned by the user, and some basic stats
CommandCMD_API_SHOW_USER_DOMAINS
MethodGET
Success Returnsurl encoded array
Failure Returnserror=1
Form Values:
NameValue
userUsername of the user for which you wish to view the stats
Array Returns Values
NameValue
domain.comColon speparated list with domain information: eg. 6757.4:unlimited:0.000356674:93.5:2:no:unlimited:ON:ON:ON where the data is bandwidth used:bandwidth limit:disk usage for the domain:log usage for the domain:# of subdomains:suspended:quota:ssl:cgi:php
( domain2.com ... )Same as domain.com, one entry for each domain

Reseller and User Packages

Show Reseller Packages:
FunctionShows the list of available Reseller Packages
CommandCMD_API_PACKAGES_RESELLER
MethodGET
Success Returnsurl encoded array
Failure Returnsempty array (nothing)
Show a Reseller Package:
FunctionShows a specific Reseller Package
CommandCMD_API_PACKAGES_RESELLER
MethodGET
Success Returnsurl encoded array
Failure Returnsempty array (nothing)
Form Values:
NameValue
packagename of the package to be viewed
Array Returns Values
NameValue
aftpOFF or ON, Allowed to give out anonymous ftp
cgiOFF or ON, Allowed to give out cgi-bin's
dnsOFF,TWO or THREE, Method of setting up dns for the reseller. Off, two ips, or three ips, with ns1 and 2 on the last 2 ips.
dnscontrolOFF or ON, Allowed to give Users Access to their dns panel
bandwidthunlimited or number in megabytes
domainptrunlimited or quantity
ftpunlimited or quantity
ips0 and up
mysqlunlimited or quantity
ftpunlimited or quantity
nemailfunlimited or quantity
nemailmlunlimited or quantity
nemailrunlimited or quantity
nemailsunlimited or quantity
nsubdomainsunlimited or quantity
quotaunlimited or number in megabytes
serveripOFF or ON, Allowed to use the server ip for his users
sshOFF or ON, Allowed to have ssh access
usersshOFF or ON, Allowed to give out ssh access to his users
sslOFF or ON, Allowed to give out https ssl
vdomainsunlimited or quantity of domains
Show User Packages:
FunctionShows the list of available User Packages
CommandCMD_API_PACKAGES_USER
MethodGET
Success Returnsurl encoded array
Failure Returnsempty array (nothing)
Show a User Package:
FunctionShows a specific User Package
CommandCMD_API_PACKAGES_USER
MethodGET
Success Returnsurl encoded array
Failure Returnsempty array (nothing)
Form Values:
NameValue
packagename of the package to be viewed
Array Returns Values
NameValue
aftpOFF or ON, Allowed to use anonymous ftp
cgiOFF or ON, Allowed to use cgi-bin's
dnscontrolOFF or ON, Allowed to use their dns panel
bandwidthunlimited or number in megabytes
domainptrunlimited or quantity
ftpunlimited or quantity
mysqlunlimited or quantity
namefull name of the user
nemailfunlimited or quantity
nemailmlunlimited or quantity
nemailrunlimited or quantity
nemailsunlimited or quantity
nsubdomainsunlimited or quantity
quotaunlimited or number in megabytes
skinSkin to be assigned
sshOFF or ON, Allowed to have ssh access
sslOFF or ON, Allowed to give out https ssl
vdomainsunlimited or quantity of domains
suspend_at_limitOFF or ON, To determine if the users account will be suspended when the bandwidth is used up

Sessions and Passwords

Get Session Information:
FunctionTo get session information including usertype and base64 encoded password
CommandCMD_API_GET_SESSION
MethodGET or POST
Success Returnsurl encoded array
Failure Returnserror=1
Form Values:
NameValue
ipThe IP address of the connected user. Must match the value in the session identified by session_id
session_idUsers session ID. Can be obtained via the "session" cookie, or the |SESSION_ID| token.
Array Returns Values
error0 or 1, To determine if it was successful or not
passwordBase64 encoded password, as stored in the session
usernameUsername of the user in that session
usertypeuser or reseller or admin, Type of the account the user has.

User APIs

List Domains:
FunctionTo list all of the domains for the current User account
CommandCMD_API_SHOW_DOMAINS
MethodGET or POST
Success Returnsurl encoded array in list[]
Failure ReturnsNothing to break here. No domains returns empty list
Create Domain:
FunctionTo create a domain under an existing User account
CommandCMD_API_DOMAIN
MethodPOST
Success Returnsurl encoded array
Failure Returnserror=1
Form Values:
NameValue
actioncreate
domaindomain.com
bandwidthinteger, in meg, eg 12345
ubandwidthunlimited If ubandwidth is passed, the bandwidth will be shared with the main account
quotainteger, in meg, eg 12345
uquotaunlimited If uquota is passed, the quota will be shared with the main account
sslON|OFF
cgiON|OFF
phpON|OFF
List Subdomains:
FunctionUsed to list all of the subdomains for a given domain
CommandCMD_API_SUBDOMAINS
MethodGET or POST
Success Returnsurl encoded array in list[]
Failure Returnserror=1 and url encoded String
Form Values:
NameValue
domainthe domain to be shown eg: domain.com
Create Subdomain:
FunctionUsed to create a subdomain for a given domain
CommandCMD_API_SUBDOMAINS
MethodGET or POST
Success Returnserror=0 and url encoded String
Failure Returnserror=1 and url encoded String
Form Values:
NameValue
domainthe domain to be shown eg: domain.com
actioncreate
subdomainthe name of the subdomain to be created
Delete Subdomain:
FunctionUsed to delete a list of subdomains for a given domain
CommandCMD_API_SUBDOMAINS
MethodGET or POST
Success Returnserror=0 and url encoded String
Failure Returnserror=1 and url encoded String
Form Values:
NameValue
domainthe domain to be shown eg: domain.com
actiondelete
select0 (select1, ...)the name of the subdomain to be deleted
contentsyes or no: if you want to remove the directory and contents.

Databases

List Databases:
FunctionUsed to list all of the databases
CommandCMD_API_DATABASES
MethodGET or POST
Success Returnsurl encoded array in list[]
Failure Returnserror=1 and url encoded String
Create Database:
FunctionUsed to create a database
CommandCMD_API_DATABASES
MethodGET or POST
Success Returnserror=0 and url encoded String
Failure Returnserror=1 and url encoded String
Form Values:
NameValue
actioncreate
namethe name of the database to be created (username_ will be added)
userthe name of the database user to be added (username_ will be added)
passwdpassword for username_user
passwd2password for username_user
Delete Databases:
FunctionUsed to delete a list of databases
CommandCMD_API_DATABASES
MethodGET or POST
Success Returnserror=0 and url encoded String
Failure Returnserror=1 and url encoded String
Form Values:
NameValue
actiondelete
select0 (select1, ...)the name of the database to be deleted

Email accounts and password changing

Set Virtual Email Password:
FunctionUsed to change an email password without requiring a DirectAdmin account (will not change system email account password)
CommandCMD_CHANGE_EMAIL_PASSWORD
MethodGET or POST
Success Returnsurl encoded array if api is passed. Else if redirect is passed, browser will be redirected there. Else a dynamic "success" page is shown.
Failure Returnsurl encoded array if api is passed. Else a dynamic "error" page is shown.
Form Values:
NameValue
emailvirtual pop account to be changed. This will not change the main system acccount email
oldpasswordPrevious password used for the email account
password1New password to be used
password2Re-type the new password to be used
( redirect )Optional redirect. Upon successful password change, the user will be forwarded here eg."/" or "http://redirect.com/site".
This value has no effect if api is passed
( api )yes (any value will work, only the inclusion of "api=" is checked)
Array Returns Values
NameValue
error0 or 1, To determine if it was successful or not
textsome text decribing the result
List Virtual POP Account:
FunctionUsed to list all of the pop accounts for a domain
CommandCMD_API_POP
MethodGET or POST
Success Returnsurl encoded array in list[]
Failure Returnserror=1 and url encoded String
Form Values:
NameValue
actionlist
domainthe domain to be shown eg: domain.com
Create a Virtual POP Account:
FunctionUsed to create a pop account for a domain
CommandCMD_API_POP
MethodGET or POST
Success Returnserror=0 and url encoded String
Failure Returnserror=1 and url encoded String
Form Values:
NameValue
actioncreate
domainthe domain to be shown eg: domain.com
useremail user eg: bob
passwdthe password for the account
passwd2password confirmation
quotaInteger in Megabytes. Zero for unlimited, 1+ for number of Megabytes.
limitSend Limit. Zero for unlimited. Blank defaults to the system's default.
Delete a Virtual POP Account:
FunctionUsed to delete a pop account for a domain
CommandCMD_API_POP
MethodGET or POST
Success Returnserror=0 and url encoded String
Failure Returnserror=1 and url encoded String
Form Values:
NameValue
actiondelete
domainthe domain to be shown eg: domain.com
useremail user eg: bob
Last Updated: