Integrate your systems with DeepLead to programmatically manage email inboxes.
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer dl_your_api_key_hereNeed an API key? Contact your account manager to request API access for your integration.
https://app.deeplead.com/api/v1Get a list of your inbox pools. You will need pool IDs to create inboxes.
{
"pools": [
{
"id": "507f1f77bcf86cd799439011",
"name": "Main Pool",
"inboxCount": 10,
"createdAt": "2024-01-15T10:30:00Z"
}
]
}Get a list of your inboxes with optional filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
| poolId | string | No | Filter by pool ID |
| status | string | No | Filter by status: active, paused, deactivated, error |
| limit | number | No | Max results (default: 100, max: 1000) |
| skip | number | No | Number of results to skip |
{
"inboxes": [
{
"id": "507f1f77bcf86cd799439012",
"emailAddress": "sales@company.com",
"poolId": "507f1f77bcf86cd799439011",
"status": "active",
"dailySendingLimit": 50,
"createdAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"total": 50,
"limit": 100,
"skip": 0,
"hasMore": false
}
}Create one or more email inboxes. Supports single inbox or batch creation.
| Parameter | Type | Required | Description |
|---|---|---|---|
| emailAddress | string | Yes | Email address for the inbox |
| poolId | string | No | ID of the pool to add inbox to. If not provided, a new pool will be auto-created. |
| imapPassword | string | Yes | IMAP password (usually an app password) |
| smtpPassword | string | No | SMTP password (defaults to imapPassword) |
| provider | string | No | Email provider: google, microsoft, yahoo, zoho, icloud |
| imapHost | string | No | IMAP server hostname (auto-detected if provider known) |
| imapPort | number | No | IMAP server port (auto-detected if provider known) |
| smtpHost | string | No | SMTP server hostname (auto-detected if provider known) |
| smtpPort | number | No | SMTP server port (auto-detected if provider known) |
| dailySendingLimit | number | No | Daily sending limit (default: 2) |
| skipConnectionTest | boolean | No | Skip IMAP/SMTP connection test |
{
"emailAddress": "sales@company.com",
"poolId": "507f1f77bcf86cd799439011",
"imapPassword": "app-password-here",
"provider": "google",
"dailySendingLimit": 50
}{
"emailAddress": "sales@company.com",
"imapPassword": "app-password-here",
"provider": "google"
}[
{
"emailAddress": "inbox1@gmail.com",
"imapPassword": "password1"
},
{
"emailAddress": "inbox2@gmail.com",
"imapPassword": "password2"
}
]{
"success": true,
"summary": {
"total": 2,
"created": 2,
"failed": 0
},
"autoCreatedPool": {
"id": "507f1f77bcf86cd799439011",
"name": "API Pool - 2024-01-15"
},
"results": [
{
"emailAddress": "inbox1@gmail.com",
"success": true,
"inboxId": "507f1f77bcf86cd799439012",
"autoFilledFields": ["imapHost", "imapPort", "smtpHost", "smtpPort"]
},
{
"emailAddress": "inbox2@gmail.com",
"success": true,
"inboxId": "507f1f77bcf86cd799439013"
}
]
}Note: The autoCreatedPool field is only included when no poolId was provided and a new pool was created automatically.
The API automatically detects IMAP/SMTP settings based on the email domain or the provider field.
| Provider | Provider Value | Auto-detected Domains |
|---|---|---|
| Google Workspace / Gmail | google | gmail.com, googlemail.com |
| Microsoft 365 / Outlook | microsoft | outlook.com, hotmail.com, live.com |
| Yahoo Mail | yahoo | yahoo.com, yahoo.co.uk |
| Zoho Mail | zoho | zoho.com, zohomail.com |
| iCloud | icloud | icloud.com, me.com, mac.com |
| GoDaddy | godaddy | secureserver.net |
| Namecheap | namecheap | privateemail.com |
Custom domains: For custom domains hosted on these providers (e.g., sales@yourcompany.com on Google Workspace), specify the provider field explicitly.
For providers not in the auto-detect list, provide full connection details:
{
"emailAddress": "user@customdomain.com",
"poolId": "507f1f77bcf86cd799439011",
"imapUsername": "user@customdomain.com",
"imapPassword": "password",
"imapHost": "mail.customdomain.com",
"imapPort": 993,
"smtpUsername": "user@customdomain.com",
"smtpPassword": "password",
"smtpHost": "smtp.customdomain.com",
"smtpPort": 587
}All error responses follow this format:
{
"error": "Error message here",
"details": [...] // Optional validation errors
}| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid input |
| 401 | Unauthorized - Missing or invalid API key |
| 403 | Forbidden - API key lacks required permissions |
| 404 | Not Found - Pool or resource not found |
| 409 | Conflict - Email already exists |
| 500 | Internal Server Error |
# Create inbox (pool auto-created)
curl -X POST "https://app.deeplead.com/api/v1/inboxes" \
-H "Authorization: Bearer dl_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"emailAddress": "sales@company.com",
"imapPassword": "your-app-password",
"provider": "google"
}'
# Create inbox with specific pool
curl -X POST "https://app.deeplead.com/api/v1/inboxes" \
-H "Authorization: Bearer dl_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"emailAddress": "sales@company.com",
"poolId": "507f1f77bcf86cd799439011",
"imapPassword": "your-app-password",
"provider": "google"
}'
# List pools
curl -X GET "https://app.deeplead.com/api/v1/pools" \
-H "Authorization: Bearer dl_your_api_key_here"import requests
API_KEY = "dl_your_api_key_here"
BASE_URL = "https://app.deeplead.com/api/v1"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# Create inbox (pool auto-created if not specified)
response = requests.post(
f"{BASE_URL}/inboxes",
headers=headers,
json={
"emailAddress": "sales@company.com",
"imapPassword": "your-app-password",
"provider": "google",
"dailySendingLimit": 50
}
)
result = response.json()
print(result)
# Auto-created pool ID is in the response
if "autoCreatedPool" in result:
pool_id = result["autoCreatedPool"]["id"]
print(f"Pool created: {pool_id}")const API_KEY = "dl_your_api_key_here";
const BASE_URL = "https://app.deeplead.com/api/v1";
const headers = {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
// Create inbox (pool auto-created if not specified)
const response = await fetch(`${BASE_URL}/inboxes`, {
method: "POST",
headers,
body: JSON.stringify({
emailAddress: "sales@company.com",
imapPassword: "your-app-password",
provider: "google",
dailySendingLimit: 50,
}),
});
const result = await response.json();
console.log(result);
// Auto-created pool ID is in the response
if (result.autoCreatedPool) {
console.log("Pool created:", result.autoCreatedPool.id);
}Need help with the API? Contact your account manager or email support@deeplead.com