List subaccounts
Create and manage account-scoped tenant records for SaaS and reseller workflows.
Subaccounts are account-scoped tenant records you can use to model customers in SaaS and reseller workflows. List, create, and update them with a parent account API key.
How subaccounts work
Subaccounts model the customers of a SaaS or reseller platform under a single parent account and API key: a tenant record with a name, a status and timestamps that you can list, create and update. They give you a stable identifier to hang your own bookkeeping on and to filter your usage by. Sending, domains, keys and suppressions remain the parent account's; there is no per-subaccount impersonation header in v3, so tag sends with the tenant id to attribute events and metrics.
Endpoints in this section
GET /v3/subaccounts lists tenant records (this page). POST /v3/subaccounts creates one. PATCH /v3/subaccounts/{id} renames it or changes its status. GET /v3/usage and the Audit log in the same section cover the parent account's quota and its change history.
GET /v3/subaccounts
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | Optional | Page number, starting at 1. Default 1. |
per_page | integer | Optional | Subaccounts per page, 1–100. Default 25. |
Responses
| Status | Description |
|---|---|
200 | OK. A page of your subaccounts (id, parent_account_id, name, slug, status). |
401 | Missing or invalid API key. |
Code examples
curl https://api.wemail.io/v3/subaccounts \
-H "Authorization: Bearer afn_live_…"const res = await fetch("https://api.wemail.io/v3/subaccounts", {
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://api.wemail.io/v3/subaccounts",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()