List workspace API keys

List a workspace's API keys with an organisation key — redacted prefixes, scopes, environment and last use, the same shape the workspace sees itself.

Everything inside a workspace — sending, domains, suppressions, webhooks — is done with that workspace's own key. The organisation can list, mint, rotate and revoke those keys. Secrets are never listed; they are returned once, on Create and Rotate.

GET /v3/organisation/workspaces/{id}/keys

Query parameters

ParameterTypeRequiredDescription
pageintegerOptionalPage number, starting at 1. Default 1.
per_pageintegerOptionalKeys per page, 1–100. Default 25.

Response (200)

json
{
  "items": [
    {
      "id": "3f6b2a9e-1c4d-4e8f-9a0b-5c6d7e8f9a0b",
      "name": "Acme EU production",
      "prefix": "afn_live_pK7d",
      "scope": "send_only",
      "env": "live",
      "verify_before_send": null,
      "test_outcomes": null,
      "ip_allowlist": [],
      "last_used_at": "2026-10-29T11:02:10Z",
      "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 the workspace's keys, prefixes redacted.
401Missing or invalid organisation key — workspace keys (afn_live_ / afn_test_) are refused here by design.
403insufficient_scope — the key lacks keys:read — or ip_not_allowed.
404No workspace with this id in your organisation (ids of other organisations are never revealed).

Code examples

cURL
curl https://api.wemail.io/v3/organisation/workspaces/9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64/keys \
  -H "Authorization: Bearer afn_org_…"
Node.js
const res = await fetch("https://api.wemail.io/v3/organisation/workspaces/9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64/keys", {
  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/workspaces/9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64/keys",
    headers={"Authorization": "Bearer " + os.environ["WEMAIL_ORG_KEY"]},
)
print(res.json())
ResponseExample response
{
  "items": [
    {
      "id": "3f6b2a9e-1c4d-4e8f-9a0b-5c6d7e8f9a0b",
      "name": "Acme EU production",
      "prefix": "afn_live_pK7d",
      "scope": "send_only",
      "env": "live",
      "verify_before_send": null,
      "test_outcomes": null,
      "ip_allowlist": [],
      "last_used_at": "2026-10-29T11:02:10Z",
      "created_at": "2026-10-29T10:05:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_count": 1,
    "total_pages": 1
  }
}