Organisation audit log

Read the audit log across every workspace of your organisation with an organisation key — including everything done through the Organisation API, with the key that did it.

One stream across all workspaces, newest first. account_id is the workspace an entry belongs to. Entries made through the Organisation API carry actor_type: "system" and a details JSON with via: "organisation_api" and the org_key_id that made the change.

GET /v3/organisation/audit

Query parameters

ParameterTypeRequiredDescription
workspace_idstringOptionalOnly entries of this workspace.
actionstringOptionalExact action, e.g. key.created, workspace.archived, workspace.limits_updated.
sincestringOptionalISO 8601 lower bound.
untilstringOptionalISO 8601 upper bound.
pageintegerOptionalPage number, starting at 1.
per_pageintegerOptionalEntries per page, 1–100. Default 25.

Response (200)

json
{
  "items": [
    {
      "id": "a7b8c9d0-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
      "account_id": "9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64",
      "actor_id": null,
      "actor_type": "system",
      "action": "key.created",
      "target": "3f6b2a9e-1c4d-4e8f-9a0b-5c6d7e8f9a0b",
      "details": "{\"via\": \"organisation_api\", \"org_key_id\": \"0f1e2d3c-4b5a-4968-8776-655443322110\", \"company_id\": \"7c4e1a2b-0d7f-4a1e-9b3c-2f8e6d5a4c31\", \"workspace_id\": \"9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64\", \"name\": \"Acme EU production\", \"scope\": \"send_only\", \"env\": \"live\"}",
      "ip_address": "203.0.113.7",
      "created_at": "2026-10-29T10:05:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_count": 1,
    "total_pages": 1
  }
}

Responses

StatusDescription
200OK. A page of audit entries (same shape as GET /v3/audit).
401Missing or invalid organisation key — workspace keys (afn_live_ / afn_test_) are refused here by design.
403insufficient_scope — the key lacks audit:read — or ip_not_allowed.

Code examples

cURL
curl https://api.wemail.io/v3/organisation/audit \
  -H "Authorization: Bearer afn_org_…"
Node.js
const res = await fetch("https://api.wemail.io/v3/organisation/audit", {
  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/audit",
    headers={"Authorization": "Bearer " + os.environ["WEMAIL_ORG_KEY"]},
)
print(res.json())
ResponseExample response
{
  "items": [
    {
      "id": "a7b8c9d0-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
      "account_id": "9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64",
      "actor_id": null,
      "actor_type": "system",
      "action": "key.created",
      "target": "3f6b2a9e-1c4d-4e8f-9a0b-5c6d7e8f9a0b",
      "details": "{"via": "organisation_api", "org_key_id": "0f1e2d3c-4b5a-4968-8776-655443322110", "company_id": "7c4e1a2b-0d7f-4a1e-9b3c-2f8e6d5a4c31", "workspace_id": "9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64", "name": "Acme EU production", "scope": "send_only", "env": "live"}",
      "ip_address": "203.0.113.7",
      "created_at": "2026-10-29T10:05:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_count": 1,
    "total_pages": 1
  }
}