Create a folder
create_folderCreate an IMAP folder. The server's own namespace and hierarchy rules are applied, so it lands where the user would expect it in Outlook or webmail, and a folder created this way is SUBSCRIBED, so it shows up in clients that list only subscribed folders (Outlook and Roundcube both do). A "/" IN THE NAME BUILDS A HIERARCHY rather than a folder with a slash in its name: "Archive/2026" puts 2026 inside Archive, creating Archive too if it is missing - so a folder name cannot contain a literal "/". Safe to call twice: a folder of that name that already exists is returned as it is, matched case-insensitively, so asking for "projects" where "Projects" exists finds that one rather than leaving two folders nobody can tell apart - the reply says whether it actually created anything. parent may be a folder that cannot itself hold messages (selectable: false in list_mailboxes), because creating underneath one is what turns it into a real folder. REFUSES a name with a blank or empty segment, such as a leading, trailing or doubled "/".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Folder name, e.g. "Invoices". A "/" nests: "Archive/2026" creates 2026 inside Archive. | |
| parent | No | An existing folder to nest it under, e.g. "Archive". Use this rather than building the path by hand when the parent is already there. |