Bulk import Outlook mailboxes from CSV
Upload a CSV to import Outlook/Hotmail mailboxes using app passwords (not OAuth). Maximum 500 per import.
Required columns: email, password
Optional columns: name (display name), totpsecret (TOTP secret for 2FA)
SMTP/IMAP settings are auto-configured:
- SMTP: smtp.office365.com:587 (STARTTLS)
- IMAP: outlook.office365.com:993 (SSL) - or imap-mail.outlook.com for hotmail/live.com
Mailboxes are created with "pending" status and connection is tested asynchronously.
curl -X POST "https://api.sendkit.ai/v1/mailboxes/import/outlook" \
-H "X-Api-Key: YOUR_API_KEY" \
--form file=example_string \
--form tag=example_string
import requests
import json
url = "https://api.sendkit.ai/v1/mailboxes/import/outlook"
headers = {
"X-Api-Key": "YOUR_API_KEY"
}
data = {
"file": "example_string",
"tag": "example_string"
}
response = requests.post(url, headers=headers, data=data)
print(response.json())
const formData = new FormData();
formData.append("file", "example_string");
formData.append("tag", "example_string");
const response = await fetch("https://api.sendkit.ai/v1/mailboxes/import/outlook", {
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY"
},
body: formData
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"mime/multipart"
)
func main() {
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
writer.WriteField("file", "example_string")
writer.WriteField("tag", "example_string")
writer.Close()
req, err := http.NewRequest("POST", "https://api.sendkit.ai/v1/mailboxes/import/outlook", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.sendkit.ai/v1/mailboxes/import/outlook')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['X-Api-Key'] = 'YOUR_API_KEY'
request.set_form([
["file", "example_string"],
["tag", "example_string"]
], 'multipart/form-data')
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"imported": 20,
"skipped": 2,
"failed": 1,
"errors": [
{
"email": "unknown",
"error": "Missing email or password"
}
]
}
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "CSV file is required"
}
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "CSV must have email and password columns"
}
}
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Maximum 500 mailboxes per import"
}
}
/v1/mailboxes/import/outlook
Platform API key (sk_user_...) or Workspace API key (sk_...)
The media type of the request body
CSV file with email and password columns
Tag to apply to all imported mailboxes
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)
Body
CSV file with email and password columns
Tag to apply to all imported mailboxes
Responses
Mailboxes successfully imported
Duplicate emails skipped
Mailboxes that failed
First 50 error details
Missing file, empty CSV, missing columns, or too many rows
Last updated 5 days ago
Built with Documentation.AI