cPanel WHM icon

cPanel WHM

Full cPanel WHM API — all 622 operations across Accounts, DNS, Mail, SSL, Backups, Databases and more

Actions262

Account → Return cPanel accounts

AI-generated

Summary

Retrieve a list of cPanel accounts from the WHM server, optionally filtered and customized by search criteria and return fields.

Inputs

  • Search — A Perl Compatible Regular Expression (PCRE) pattern to filter accounts by the specified search type (e.g., domain, owner).
  • Searchmethod — Specifies how the search string is matched: exact (must be identical) or regex (contains the search value). Defaults to exact.
  • Searchtype — The account information field to query against (domain, owner, user, ip, package). Defaults to domain.
  • Want — Specifies which account return fields to include. If omitted, all available return data for each account is included.

Output shape

a JSON object containing an array of cPanel account details matching the filter criteria

If no search or searchtype parameters are provided, the operation returns all accounts on the server. The output may vary depending on the 'Want' parameter which filters the return fields. Errors are returned in standard WHM API error format.

Links

Discussion