Organisation usage roll-up

Read this period's sends per workspace and, for shared-pool organisations, the pool, what is allocated and what is still free — with an organisation key.

GET /v3/organisation/usage

Response (200)

json
{
  "quota_model": "shared_pool",
  "period": {
    "start": "2026-10-01T00:00:00.000Z",
    "end": "2026-11-01T00:00:00.000Z"
  },
  "pool": 1000000,
  "allocated": 850000,
  "unallocated": 150000,
  "used": 412380,
  "workspaces": [
    {
      "id": "9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64",
      "name": "Acme EU",
      "plan": "professional",
      "monthly_allocation": 50000,
      "used": 31204
    }
  ]
}

Counts cover the current calendar month (UTC) and exclude test-mode sends. In a separate-workspace organisation pool, allocated and unallocated are null, and so is each workspace's monthly_allocation.

Responses

StatusDescription
200OK.
401Missing or invalid organisation key — workspace keys (afn_live_ / afn_test_) are refused here by design.
403insufficient_scope — the key lacks usage:read — or ip_not_allowed.

Code examples

cURL
curl https://api.wemail.io/v3/organisation/usage \
  -H "Authorization: Bearer afn_org_…"
Node.js
const res = await fetch("https://api.wemail.io/v3/organisation/usage", {
  headers: { Authorization: "Bearer " + process.env.WEMAIL_ORG_KEY },
});
console.log(await res.json());
Python
import os, requests

res = requests.get(
    "https://api.wemail.io/v3/organisation/usage",
    headers={"Authorization": "Bearer " + os.environ["WEMAIL_ORG_KEY"]},
)
print(res.json())
ResponseExample response
{
  "quota_model": "shared_pool",
  "period": {
    "start": "2026-10-01T00:00:00.000Z",
    "end": "2026-11-01T00:00:00.000Z"
  },
  "pool": 1000000,
  "allocated": 850000,
  "unallocated": 150000,
  "used": 412380,
  "workspaces": [
    {
      "id": "9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64",
      "name": "Acme EU",
      "plan": "professional",
      "monthly_allocation": 50000,
      "used": 31204
    }
  ]
}