SMTP Accounts
Manage custom SMTP and IMAP connections through the Kurrier hosted API.
SMTP accounts
SMTP accounts store the connection settings for a custom mail host, including cPanel, Microsoft 365, OVH, Zimbra, and other providers that expose SMTP or IMAP.
An account can provide:
- SMTP settings for sending mail.
- IMAP settings for receiving and synchronizing mail.
- Both SMTP and IMAP settings for a complete mailbox connection.
After creating an account, use its ID to create one or more email identities.
The API key can access only accounts available to the user who created it. For authentication and the hosted API base URL, see API Authentication.
All paths below are relative to:
https://YOUR_KURRIER_HOST/api/kurrierCreate an SMTP account
POST /smtp-accounts
{
"label": "Support mailbox",
"smtp": {
"host": "smtp.example.com",
"port": 465,
"secure": true,
"username": "support@example.com",
"password": "app-password"
},
"imap": {
"host": "imap.example.com",
"port": 993,
"secure": true,
"username": "support@example.com",
"password": "app-password"
}
}| Field | Description |
|---|---|
| label (required) | Descriptive name shown in Kurrier. |
| smtp (required) | Outgoing connection settings: host, port, username, and password, with optional secure and pool fields. Use secure: true for implicit TLS, commonly on port 465. Use false or omit it when your provider expects STARTTLS, commonly on port 587. |
| imap | Incoming connection settings: host, port, username, and password, with optional secure. Omit this object for a send-only account. |
Use an application-specific password when your provider supports one. Do not place mailbox credentials in frontend code, source control, or logs.
Kurrier encrypts stored credentials. Passwords are never returned by the API:
{
"success": true,
"data": {
"id": "0d63d43a-2b3f-4f8e-9a76-2f0f2c9a3b1e",
"label": "Support mailbox",
"smtp": {
"host": "smtp.example.com",
"port": 465,
"username": "support@example.com",
"secure": true,
"pool": false
},
"imap": {
"host": "imap.example.com",
"port": 993,
"username": "support@example.com",
"secure": true
},
"sendVerified": null,
"receiveVerified": null
}
}List SMTP accounts
GET /smtp-accounts
Returns the SMTP accounts available to the authenticated user.
Get an SMTP account
GET /smtp-accounts/{id}
Returns one accessible account by its ID. Secret values are not included.
Update an SMTP account
PATCH /smtp-accounts/{id}
Partially updates the label or connection settings. Omitted fields, including passwords, keep their current values.
For example, rotate the SMTP and IMAP passwords:
{
"smtp": { "password": "new-app-password" },
"imap": { "password": "new-app-password" }
}Send "imap": null to remove incoming-mail settings and make the account send-only.
Delete an SMTP account
DELETE /smtp-accounts/{id}
Permanently deletes the account and its stored credentials.
If one or more identities still use the account, the API returns 409 ACCOUNT_IN_USE with the affected identities. Reassign or delete those identities before deleting the account.
Test updated credentials before relying on the account in production. A successful API update confirms that Kurrier stored the settings; it does not necessarily mean the external mail server will accept them.