Mailboxes

Reconnect mailbox

Requests reconnection of a mailbox that has lost access. Branch on the response result field (not mailbox.status alone).

Results:

  • reconnected: credentials verified; mailbox is active again. nextStep: nothing to do.
  • already_connected: mailbox was already active. nextStep: nothing to do.
  • disconnected: still access_lost after an SMTP/IMAP check. nextStep: PATCH .../connection-settings, then retry reconnect. If the provider account is missing, send both SMTP and IMAP so it is registered again.
  • oauth_required: Google/Outlook needs user consent. nextStep: open oauthUrl, then handle redirectUrl. redirectUrl is required and must be allowlisted (contact Salesforge support).
  • suspended: admin/billing suspension. nextStep: contact support.
  • deleted: mailbox is deleted. nextStep: connect again as a new mailbox.
  • pending: connection still being set up. nextStep: wait and poll GET mailbox.
  • ineligible: reconnect does not apply for this state.

redirectUrl: required for Google/Outlook OAuth mailboxes; omit for SMTP/IMAP. Same allowlisting rules as POST /mailboxes/oauth-link.

post/workspaces/{workspaceID}/mailboxes/{mailboxID}/reconnect

Request

  • Base URL
    https://api.salesforge.ai/public/v2
  • Auth
    API key in header Authorization

Path parameters

workspaceIDstring required

Workspace ID

mailboxIDstring required

Mailbox ID

Request body

object required
OR

Example request

{
  "redirectUrl": "https://partner.example/oauth/callback"
}

Response

Reconnect outcome

messagestring

Short explanation of the outcome.

nextStepstring

What the caller should do next.

oauthUrlstring

OAuth authorization URL. Present only when result is oauth_required.

result'reconnected' | 'already_connected' | 'disconnected' | 'oauth_required' | 'suspended' | 'deleted' | 'pending' | 'ineligible'

Explicit reconnect outcome. Prefer this over combining fields with mailbox.status.

Example response

{
  "message": "Mailbox credentials were verified and the mailbox is active again.",
  "nextStep": "Nothing to do.",
  "oauthUrl": "https://accounts.google.com/o/oauth2/auth?...",
  "result": "reconnected"
}

Changes

No recorded changes to this operation across all 1 revision of this API.