Overview & Authentication
A standalone service to connect an email account, send, and receive across three providers. The three connectors share one API — your app always calls the same /send and /fetch; only the one-time connect step differs per provider (imap_smtp, outlook, or google).
| Item | Value |
|---|---|
| Base URL | https://api.reinterface.com/api/v1 |
| Auth header | x-api-key: <API_KEY> |
| Content-Type | application/json for POST bodies |
| Transport | HTTPS only (trusted cert); HTTP redirects to HTTPS. Port 443 |
Last updated: 2026-08-08
Response format & status codes
{
"success": true,
"data": { }
}{
"success": false,
"error": {
"code": "STRING",
"message": "..."
}
}| Status | Meaning |
|---|---|
| 200 | OK |
| 400 | Bad request / missing fields |
| 401 | Bad API key |
| 404 | Account not found |
| 502 | Upstream send/fetch failed |
| 500 | Server / DB error |
Health (no auth)
curl https://api.reinterface.com/healthz{"status":"ok"}/healthzHealth check (no auth)
Try it
https://api.reinterface.com/healthzProxied server-side with your signed-in session (no auth for this endpoint).
Common account endpoints
Account operations work for all providers. Responses show provider and conn_status; passwords and tokens are never returned.
/api/v1/accountsList all accounts
/api/v1/accounts/{email}Get one account
/api/v1/accounts/{email}Delete an account
List all accounts
curl https://api.reinterface.com/api/v1/accounts \
-H "x-api-key: <API_KEY>"/api/v1/accountsList all connected accounts
Try it
https://api.reinterface.com/api/v1/accountsProxied server-side with your signed-in session.
Get one account
curl https://api.reinterface.com/api/v1/accounts/USER@DOMAIN.com \
-H "x-api-key: <API_KEY>"/api/v1/accounts/{email}Get one account by email
Try it
https://api.reinterface.com/api/v1/accounts/{email}Proxied server-side with your signed-in session.
Delete an account
curl -X DELETE https://api.reinterface.com/api/v1/accounts/USER@DOMAIN.com \
-H "x-api-key: <API_KEY>"/api/v1/accounts/{email}Remove a connected account
Try it
https://api.reinterface.com/api/v1/accounts/{email}Proxied server-side with your signed-in session.
Unified send — POST /send
Works for all providers. The service auto-selects SMTP, Microsoft Graph, or Gmail API from the connected from account.
curl -X POST https://api.reinterface.com/api/v1/send \
-H "x-api-key: <API_KEY>" \
-H "content-type: application/json" \
-d '{
"from": "USER@DOMAIN.com",
"to": "recipient@example.com",
"subject": "Hello",
"html": "<p>Body</p>"
}'{
"success": true,
"data": {
"messageId": "<...>",
"accepted": ["recipient@example.com"],
"rejected": null
}
}/api/v1/sendSend email from a connected account
Try it
https://api.reinterface.com/api/v1/sendProxied server-side with your signed-in session.
Unified fetch — POST /fetch
Searches Inbox + Spam/Junk; returns placement + SPF/DKIM/DMARC. Match by messageId (exact, preferred) or subject (substring).
curl -X POST https://api.reinterface.com/api/v1/fetch \
-H "x-api-key: <API_KEY>" \
-H "content-type: application/json" \
-d '{
"email": "USER@DOMAIN.com",
"subject": "Hello"
}'curl -X POST https://api.reinterface.com/api/v1/fetch \
-H "x-api-key: <API_KEY>" \
-H "content-type: application/json" \
-d '{
"email": "USER@DOMAIN.com",
"messageId": "<abc@sender.com>"
}'{
"success": true,
"data": {
"count": 1,
"emails": [
{
"messageId": "abc@sender.com",
"subject": "Hello",
"from": "sender@example.com",
"to": "USER@DOMAIN.com",
"date": "2026-07-02T08:00:00Z",
"folder": "inbox",
"receivingIp": "1.2.3.4",
"spf": "pass",
"dkim": "pass",
"dmarc": "pass",
"rawHeaders": "..."
}
]
}
}Not found: { "success": true, "data": { "count": 0, "emails": null } }. Errors: 404 (account not connected), 502 (fetch failed). After /send, delivery can take a few seconds — poll /fetch until count > 0.
folder values: inbox, spam, trash. SPF/DKIM/DMARC may be pass, fail, softfail, neutral, or unknown.
/api/v1/fetchFetch emails from Inbox + Spam/Junk
Try it
https://api.reinterface.com/api/v1/fetchProxied server-side with your signed-in session.
Connector A — IMAP / SMTP Working
Standard mailboxes (host + port + user + password). No OAuth. Connect validates IMAP + SMTP, then stores; passwords encrypted at rest.
/api/v1/accountsConnect + validate + store
/api/v1/accounts/test-imapValidate IMAP (no store)
/api/v1/accounts/test-smtpValidate SMTP (no store)
Connect
curl -X POST https://api.reinterface.com/api/v1/accounts \
-H "x-api-key: <API_KEY>" \
-H "content-type: application/json" \
-d '{
"email": "USER@DOMAIN.com",
"imap_host": "imap.domain.com",
"imap_port": 993,
"imap_username": "USER@DOMAIN.com",
"imap_password": "secret",
"smtp_host": "smtp.domain.com",
"smtp_port": 587,
"smtp_username": "USER@DOMAIN.com",
"smtp_password": "secret"
}'→ 200 with the stored account (conn_status: "valid"); or 400 IMAP_FAILED / SMTP_FAILED.
/api/v1/accountsConnect IMAP/SMTP account (validates + stores)
Try it
https://api.reinterface.com/api/v1/accountsProxied server-side with your signed-in session.
Validate without storing
POST /api/v1/accounts/test-imap with host, port, username, password. Same shape for POST /api/v1/accounts/test-smtp. Then use unified /send and /fetch.
curl -X POST https://api.reinterface.com/api/v1/accounts/test-imap \
-H "x-api-key: <API_KEY>" \
-H "content-type: application/json" \
-d '{
"host": "imap.domain.com",
"port": 993,
"username": "USER@DOMAIN.com",
"password": "secret"
}'curl -X POST https://api.reinterface.com/api/v1/accounts/test-smtp \
-H "x-api-key: <API_KEY>" \
-H "content-type: application/json" \
-d '{
"host": "smtp.domain.com",
"port": 587,
"username": "USER@DOMAIN.com",
"password": "secret"
}'/api/v1/accounts/test-imapValidate IMAP credentials (no store)
Try it
https://api.reinterface.com/api/v1/accounts/test-imapProxied server-side with your signed-in session.
/api/v1/accounts/test-smtpValidate SMTP credentials (no store)
Try it
https://api.reinterface.com/api/v1/accounts/test-smtpProxied server-side with your signed-in session.
Connector B — Outlook (OAuth / Microsoft Graph) Needs Azure admin consent
For Microsoft 365 / Outlook mailboxes.
One-time Azure setup
- App Reinterface (client 02e56072-0f37-4467-b088-c356ce7b46b6).
- Add redirect URI (App registration → Authentication → Web): https://api.reinterface.com/api/v1/oauth/outlook/callback
- Mailbox must be in a tenant the app allows; tenant admin may need to Grant admin consent once.
Connect
Request the consent URL with your API key, then open it in a browser:
curl "https://api.reinterface.com/api/v1/oauth/outlook/authorize?email=USER@DOMAIN.com&format=json" \
-H "x-api-key: <API_KEY>"
# → {"authUrl": "https://login.microsoftonline.com/...", "email": "USER@DOMAIN.com"}
# Open authUrl in the browser.→ sign in → consent → "Outlook account connected". Then use unified /send and /fetch.
x-api-key as a header. Keys in URLs would land in browser history, logs and Referer headers.Connector C — Google (OAuth / Gmail API) Ready
For Gmail / Google Workspace mailboxes.
One-time Google Cloud setup
- OAuth client 443730906966-a8vahhuan2mi86jlmr5dh3c8u64fesig.apps.googleusercontent.com (project 443730906966).
- Redirect URI (already registered): https://api.reinterface.com/api/v1/oauth/google/callback
- Scopes: gmail.send + gmail.readonly (restricted) and calendar.events + calendar.readonly (sensitive), plus openid email profile.
- Publishing status: "In production" = any user; "Testing" = test users only, refresh token expires in 7 days.
Connect
Request the consent URL with your API key, then open it in a browser:
curl "https://api.reinterface.com/api/v1/oauth/google/authorize?email=USER@gmail.com&format=json" \
-H "x-api-key: <API_KEY>"
# → {"authUrl": "https://accounts.google.com/o/oauth2/...", "email": "USER@gmail.com"}
# Open authUrl in the browser.Refresh token tip
→ sign in → consent → "Google account connected". Then use unified /send and /fetch.
Gmail & Calendar APIs
Operating on a connected Google account — sending Gmail, reading messages, and managing Calendar events — is its own surface, authenticated with your personal API key from the dashboard Settings page. It is documented separately: Gmail API reference and Calendar API reference.
Full endpoint summary
Service surface — x-api-key:
| Method | Path | Purpose |
|---|---|---|
| GET | /healthz | Health (no auth) |
| GET | /api/v1/accounts | List accounts |
| GET | /api/v1/accounts/{email} | Get one account |
| DELETE | /api/v1/accounts/{email} | Remove account |
| POST | /api/v1/accounts | IMAP/SMTP connect + validate + store |
| POST | /api/v1/accounts/test-imap | Validate IMAP (no store) |
| POST | /api/v1/accounts/test-smtp | Validate SMTP (no store) |
| GET | /api/v1/oauth/outlook/authorize | Outlook connect (redirect to MS) |
| GET | /api/v1/oauth/outlook/callback | MS redirects here (auto, no auth) |
| GET | /api/v1/oauth/google/authorize | Google connect (redirect to Google) |
| GET | /api/v1/oauth/google/callback | Google redirects here (auto, no auth) |
| POST | /api/v1/send | Send (all providers) |
| POST | /api/v1/fetch | Read Inbox + Spam/Junk (all providers) |
Notes
- One API, three providers — connect differs; /send and /fetch are identical.
- Credentials at rest: IMAP/SMTP passwords and OAuth refresh tokens are AES-256-GCM encrypted; access tokens fetched on demand, never stored; secrets never returned.
- Max request body: 25 MB.
- SPF/DKIM/DMARC come from the receiving server's Authentication-Results header; they read unknown only for internal-only deliveries that omit that header.
- API keys go in the x-api-key header only; the API does not accept keys in URLs.