Disable an agent inbox
Disable an agent inbox with DELETE /v3/agent-inboxes/{id}: the address stops receiving and is never given to anyone else.
The address stops receiving within 30 seconds — senders get "no such mailbox" — and is retired for good. Mail already received stays in your inbound mailbox and conversations. Calling it again is harmless.
DELETE /v3/agent-inboxes/{id}
| Status | Description |
|---|---|
204 | Disabled. |
403 | insufficient_scope — needs a full_access key. |
404 | No such inbox on your workspace, or feature_disabled. |
401 | Missing or invalid API key. |
Code examples
cURL
curl -X DELETE https://api.wemail.io/v3/agent-inboxes/{id} \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/agent-inboxes/{id}", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();Python
import os, requests
r = requests.delete(
"https://api.wemail.io/v3/agent-inboxes/{id}",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()