ToAPIsToAPIs
User files

Get file deletion progress

Read the status and cumulative progress of your deletion request

GET
/api/v1/user/file/deletion-requests/{id}

Note for users in mainland China: Please use https://api.toapis.cn as the API endpoint (Base URL). Replace https://api.toapis.com with https://api.toapis.cn in the examples in this document.

Behavior

Read a deletion request owned by the current account. Missing requests and requests owned by another account both return 404. Counters update asynchronously and preserve cumulative deletions after files disappear from the list. processed means the currently discovered scope is complete; late registrations of older files can change the scope and state again. It does not certify deletion of unregistered objects.

Authentication

Authorizationstringheaderrequired

Use a system access token: Bearer YOUR_SYSTEM_ACCESS_TOKEN. Model API keys are not accepted and X-User-Id is not needed. Access is limited to the authenticated account's files and policy, without subaccount aggregation.

Request parameters

idstringpathrequired

The deletion request ID returned by the create operation, as a decimal string such as "456".

No query parameters or request body. Unknown or repeated query parameters return 400.

requestExample

curl --request GET \
  --url 'https://api.toapis.com/api/v1/user/file/deletion-requests/456' \
  --header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'
import requests

response = requests.get(
    "https://api.toapis.com/api/v1/user/file/deletion-requests/456",
    headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
    timeout=30,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.toapis.com/api/v1/user/file/deletion-requests/456", {
  method: "GET",
  headers: { Authorization: "Bearer YOUR_SYSTEM_ACCESS_TOKEN" },
  signal: AbortSignal.timeout(30_000),
});
if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(await response.json());

Response fields

Examples use fictional data. See Access for the shared response format.

data.idstring

Deletion request ID used to query progress.

data.scopestring

single deletes one specified file; all clears the current account's existing files.

data.file_idstring | null

File ID for scope=single; null for scope=all.

data.created_before_atstring | null

Inclusive creation-time cutoff for scope=all; null for scope=single.

data.statestring

pending: accepted; running: in progress; processed: current scope complete; blocked: blocked files or a failed progress refresh.

data.discovered_countinteger

Currently discovered files in scope; late registrations can increase it.

data.deleted_countinteger

Cumulative deleted files. The count remains after files disappear from the list.

data.blocked_countinteger

Currently blocked files. A failed progress refresh can also mark the request blocked while retaining the last successful counters.

data.created_atstring

Request creation time.

data.updated_atstring

Last progress update time.

responseExample

{
  "code": 0,
  "message": "",
  "data": {
    "id": "456",
    "scope": "single",
    "file_id": "123",
    "created_before_at": null,
    "state": "processed",
    "discovered_count": 1,
    "deleted_count": 1,
    "blocked_count": 0,
    "created_at": "2026-11-16T08:00:00Z",
    "updated_at": "2026-11-16T08:02:00Z"
  }
}

Errors

An invalid request ID or query parameters return 400. A missing or foreign deletion request returns 404. Temporarily unavailable progress reads return 503.

See Access for shared authentication, rate limits, and error handling.