PATCH /api/v1/accounts/{accountId}/imap/folders
Update special-folder overrides for an IMAP mailbox you own or administer.
Update special-folder overrides for an IMAP mailbox you own or administer.
Authentication
Pass a Fluxmail member session as a bearer token. API keys cannot use this endpoint.
Request
curl 'http://localhost:8977/api/v1/accounts/acct_123/imap/folders' \
-X PATCH \
-H "Authorization: Bearer $FLUXMAIL_SESSION" \
-H "Content-Type: application/json" \
--data '{}'Parameters
| Name | Location | Required | Type | Details |
|---|---|---|---|---|
accountId | path | Yes | string | Minimum length: 1. |
Request body
Content type: application/json
{
"type": "object",
"properties": {
"sent": {
"type": "string",
"nullable": true,
"minLength": 1,
"maxLength": 1024
},
"drafts": {
"type": "string",
"nullable": true,
"minLength": 1,
"maxLength": 1024
},
"trash": {
"type": "string",
"nullable": true,
"minLength": 1,
"maxLength": 1024
},
"archive": {
"type": "string",
"nullable": true,
"minLength": 1,
"maxLength": 1024
},
"spam": {
"type": "string",
"nullable": true,
"minLength": 1,
"maxLength": 1024
}
},
"additionalProperties": false
}Responses
| Status | Description | Content type |
|---|---|---|
200 | Success | application/json |
400 | Invalid request | application/json |
401 | Authentication required | application/json |
403 | Permission denied | application/json |
404 | Not found | application/json |
409 | Conflict | application/json |
413 | Request body too large | application/json |
422 | Unsupported capability | application/json |
429 | Too many attempts | application/json |
503 | Provider unavailable | application/json |
200 response
{
"type": "object",
"properties": {
"data": {
"nullable": true
}
},
"additionalProperties": {
"nullable": true
}
}Last updated
PATCH /api/v1/accounts/{accountId}/folders/{folderId}
Rename a folder. Give the new name on its own, without the parent path: the folder stays under the same parent and keeps its messages and subfolders. The new name must not be one another folder has. In Gmail, where the folder is a label, the labels nested under it are renamed to match. System folders such as Inbox, Sent and Trash can't be renamed, and neither can a folder the account settings use as one. In an IMAP mailbox, the folder and its subfolders get new IDs. Message IDs normally stay the same. If one stops working, list the folder again.
PATCH /api/v1/admin/accounts/{accountId}/imap/folders
Update the folder overrides for an IMAP account. Requires admin.accounts.