Data removal status
Poll an erasure request for completion and per-table counts.
Get data-removal status
Erasures usually finish within seconds; large accounts with millions of rows can take longer. Once done, counts reports what the erasure touched — useful for the record you keep of the data-subject request.
GET /v3/data-removals/{id}
Response fields
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | Optional | pending → processing → done (or failed with the error). |
counts | object | Optional | Numbers per effect, null until done: messages, events (rows whose recipient was shredded), verifications (rows deleted), upload_downloads (rows cleared), dek_tombstoned (1 when this request destroyed the subject’s key), body_deks_destroyed (message bodies made unreadable because every recipient is now erased), exports_purged (export files deleted) and already_erased (1 when the subject had already been erased — the request is idempotent). Treat it as an open object; more keys may be added. |
created_at / completed_at | ISO-8601 | Optional | When the request was made and when the erasure finished. |
Responses
| Status | Description |
|---|---|
200 | The removal request. |
404 | No such removal on your account. |
Code examples
cURL
curl https://api.wemail.io/v3/data-removals/rem_7f3a2b1c \
-H "Authorization: Bearer afn_live_…"Node.js
import { WemailClient } from "@wemailio/sdk";
const wemail = new WemailClient(process.env.WEMAIL_API_KEY);
const removal = await wemail.dataRemovals.getDataRemoval({ id: removalId });
console.log(removal.status, removal.counts);Python
import os
from wemail import WemailClient
wemail = WemailClient(api_key=os.environ["WEMAIL_API_KEY"])
removal = wemail.data_removals.get_data_removal(removal_id)
print(removal.status, removal.counts)PHP
<?php
$wemail = new \Wemail\WemailClient(getenv('WEMAIL_API_KEY'));
$removal = $wemail->dataRemovals()->getDataRemoval($removalId);
echo $removal->getStatus();Ruby
wemail = Wemail::Client.new(api_key: ENV["WEMAIL_API_KEY"])
removal = wemail.data_removals.get_data_removal(removal_id)
puts removal.statusGo
client, _ := wemail.NewClient(os.Getenv("WEMAIL_API_KEY"))
// Generated layer (client.API.*): pass the key in the context.
ctx := context.WithValue(context.Background(), wemail.ContextAccessToken, os.Getenv("WEMAIL_API_KEY"))
removal, _, err := client.API.DataRemovalsAPI.GetDataRemoval(ctx, removalID).Execute()
fmt.Println(removal.Status, removal.GetCounts())Java
WemailClient wemail = new WemailClient(System.getenv("WEMAIL_API_KEY"));
DataRemoval removal = wemail.dataRemovals().getDataRemoval(removalId);
System.out.println(removal.getStatus() + " " + removal.getCounts());.NET
var wemail = new WemailClient(Environment.GetEnvironmentVariable("WEMAIL_API_KEY"));
var removal = await wemail.DataRemovals.GetDataRemovalAsync(removalId);
Console.WriteLine(quot;{removal.Status}");