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

ParameterTypeRequiredDescription
account.iduuidOptionalThe account your credentials belong to.
account.name · account.plan · account.statusstringsOptionalDisplay name, current plan and account status (active, suspended, …).
api_key.idstringOptionalThe id of the key that authenticated the request.
api_key.scopestringOptionalfull_access, send_only or read_only — see Authentication → Scopes.
api_key.environmentstringOptionallive or test.

Responses

StatusDescription
200OK. { account: { id, name, plan, status }, api_key: { id, scope, environment } }. For quota and credit numbers, use GET /v3/usage — see Usage & quota.
401Missing, invalid or revoked API key.
403The 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()