Skip to content

SMTP credentials

Each campaign owns one or more SMTP credentials. The dispatcher rotates among enabled credentials when scheduling sends. IMAP fields are optional but enable reply detection.

POST /campaigns/:campaign_id/smtp_credentials
Authorization: Bearer <key>
Content-Type: application/json
{
"smtp_credential": {
"label": "Backup",
"smtp_host": "smtp.postmarkapp.com",
"smtp_port": 587,
"smtp_username": "...",
"smtp_password": "...",
"from_name": "Ada",
"from_email": "[email protected]",
"daily_limit": 100,
"imap_host": "imap.gmail.com",
"imap_port": 993,
"imap_username": "...",
"imap_password": "..."
}
}
FieldRequiredNotes
labelnoDisplay name.
smtp_host / smtp_portyesProvider-specific. 587 (STARTTLS) is typical.
smtp_username / smtp_passwordyesCredentials. Stored encrypted at rest.
from_name / from_emailyesThe visible “From: …” header.
daily_limityesMax sends per UTC day for this credential. Step 2/3 sends don’t count against today’s cap.
imap_host / imap_port / imap_username / imap_passwordnoIf all four are set, reply detection runs every few minutes.
{
"id": "...",
"from_email": "[email protected]",
"from_name": "Ada",
"smtp_host": "smtp.postmarkapp.com",
"smtp_port": 587,
"daily_limit": 100
}

Passwords are never returned in any response.

PATCH /campaigns/:campaign_id/smtp_credentials/:id { "smtp_credential": { "daily_limit": 500 } }
DELETE /campaigns/:campaign_id/smtp_credentials/:id

The bounce-rate auto-disable sets disabled_at on credentials whose bounce rate exceeds the campaign’s threshold. Once you’ve cleaned up your list:

POST /campaigns/:campaign_id/smtp_credentials/:credential_id/reenable
Authorization: Bearer <key>
{ "id": "...", "from_email": "...", "status": "enabled" }
StatusCodeWhen
404campaign_not_foundUnknown campaign or another account’s.
404smtp_credential_not_foundUnknown credential id under that campaign.
422validation_failedMissing required fields, invalid daily_limit, etc.