Imports
Oauth validate and get folders
Returns the Sent folders (only those) of a Microsoft or Google mailbox reached with the tokens from a completed OAuth flow, without storing anything. The identifier is the one handed out by that flow and resolves against a cache entry that lives for one hour, after which the OAuth step has to be repeated. other_mailbox lets a Microsoft connection inspect a shared mailbox instead of the authorizing account's own, it is ignored for Google.
POST
/api/{tenant:minlength(2)}/v{version:apiVersion}/imports/oauth_validate_and_get_folders
Request arguments
| Name | Type | Source |
|---|---|---|
| input | DTO_import_email_oauth2_validation | Body |
Request body example
Response
Response body example
DTO_import_email_oauth2_validation
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| identifier | String | Identifier | |
| other_mailbox | String | Other mailbox |
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