# Return mail directory's subdirectories and files This function lists the mail directory's subdirectories (boxes) and files. When you disable the role, the system this function. If you do not use any input parameters, the function returns a list of items in the cPanel account's main mail directory. Endpoint: GET /Email/browse_mailbox Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `account` (string) An email address, to limit the function's results. Example: "user@example.com" - `dir` (string) A mail directory name, to limit results to specific directories. If you pass the or values, the function lists information for all mail directories. Example: "maildir" - `showdotfiles` (integer) Whether to include hidden files and directories. * — Include hidden items. * — Do include hidden items. Enum: 0, 1 ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "browse_mailbox" - `module` (string) The name of the module called. Example: "Email" - `result` (object) - `result.data` (array) - `result.data.depth` (integer) The directory depth of the item's path. Example: 2 - `result.data.file` (string) The item's base name. Example: "archive" - `result.data.fullpath` (string) The item's absolute path. Example: "/home/example/mail/archive" - `result.data.isleaf` (integer) Whether the item is a file or a directory. * - File. * - Directory. Enum: 0, 1 - `result.data.ismailbox` (integer) Whether the item is a mailbox. * - Mailbox. * - a mailbox. Enum: 0, 1 - `result.data.mtime` (integer) The item's modification time. A time, in [Unix time](https://en.wikipedia.org/wiki/Unix_time) format. Example: 1413398866 - `result.data.path` (string) The item's directory's path. Example: "/home/example/mail" - `result.data.relpath` (string) The item's relative path. Example: "/archive" - `result.data.type` (string) The item type. * - The item is a directory. * - The item is a file. Enum: "dir", "file" - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.metadata.transformed` (integer) Post-processing may have transformed the data. Enum: 1 - `result.status` (integer) * - Success. * - Failed. Check the field for more details. Enum: 0, 1 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.