Overview
Connect a Google account once from the dashboard, then send and read its mail over plain REST. Base URL: https://api.reinterface.com/api/v1. All responses are JSON. Last updated: 2026-07-28.
Authentication
Every request carries your personal API key in the x-api-key header. Find it (and regenerate it) under Dashboard → Settings → API key. The key identifies you, so it only ever reaches accounts you connected yourself.
-H "x-api-key: <YOUR_API_KEY>"Picking an account: if you have exactly one connected Google account you never need to pass anything, every endpoint defaults to it. With several accounts, pass connection_id (from GET /google/accounts) to choose one.
Connected accounts
Lists your connected Google accounts. Use the returned id as connection_id when you have more than one account.
/api/v1/google/accountsList your connected Google accounts
curl https://api.reinterface.com/api/v1/google/accounts \
-H "x-api-key: <YOUR_API_KEY>"{
"accounts": [
{
"id": "<CONNECTION_ID>",
"email": "user@gmail.com",
"name": "User Name",
"status": "connected",
"scopes": ["...gmail.send", "...gmail.readonly"],
"last_connected_at": "2026-07-16T09:00:00Z"
}
]
}Send email
/api/v1/gmail/sendSend email as the connected account
Provide to, subject, and text and/or html. connection_id is optional.
curl -X POST https://api.reinterface.com/api/v1/gmail/send \
-H "x-api-key: <YOUR_API_KEY>" \
-H "content-type: application/json" \
-d '{
"to": "recipient@example.com",
"subject": "Hello",
"html": "<p>Body</p>"
}'{
"id": "18c1a2b3d4e5f6a7",
"threadId": "18c1a2b3d4e5f6a7",
"status": "sent"
}List messages
/api/v1/gmail/messagesList recent messages (metadata + snippet)
Query params: max_results (default 10, max 50) and optional connection_id.
curl "https://api.reinterface.com/api/v1/gmail/messages?max_results=10" \
-H "x-api-key: <YOUR_API_KEY>"{
"messages": [
{
"id": "18c1a2b3d4e5f6a7",
"threadId": "18c1a2b3d4e5f6a7",
"snippet": "First lines of the email…",
"subject": "Hello",
"from": "Sender <sender@example.com>",
"to": "user@gmail.com",
"date": "Thu, 17 Jul 2026 09:00:00 +0000"
}
]
}Get one message
/api/v1/gmail/messages/{id}Get one message with the full body
curl "https://api.reinterface.com/api/v1/gmail/messages/18c1a2b3d4e5f6a7" \
-H "x-api-key: <YOUR_API_KEY>"{
"id": "18c1a2b3d4e5f6a7",
"threadId": "18c1a2b3d4e5f6a7",
"snippet": "First lines of the email…",
"subject": "Hello",
"from": "Sender <sender@example.com>",
"to": "user@gmail.com",
"date": "Thu, 17 Jul 2026 09:00:00 +0000",
"text": "Plain-text body",
"html": "<p>HTML body</p>"
}Errors
Errors return { "success": false, "error": { "code", "message" } }.
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Missing or invalid x-api-key |
| 400 | invalid_request | Missing required fields |
| 403 | missing_scope | Account lacks a Gmail permission, reconnect it |
| 404 | not_found | connection_id does not exist or is not yours |
| 404 | google_account_not_connected | No connected Google account |
| 502 | gmail_send_failed | Gmail rejected the send |
Endpoint summary
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/google/accounts | List your connected Google accounts |
| POST | /api/v1/gmail/send | Send email via Gmail |
| GET | /api/v1/gmail/messages | List recent messages |
| GET | /api/v1/gmail/messages/{id} | Get one message (full body) |