Who am I
Identify the authenticated caller — the fastest way to smoke-test credentials.
Echoes the identity your credentials resolve to. Call it from CI or a deploy hook to confirm an API key is valid, pointed at the right account, and carrying the scope you expect — before any traffic depends on it.
GET /v3/whoami
Response fields
| Parameter | Type | Required | Description |
|---|---|---|---|
account.id | uuid | Optional | The account your credentials belong to. |
account.name · account.plan · account.status | strings | Optional | Display name, current plan and account status (active, suspended, …). |
api_key.id | string | Optional | The id of the key that authenticated the request. |
api_key.scope | string | Optional | full_access, send_only or read_only — see Authentication → Scopes. |
api_key.environment | string | Optional | live or test. |
Responses
| Status | Description |
|---|---|
200 | OK. { account: { id, name, plan, status }, api_key: { id, scope, environment } }. For quota and credit numbers, use GET /v3/usage — see Usage & quota. |
401 | Missing, invalid or revoked API key. |
403 | The account is suspended or deleted. |
Code examples
cURL
curl https://api.wemail.io/v3/whoami \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/whoami", {
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://api.wemail.io/v3/whoami",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()