cPanel/CSVImport
cPanel module

CSVImport

1 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="CSVImport", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

doimport GET#

Import email accounts from CSV file

This function imports email accounts from an already uploaded CSV file.

domainstringRequired
The domain under which to add the email accounts.
idstringRequired
The unique ID of the import operation. The cPanel API 2 CSVImport::uploadimport function generates this ID and stores it in the CPVAR attribute named csvimportid.
typestringRequired
The type of email address to add. email — A regular email account. fwd — A forwarder.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

resultsarray<object>
The results for each attempted add operation.
emailstring
The email address or forwarder.
fwdstring
The destination of the forwarder (if applicable).
reasonstring
The explanation of the outcome for each operation.
statusinteger
The outcome of each operation. 1 — Success. 0 — Failed.
One of: 0 1
typestring
The type of email address. email — A regular email account. fwd — A forwarder.
One of: email fwd