Docs
Email Accounts

Connect an email account

Connects a custom SMTP/IMAP mailbox to the workspace. The credentials are verified against both hosts before anything is written, and the password is encrypted at rest. OAuth providers (Gmail / Outlook) are connected through the browser consent flow, not this endpoint.

POST
/v2/workspaces/{workspaceId}/accounts

Path Parameters

workspaceIdnumber
emailAddressstring
senderName?string
smtpHoststring
smtpPortnumber
smtpEncryptionstring
Value in"SSL" | "TLS" | "NONE"
imapHoststring
imapPortnumber
imapEncryptionstring
Value in"SSL" | "TLS" | "NONE"
smtpUsernamestring
imapUsername?string

Falls back to smtpUsername if omitted

passwordstring
imapPassword?string

IMAP password. Falls back to the SMTP password when omitted - the common case where both channels belong to the same mailbox. Set this explicitly when SMTP and IMAP are different providers (e.g. a SendGrid/Mailgun/SES/Elastic Email relay for sending, plus a real mailbox for reply detection).

espPresetId?string

The picked provider-catalog preset id (e.g. "zoho"), used to validate the submitted email address matches the chosen ESP and, for a cataloged ESP-brand preset, to persist that brand directly on provider (e.g. "ZOHO") instead of the generic "SMTP" bucket. Trusted only for the cosmetic ESP-brand presets - a value that would resolve to one of the original 5 EmailProvider values (e.g. "gmail") is ignored and the submitted host is used instead. Omit for Custom SMTP / Other. IMAP is always required now - for a send-only preset (no IMAP endpoint of its own), the submitted IMAP details describe a genuinely different mailbox used only for reply detection.

displayName?stringDeprecated

Deprecated alias of senderName, ignored when senderName is present.

Response Body

curl -X POST "https://lynx-api.trulyinbox.com/v2/workspaces/0/accounts" \  -H "Content-Type: application/json" \  -d '{    "emailAddress": "user@company.com",    "senderName": "John Doe",    "smtpHost": "smtp.company.com",    "smtpPort": 587,    "smtpEncryption": "TLS",    "imapHost": "imap.company.com",    "imapPort": 993,    "imapEncryption": "SSL",    "smtpUsername": "user@company.com",    "imapUsername": "imap-user@company.com",    "imapPassword": "app-password-or-api-key",    "displayName": "John Doe"  }'
{
  "data": {
    "id": 0,
    "emailAddress": "string",
    "senderName": "string",
    "provider": "string",
    "authMethod": "string",
    "status": "string",
    "accountState": "string",
    "statusBucket": "string",
    "sendCheckFailed": true,
    "receiveCheckFailed": true,
    "structuredStatus": {},
    "warmupStatus": "string",
    "warmupPausedAt": "2019-08-24T14:15:22Z",
    "warmupPausedReason": "string",
    "throttleReason": "string",
    "cooldownUntil": "2019-08-24T14:15:22Z",
    "warmupMinLimit": 0,
    "warmupMaxLimit": 0,
    "warmupCurrentLimit": 0,
    "warmupRampupDay": 0,
    "warmupStrategy": "string",
    "timezone": "string",
    "poolTier": "string",
    "deliverabilityRate": 0,
    "spfData": {},
    "dkimData": {},
    "dmarcData": {},
    "mxRecordData": {},
    "dnsCheckedAt": "2019-08-24T14:15:22Z",
    "setupScore": 82,
    "inboxPlacementScore": 0,
    "lastVerifiedAt": "2019-08-24T14:15:22Z",
    "pushNotificationsActive": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "source": "string",
    "dwdWorkspaceId": 0,
    "partnerIntegrationId": 0,
    "domainRegisteredAt": "2019-08-24T14:15:22Z",
    "mailboxCreatedAt": "2019-08-24T14:15:22Z",
    "warmupStartDate": "2019-08-24T14:15:22Z",
    "replyRate": 0,
    "warmupPreference": "string",
    "contentIndustry": "string",
    "contentTopics": [
      "string"
    ],
    "contentLanguage": "string",
    "blacklistedAt": "2019-08-24T14:15:22Z",
    "blacklistSource": "string",
    "todaySent": 0,
    "todayReceived": 0,
    "sevenDaySent": 0,
    "sevenDayReceived": 0,
    "tags": [
      {
        "id": 0,
        "name": "string",
        "color": "string"
      }
    ],
    "activeBulkJobId": "string",
    "activeImportId": "string"
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}