logo
MailboxesAdd SMTP mailbox
Mailboxes

Add SMTP mailbox

Add an SMTP mailbox to the workspace. Credentials are encrypted at rest. Returns 409 if a mailbox with the same email already exists in the workspace.

curl -X POST "https://api.sendkit.ai/v1/mailboxes" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "email": "sarah@company.com",
  "displayName": "Sarah Johnson",
  "provider": "custom",
  "smtp": {
    "host": "smtp.company.com",
    "port": 587,
    "secure": false,
    "username": "sarah@company.com",
    "password": "app-password-here"
  },
  "imap": {
    "host": "imap.company.com",
    "port": 993,
    "secure": true,
    "username": "sarah@company.com",
    "password": "app-password-here"
  },
  "dailySendLimit": 40,
  "signature": "<p>Best regards,<br>Sarah Johnson</p>",
  "tags": [
    "outreach"
  ]
}'
{
  "success": true,
  "data": {
    "_id": "665b1c2d3e4f5a6b7c8d9e0f",
    "email": "sarah@company.com",
    "displayName": "Sarah Johnson",
    "provider": "custom",
    "status": "active",
    "connectionType": "smtp",
    "dailySendLimit": 40,
    "sendingEnabled": true,
    "signature": "<p>Best regards,<br>Sarah Johnson</p>",
    "tags": [
      "outreach"
    ],
    "smtpHost": "smtp.company.com",
    "smtpPort": 587,
    "smtpSecure": false,
    "imapHost": "imap.company.com",
    "imapPort": 993,
    "imapSecure": true,
    "createdAt": "2025-06-10T10:30:00.000Z",
    "updatedAt": "2025-06-10T10:30:00.000Z"
  }
}
POST
/v1/mailboxes
POST
API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
Bearer Token
Bearer Tokenstring
Required

API key as Bearer token

API key as Bearer token
Content-Typestring
Required

The media type of the request body

Options: application/json
emailstring
Required

Mailbox email address (stored lowercase)

Format: email
displayNamestring

Sender display name (defaults to email username)

providerstring

Email provider (default "custom")

Options: gmail, outlook, azure, custom
smtpobject

SMTP server configuration

imapobject

IMAP server configuration (for receiving/replying)

dailySendLimitinteger

Maximum emails per day (default 50, clamped to 1-50)

Min: 1 • Max: 50
signaturestring

HTML email signature

tagsarray

Tags to assign to the mailbox

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

header
Authorizationstring
Required

Bearer token. API key as Bearer token

Body

application/json
emailstring
Required

Mailbox email address (stored lowercase)

displayNamestring

Sender display name (defaults to email username)

providerstring

Email provider (default "custom")

Allowed values:gmailoutlookazurecustom
smtpobject

SMTP server configuration

imapobject

IMAP server configuration (for receiving/replying)

dailySendLimitinteger

Maximum emails per day (default 50, clamped to 1-50)

signaturestring

HTML email signature

tagsarray

Tags to assign to the mailbox

Responses