v1
latestOpenAPI 3.1.02026-07-14159142161.9 KBemailService
Add Email Credentials
Adds new email credentials for IMAP and SMTP access. Only accessible by authorized users.
post/email/v1/emails/credentials
Request body
Example request
{
"email": "user@example.com",
"password": "securepassword123",
"imap_host": "imap.gmail.com",
"imap_port": 993,
"smtp_host": "smtp.gmail.com",
"smtp_port": 587
}Response
OK
Example response
{
"id": 2,
"added_by": 1,
"auth_user_id": 557,
"imap_host": "imap.gmail.com",
"imap_port": 993,
"smtp_host": "smtp.gmail.com",
"smtp_port": 587,
"email": "stark@gmail.com",
"status": "pending_settings",
"created_at": 1711385960,
"updated_at": 1729099182,
"sync_folders": [
[
{
"folder_name": "INBOX",
"path": "INBOX",
"delimitter": "/",
"has_children": false,
"is_root": true,
"is_inbox": true
},
{
"folder_name": "Notes",
"path": "Notes",
"delimitter": "/",
"has_children": false,
"is_root": true
},
{
"folder_name": "Drafts",
"path": "[Gmail]/Drafts",
"delimitter": "/",
"has_children": false,
"is_root": false,
"is_draft": true
},
{
"folder_name": "Sent Mail",
"path": "[Gmail]/Sent Mail",
"delimitter": "/",
"has_children": false,
"is_root": false,
"is_sent": true
},
{
"folder_name": "Spam",
"path": "[Gmail]/Spam",
"delimitter": "/",
"has_children": false,
"is_root": false,
"is_junk": true
},
{
"folder_name": "Trash",
"path": "[Gmail]/Trash",
"delimitter": "/",
"has_children": false,
"is_root": false,
"is_trash": true
}
]
]
}