List API keys
Manage API keys programmatically.
Manage API keys programmatically — useful for CI rotation or onboarding scripts. This endpoint lists every key with a redacted prefix; the full secret is returned only on creation.
GET /v3/keys
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | Optional | Page number, starting at 1. Default 1. |
per_page | integer | Optional | Keys per page, 1–100. Default 25. |
Responses
| Status | Description |
|---|---|
200 | OK. Your active API keys (id, name, prefix, scope, env, last_used_at) — the secret is never returned and revoked keys are excluded. |
401 | Missing or invalid API key. |
Code examples
cURL
curl https://api.wemail.io/v3/keys \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/keys", {
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/keys",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()