Skip to main content
Folders live on the mail server, not in Ruber’s database. That is what makes them real: a folder created here appears in Thunderbird, and one created in Thunderbird appears here, because there is only ever one of it. Required permission: Folders → Read for listing, Folders → Write for the rest.
Renaming and deleting need the mail-server update, which ships separately from the API. Until it lands, those two answer 502 mail_unavailable and nothing changes. Listing and creating work now.
Folders are addressed by path, in the query string or the body — never as a URL segment.A folder’s identity is its IMAP path, and a path can contain the server’s hierarchy delimiter (/ here, . on plenty of other servers). Put through a URL segment it has to survive two rounds of encoding to arrive intact, and the failure mode is a caller addressing a folder that looks right and is not.

List folders

role is read from the server’s own SPECIAL-USE attribute, not guessed from the name — Junk is “Spam” on some servers and Trash is “Deleted Items” on others. editable is false for every folder with a role, including INBOX. Renaming the Sent folder would not break a name, it would break “file a copy in Sent” for every client the account uses.

Create a folder

201 Created. Use the returned path, do not assume it. The server picks it — the hierarchy delimiter and any namespace prefix are its to choose, so the name you sent is not reliably the path that comes back. Folders are flat. Separators in the name are replaced with spaces rather than escaped, so Work/2026 becomes one folder called Work 2026 instead of silently nesting under a parent you did not ask for. Duplicate names are refused with invalid_request.

Rename a folder

Returns the new path, which again the server decides. Messages stay where they are — a rename moves nothing. Only folders with "editable": true can be renamed.

Delete a folder

This destroys the messages in the folder. There is no undo and nothing goes to Trash.IMAP DELETE takes the messages with the folder — that is what the command means, and Ruber does not soften it by moving them somewhere first, because a “delete” that silently relocates a hundred messages into Trash is its own surprise. messages_deleted tells you afterwards how many went.Move anything you want to keep first, with PATCH /v1/messages/{uid}.
Refused for anything with a role, and refused for a folder with folders inside it — delete those first. A server that stores children inside their parent would otherwise take a whole tree with one call.

Errors

See Errors for the full response shape.