{"name": "rmail", "version": 1, "domains": ["molodetz.nl"], "http_port": 9002, "https_port": 9003, "endpoints": [{"method": "POST", "path": "/register", "auth": "None", "group": "Account", "summary": "Create a new account and receive a JWT token for it.", "params": [{"name": "username", "type": "string", "required": true, "description": "Local part of the address.", "where": "body"}, {"name": "password", "type": "string", "required": true, "description": "Account password.", "where": "body"}, {"name": "domain", "type": "string", "required": false, "description": "Served domain. Defaults to the first configured domain.", "where": "body"}], "status": 201, "example": {"token": "eyJ...", "username": "alice", "domain": "example.com", "expires_in": 3600}, "errors": [400, 403, 409, 429]}, {"method": "POST", "path": "/auth/login", "auth": "None", "group": "Account", "summary": "Authenticate and receive a JWT token.", "params": [{"name": "username", "type": "string", "required": true, "description": "Local part, or full address.", "where": "body"}, {"name": "password", "type": "string", "required": true, "description": "Account password.", "where": "body"}, {"name": "domain", "type": "string", "required": false, "description": "Domain. Defaults to the first configured domain.", "where": "body"}], "status": 200, "example": {"token": "eyJ...", "username": "alice", "domain": "example.com", "expires_in": 3600}, "errors": [400, 401, 403, 429]}, {"method": "GET", "path": "/folders", "auth": "User", "group": "Folders", "summary": "List folders with message counts.", "params": [], "status": 200, "example": {"folders": [{"name": "INBOX", "total": 3, "unread": 1}]}, "errors": [401]}, {"method": "GET", "path": "/folders/{folder}/messages", "auth": "User", "group": "Messages", "summary": "List messages in a folder.", "params": [{"name": "folder", "type": "string", "required": true, "description": "Folder name.", "where": "path"}, {"name": "offset", "type": "integer", "required": false, "description": "Start offset.", "where": "query"}, {"name": "limit", "type": "integer", "required": false, "description": "Page size, 1 to 1000.", "where": "query"}], "status": 200, "example": {"messages": [{"uid": 1, "flags": ["\\Seen"], "size": 1204}]}, "errors": [400, 401]}, {"method": "POST", "path": "/folders/{folder}/messages", "auth": "User", "group": "Messages", "summary": "Append a raw RFC822 message to a folder.", "params": [{"name": "folder", "type": "string", "required": true, "description": "Folder name.", "where": "path"}], "status": 200, "example": null, "errors": [400, 401, 413]}, {"method": "GET", "path": "/folders/{folder}/messages/{uid}", "auth": "User", "group": "Messages", "summary": "Fetch one message as RFC822.", "params": [{"name": "folder", "type": "string", "required": true, "description": "Folder name.", "where": "path"}, {"name": "uid", "type": "integer", "required": true, "description": "Message UID.", "where": "path"}], "status": 200, "example": null, "errors": [400, 401, 404]}, {"method": "DELETE", "path": "/folders/{folder}/messages/{uid}", "auth": "User", "group": "Messages", "summary": "Delete a message.", "params": [{"name": "folder", "type": "string", "required": true, "description": "Folder name.", "where": "path"}, {"name": "uid", "type": "integer", "required": true, "description": "Message UID.", "where": "path"}], "status": 200, "example": null, "errors": [400, 401, 404]}, {"method": "PATCH", "path": "/folders/{folder}/messages/{uid}/flags", "auth": "User", "group": "Messages", "summary": "Replace the flags of a message.", "params": [{"name": "folder", "type": "string", "required": true, "description": "Folder name.", "where": "path"}, {"name": "uid", "type": "integer", "required": true, "description": "Message UID.", "where": "path"}, {"name": "flags", "type": "string[]", "required": true, "description": "IMAP flags, for example \\Seen.", "where": "body"}], "status": 200, "example": null, "errors": [400, 401, 404]}, {"method": "POST", "path": "/messages/send", "auth": "User", "group": "Messages", "summary": "Compose and send a message, locally or through the relay.", "params": [{"name": "to", "type": "string[]", "required": true, "description": "Recipient addresses.", "where": "body"}, {"name": "cc", "type": "string[]", "required": false, "description": "Carbon copy addresses.", "where": "body"}, {"name": "bcc", "type": "string[]", "required": false, "description": "Blind copy addresses, not shown in headers.", "where": "body"}, {"name": "subject", "type": "string", "required": false, "description": "Subject line.", "where": "body"}, {"name": "body", "type": "string", "required": false, "description": "Plain text body.", "where": "body"}], "status": 200, "example": null, "errors": [400, 401, 413]}, {"method": "GET", "path": "/aliases", "auth": "User", "group": "Aliases", "summary": "List aliases for your domain.", "params": [], "status": 200, "example": null, "errors": [401]}, {"method": "POST", "path": "/aliases", "auth": "Admin", "group": "Aliases", "summary": "Add a regex alias rule.", "params": [{"name": "pattern", "type": "string", "required": true, "description": "Address pattern.", "where": "body"}, {"name": "target", "type": "string", "required": true, "description": "Existing local user.", "where": "body"}], "status": 200, "example": {"added": true, "pattern": "sales.*", "target": "alice"}, "errors": [400, 401, 403]}, {"method": "DELETE", "path": "/aliases", "auth": "Admin", "group": "Aliases", "summary": "Remove an alias, pattern given in the body.", "params": [{"name": "pattern", "type": "string", "required": true, "description": "Pattern to remove.", "where": "body"}], "status": 200, "example": null, "errors": [400, 401, 403]}, {"method": "DELETE", "path": "/aliases/{pattern}", "auth": "Admin", "group": "Aliases", "summary": "Remove an alias, pattern given in the path.", "params": [{"name": "pattern", "type": "string", "required": true, "description": "Pattern to remove.", "where": "path"}], "status": 200, "example": null, "errors": [400, 401, 403]}, {"method": "GET", "path": "/.well-known/autoconfig/mail/config-v1.1.xml", "auth": "None", "group": "Discovery", "summary": "Thunderbird autoconfig.", "params": [], "status": 200, "example": null, "errors": []}, {"method": "POST", "path": "/autodiscover/autodiscover.xml", "auth": "None", "group": "Discovery", "summary": "Exchange autodiscover.", "params": [], "status": 200, "example": null, "errors": []}], "pages": [{"method": "GET", "path": "/web/login", "auth": "None", "summary": "Login form"}, {"method": "POST", "path": "/web/login", "auth": "None", "summary": "Log in, sets the session cookie"}, {"method": "GET", "path": "/web/register", "auth": "None", "summary": "Registration form"}, {"method": "POST", "path": "/web/register", "auth": "None", "summary": "Create an account and log in"}, {"method": "POST", "path": "/web/logout", "auth": "User", "summary": "Clear the session cookie"}, {"method": "GET", "path": "/web/f/{folder}", "auth": "User", "summary": "Message list with search (q) and paging (offset)"}, {"method": "POST", "path": "/web/f/{folder}/bulk", "auth": "User", "summary": "Read, unread, flag, unflag, delete or move selected messages"}, {"method": "GET", "path": "/web/f/{folder}/{uid}", "auth": "User", "summary": "Read a message with previous and next, marks it seen"}, {"method": "GET", "path": "/web/f/{folder}/{uid}/source", "auth": "User", "summary": "Raw message source"}, {"method": "GET", "path": "/web/f/{folder}/{uid}/part/{n}", "auth": "User", "summary": "Download attachment n"}, {"method": "GET", "path": "/web/compose", "auth": "User", "summary": "Compose form, or reply, replyall, forward via folder, uid, mode"}, {"method": "POST", "path": "/web/compose", "auth": "User", "summary": "Send a message with to, cc, bcc"}, {"method": "GET", "path": "/web/folders", "auth": "User", "summary": "Manage folders"}, {"method": "POST", "path": "/web/folders", "auth": "User", "summary": "Create a folder"}, {"method": "POST", "path": "/web/folders/delete", "auth": "User", "summary": "Delete a custom folder"}, {"method": "GET", "path": "/web/settings", "auth": "User", "summary": "Account address, storage use, password form"}, {"method": "POST", "path": "/web/settings", "auth": "User", "summary": "Change password"}, {"method": "GET", "path": "/web/aliases", "auth": "Admin", "summary": "List aliases"}, {"method": "POST", "path": "/web/aliases", "auth": "Admin", "summary": "Add an alias"}, {"method": "POST", "path": "/web/aliases/remove", "auth": "Admin", "summary": "Remove an alias"}]}