curl --request POST \
--url https://api.tryfuse.ai/api/v1/business/accounts/email/smtp/bulk \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"mailboxes": [
{
"emailAddress": "jsmith@example.com",
"smtpHost": "<string>",
"imapHost": "<string>",
"password": "<string>",
"name": "<string>",
"smtpPort": 465,
"smtpSecure": true,
"imapPort": 993,
"imapSecure": true,
"authUser": "<string>"
}
]
}
'import requests
url = "https://api.tryfuse.ai/api/v1/business/accounts/email/smtp/bulk"
payload = { "mailboxes": [
{
"emailAddress": "jsmith@example.com",
"smtpHost": "<string>",
"imapHost": "<string>",
"password": "<string>",
"name": "<string>",
"smtpPort": 465,
"smtpSecure": True,
"imapPort": 993,
"imapSecure": True,
"authUser": "<string>"
}
] }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mailboxes: [
{
emailAddress: 'jsmith@example.com',
smtpHost: '<string>',
imapHost: '<string>',
password: '<string>',
name: '<string>',
smtpPort: 465,
smtpSecure: true,
imapPort: 993,
imapSecure: true,
authUser: '<string>'
}
]
})
};
fetch('https://api.tryfuse.ai/api/v1/business/accounts/email/smtp/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"totalRows": 4,
"connectingRows": 2,
"skipped": [
{
"index": 2,
"reason": "DUPLICATE_IN_REQUEST"
},
{
"index": 3,
"reason": "MICROSOFT_OAUTH_REQUIRED"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}Import SMTP/IMAP mailboxes
Connects up to 250 SMTP/IMAP mailboxes in one request, as the app’s CSV import does; each mailbox takes the fields of POST /business/accounts/email/smtp. Mailboxes refused before any login come back at once in skipped, by their place in mailboxes: an address repeated in the request (the first one is kept), one connected through Gmail or Outlook or as a mailbox bought through Fuse, a Microsoft SMTP host, and new mailboxes past what your plan’s seats leave room for. A background job then connects the rest one by one exactly as POST /business/accounts/email/smtp does (a mailbox you already connected over SMTP is updated), and a notification in the app says how many connected; a mailbox whose login fails is left out, so check GET /business/accounts?channel=email once GET /business/accounts/email/smtp/bulk/status reads isImporting: false. Your imports run one at a time: one sent while another, or a connect of mailboxes bought through Fuse, is still running answers 409 MAILBOX_IMPORT_IN_PROGRESS and imports nothing; send it again once the import status reads isImporting: false. Passwords are stored encrypted and never returned or logged. Answers 202. Send an X-Idempotency-Key header of 8 to 200 characters to make retries safe: the same request with the same key within 24 hours answers the first import’s answer and imports nothing again, and the key on a different request answers 409. A first request refused before anything was imported (any 4xx) can be retried under its key; one that failed with a server error answers 409 IDEMPOTENCY_KEY_OUTCOME_UNKNOWN: check GET /business/accounts/email/smtp/bulk/status and the account list before importing again with a new key. Rate limit: 5 requests per minute, 20 per day.
Errors:
403EMAIL_ACCOUNT_LIMIT_REACHED— Your plan’s mailbox seats are all in use and every mailbox in the request would be a new one, so none can be connected.409SMTP_INBOX_SYNC_DISABLED— Inbox syncing for SMTP mailboxes is switched off, so imported mailboxes could not receive replies. Nothing was imported.409MAILBOX_IMPORT_IN_PROGRESS— An import of yours, or a connect of mailboxes bought through Fuse, is still running. Nothing was imported; send it again once the import status readsisImporting: false.422VALIDATION_FAILED—mailboxesis missing, empty or longer than 250, or a mailbox misses a required field, has a host that is not a host name or a port that is not a port, or carries an unknown field, or theX-Idempotency-Keyheader was sent with a value outside 8-200 characters.409IDEMPOTENCY_KEY_IN_USE— A request with thisX-Idempotency-Keyis still being processed; retry it shortly to get its result. If it keeps answering this, the first request stopped before its result was recorded: check the import status before importing again with a new key.409IDEMPOTENCY_KEY_REUSED— ThisX-Idempotency-Keywas sent in the last 24 hours with a different request; nothing was imported.409IDEMPOTENCY_KEY_OUTCOME_UNKNOWN— The first request with thisX-Idempotency-Keyfailed with a server error after it may have started the import, so nothing more was done. Check the import status and the account list before importing again with a new key.429RATE_LIMITED— More than 5 imports in a minute, or 20 in a day, for this token owner: the app’s own import limit. Retry after the Retry-After / RateLimit-Reset seconds.
Requires one of the following token scopes: accounts.
curl --request POST \
--url https://api.tryfuse.ai/api/v1/business/accounts/email/smtp/bulk \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"mailboxes": [
{
"emailAddress": "jsmith@example.com",
"smtpHost": "<string>",
"imapHost": "<string>",
"password": "<string>",
"name": "<string>",
"smtpPort": 465,
"smtpSecure": true,
"imapPort": 993,
"imapSecure": true,
"authUser": "<string>"
}
]
}
'import requests
url = "https://api.tryfuse.ai/api/v1/business/accounts/email/smtp/bulk"
payload = { "mailboxes": [
{
"emailAddress": "jsmith@example.com",
"smtpHost": "<string>",
"imapHost": "<string>",
"password": "<string>",
"name": "<string>",
"smtpPort": 465,
"smtpSecure": True,
"imapPort": 993,
"imapSecure": True,
"authUser": "<string>"
}
] }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
mailboxes: [
{
emailAddress: 'jsmith@example.com',
smtpHost: '<string>',
imapHost: '<string>',
password: '<string>',
name: '<string>',
smtpPort: 465,
smtpSecure: true,
imapPort: 993,
imapSecure: true,
authUser: '<string>'
}
]
})
};
fetch('https://api.tryfuse.ai/api/v1/business/accounts/email/smtp/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"totalRows": 4,
"connectingRows": 2,
"skipped": [
{
"index": 2,
"reason": "DUPLICATE_IN_REQUEST"
},
{
"index": 3,
"reason": "MICROSOFT_OAUTH_REQUIRED"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}