API referenceEmail accounts
POST
/email/api/v1/accounts/verify

Swarmhit's own. The same body as a MAIL connect; tries the IMAP and SMTP logins and creates nothing. 200 whatever the outcome: each leg says whether it worked and why not. imap_access_token / smtp_access_token (or access_token) in place of the passwords check an OAuth login (XOAUTH2) on the servers named: Google's token when the IMAP host is Gmail's (gmail.com, googlemail.com), else Microsoft's. The engine gets 15 s to answer. Limited with connects (120 per 10 minutes per client key, 429).

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The three kinds of connection in one body, plus Swarmhit's: oauth_app_id, email, name, expires_at, imap_tls / smtp_tls.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/email/api/v1/accounts/verify" \  -H "Content-Type: application/json" \  -d '{    "provider": "MAIL"  }'
{  "object": "AccountVerified",  "imap": {    "success": true,    "code": null,    "error": null,    "response_text": null,    "status_code": null  },  "smtp": {    "success": false,    "code": "EAUTH",    "error": "Invalid login: 535 Authentication failed",    "response_text": "535 Authentication failed",    "status_code": 535  }}