Imports
Imap validate and get folders
Connects to the IMAP server with the supplied host, port and credentials and returns the folders it finds, each with its current message count. Nothing is stored, this only proves the credentials work before an import is created. Despite the name it does not return every folder: only folders whose name contains "Sent" plus the server's designated Sent folder are returned, since email imports read sent mail.
POST
/api/{tenant:minlength(2)}/v{version:apiVersion}/imports/imap_validate_and_get_folders
Request arguments
| Name | Type | Source |
|---|---|---|
| input | DTO_external_auth_imap | Body |
Request body example
Response
Response body example
DTO_external_auth_imap
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| hostname | String | Hostname | |
| port | Int32 | Port | |
| username | String | Username | |
| password | String | Password |
DTO_external_email_folder
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| mailbox | String | Mailbox | |
| folder_name | String | Folder name | |
| well_known_name | ENUM mailbox_folder_well_known_name | Well known name | |
| count | Int32 | Count |
ENUM mailbox_folder_well_known_name
| Value | Name | Description |
|---|---|---|
| 0 | UNKNOWN | UNKNOWN |
| 1 | INBOX | INBOX |
| 2 | SENT_ITEMS | SENT_ITEMS |
| 3 | DELETED_ITEMS | DELETED_ITEMS |
| 4 | DRAFTS | DRAFTS |
| 5 | ARCHIVE | ARCHIVE |
| 6 | JUNK_SPAM_EMAIL | JUNK_SPAM_EMAIL |
| 7 | CLUTTER | CLUTTER |
| 8 | CONVERSATION_HISTORY | CONVERSATION_HISTORY |
| 9 | OUTBOX | OUTBOX |
| 10 | TRASH | TRASH |
| 11 | IMPORTANT | IMPORTANT |
| 12 | STARRED | STARRED |
| 13 | UNREAD | UNREAD |
| 14 | CATEGORY_PERSONAL | CATEGORY_PERSONAL |
| 15 | CATEGORY_SOCIAL | CATEGORY_SOCIAL |
| 16 | CATEGORY_PROMOTIONS | CATEGORY_PROMOTIONS |
| 17 | CATEGORY_UPDATES | CATEGORY_UPDATES |
| 18 | CATEGORY_FORUMS | CATEGORY_FORUMS |
| 19 | RECOVERABLE_ROOT | RECOVERABLE_ROOT |
| 20 | RECOVERABLE_DELETIONS | RECOVERABLE_DELETIONS |
| 21 | RECOVERABLE_PURGES | RECOVERABLE_PURGES |
Generated Aug 4, 2026 18:37