CSVImport
Email Accounts
Import email accounts from CSV file
This function imports email accounts from an already uploaded CSV file.
get/CSVImport/doimport
Query parameters
domainstring domain required
Example:example.com
The domain under which to add the email accounts.
idstring required
Example:Leq58oid3sF3Moye3_YbJGqoMvCb7M4j
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.
type'email' | 'fwd' required
Example:email
The type of email address to add.
- email — A regular email account.
- fwd — A forwarder.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "doimport",
"module": "CSVImport",
"result": {
"data": {
"results": [
{
"email": "j.doe@example.com",
"reason": "OK",
"status": 1,
"type": "email"
},
{
"email": "jdoe@example.com",
"reason": "The account jdoe@example.com already exists!",
"status": 0,
"type": "email"
}
]
},
"errors": [
"1 error(s) were encountered while importing accounts."
]
}
}