Archive a workspace
Archive a workspace with an organisation key: its API keys stop authenticating and sending stops at once, nothing is deleted, and it can be restored later.
Archiving suspends the workspace: its API keys stop authenticating and sending stops within seconds. Nothing is deleted — Restore a workspace brings it back. The home workspace (403) and the last active workspace of the organisation (409) cannot be archived. Archiving an already-archived workspace returns it unchanged.
POST /v3/organisation/workspaces/{id}/archive
Response (200)
json
{
"id": "9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64",
"name": "Acme EU",
"slug": "acme-eu",
"status": "archived",
"home": false,
"plan": "professional",
"timezone": "Europe/Athens",
"default_language": "en",
"created_at": "2026-10-29T10:00:00Z"
}Responses
| Status | Description |
|---|---|
200 | OK. The workspace, now archived. |
401 | Missing or invalid organisation key — workspace keys (afn_live_ / afn_test_) are refused here by design. |
403 | insufficient_scope — the key lacks workspaces:write — or ip_not_allowed. Or the home workspace. |
404 | No workspace with this id in your organisation (ids of other organisations are never revealed). |
409 | The last active workspace cannot be archived. |
Code examples
cURL
curl -X POST https://api.wemail.io/v3/organisation/workspaces/9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64/archive \
-H "Authorization: Bearer afn_org_…"Node.js
const res = await fetch("https://api.wemail.io/v3/organisation/workspaces/9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64/archive", {
method: "POST",
headers: { Authorization: "Bearer " + process.env.WEMAIL_ORG_KEY },
});
console.log(await res.json());Python
import os, requests
res = requests.post(
"https://api.wemail.io/v3/organisation/workspaces/9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64/archive",
headers={"Authorization": "Bearer " + os.environ["WEMAIL_ORG_KEY"]},
)
print(res.json())ResponseExample response
{
"id": "9d2f6c1e-4b3a-4e7d-8a1f-0c5b7e9d2a64",
"name": "Acme EU",
"slug": "acme-eu",
"status": "archived",
"home": false,
"plan": "professional",
"timezone": "Europe/Athens",
"default_language": "en",
"created_at": "2026-10-29T10:00:00Z"
}