Disconnect an email account
Soft-disconnects the account: stops the mailbox watch (Gmail users.stop, Outlook subscription delete), marks the EmailAccount isActive: false, and clears historyId / watchExpiration. The stored OAuth tokens are kept on the document but the account no longer participates in sync.
Authorization
bearerAuth AuthorizationBearer <token>
In: header
Path Parameters
accountId*string
Internal _id of the EmailAccount document.
Response Body
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/email/accounts/string"{ "success": true}