File Job Status
Check the status of a file masking job, retrieve its full result after completion, and understand file masking data retention.
Check a file job
PUT /mask/file/async-status returns the status and, when requested, the result of a job submitted through Mask File. By default, it returns only the status, keeping polling fast and light.
File masking data is kept for a configurable retention period before it is deleted.
Recommended flow
Submit the file
Submit the file with PUT /mask/file/async and keep the tracking_id.
Poll the job status
Call PUT /mask/file/async-status without query parameters until the status is SUCCESS or FAILED.
Fetch the result
Fetch the result once with include_result=true. For large files, also set stream=true.
Endpoint
| Method | Route | Headers |
|---|---|---|
| PUT | {baseurl}/vault/mask/file/async-status | Authorization: Bearer <vault-user-api-key>, Content-Type: application/json |
| PUT | {baseurl}/vault/mask/file/async-status?include_result=true | Authorization: Bearer <vault-user-api-key>, Content-Type: application/json |
| PUT | {baseurl}/vault/mask/file/async-status?include_result=true&stream=true | Authorization: Bearer <vault-user-api-key>, Content-Type: application/json |
The API key needs the mask permission.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
status | array | Yes | The file jobs to check. |
status[].tracking_id | string | Yes | A tracking ID returned by PUT /mask/file/async. |
Example request
{"status": [{"tracking_id": "dbb13c32-7d26-4dc3-a182-e8582739188803122026051650"}]}
Query parameters
Both query parameters are optional.
| Query | Response |
|---|---|
None, or include_result=false | Status only: tracking_id, status, error_msg, submitted_time, process_start_time, and completed_time for each job. No result is returned, and stream has no effect. |
include_result=true | Status and the full result in one JSON response. Results over 1 MB are refused. |
include_result=true&stream=true | The same JSON, streamed. Supports results of any size. |
Response
Status only
By default, the endpoint returns the job status without the result.
{
"data": [
{
"tracking_id": "dbb13c32-7d26-4dc3-a182-e8582739188803122026051650",
"status": "SUCCESS",
"error_msg": null,
"submitted_time": "2026-12-03 07:37:08",
"process_start_time": "2026-12-03 07:37:08",
"completed_time": "2026-12-03 07:43:57"
}
],
"success": true,
"error": {"message": ""}
}
With result
For a completed job, include_result=true returns the result alongside the status.
{
"data": [
{
"tracking_id": "dbb13c32-7d26-4dc3-a182-e8582739188803122026051650",
"call_type": "mask_file",
"result": [
{
"status": "SUCCESS",
"error_msg": null,
"file_name": "abc.pdf",
"file_type": "pdf",
"data": {
"value": "John Doe lives at 123 Maple Street.",
"token_value": "<PER>VJYe 03W</PER> lives at <ADDRESS>0ht B4P2z D1l7uy</ADDRESS>.",
"toxicity_analysis": {"toxicity": 0.01, "severe_toxicity": 0.0, "obscene": 0.0, "threat": 0.0, "insult": 0.01, "identity_attack": 0.0},
"individual_tokens": [
{"value": "John Doe", "pii_type": "PERSON", "token": "VJYe 03W", "prefix": "<PER>", "suffix": "</PER>", "start_pos": 0, "end_pos": 8},
{"value": "123 Maple Street", "pii_type": "ADDRESS", "token": "0ht B4P2z D1l7uy", "prefix": "<ADDRESS>", "suffix": "</ADDRESS>", "start_pos": 18, "end_pos": 34}
]
}
}
],
"error_msg": null,
"submitted_time": "2026-10-16 10:00:00",
"process_start_time": "2026-10-16 10:00:03",
"completed_time": "2026-10-16 10:02:10",
"status": "SUCCESS"
}
],
"success": true,
"error": {"message": ""}
}
While a job is still running, its status is IN-PROGRESS and each result item has data: null.
Job fields
| Field | Description |
|---|---|
tracking_id | The job's tracking ID. |
status | PENDING, IN-PROGRESS, SUCCESS, or FAILED. While the file is still being received, the status is UPLOADING. Treat any unrecognized status as not finished successfully. |
error_msg | Why the job failed; null otherwise. |
call_type | mask_file for a file job. |
result[].status, result[].error_msg | The file's outcome. With one file per request, these match the job's outcome. |
result[].file_name, result[].file_type | The file the result belongs to. file_type is lowercase. |
result[].data.value | The text extracted from the file. |
result[].data.token_value | The masked text. |
result[].data.individual_tokens | One entry per masked entity. Positions are zero-based offsets in value, with end_pos exclusive. |
result[].data.excluded_entities | Unmasked entities found that your policy excludes, with value, pii_type, start_pos, and end_pos. Present only when some were found and identify_excluded_entities was true. |
result[].data.toxicity_analysis | Toxicity scores for value. |
submitted_time, process_start_time, completed_time | When the job was submitted, started, and finished, in YYYY-MM-DD HH:MM:SS format. |
Large results, errors, and access
Large results
With include_result=true&stream=false, the endpoint refuses results over 1 MB with HTTP 500 and success: false. Call again with stream=true.
Streaming sends the same JSON with Transfer-Encoding: chunked. A normal HTTP client reads it like any other response, so the same code handles both modes. For very large files, read the body as a stream to keep memory use low.
If a streamed response breaks partway, its body is not valid JSON. Treat the call as failed and try again.
Access and other rules
- You can read only your own jobs in your own namespace. An unknown tracking ID, or one belonging to another user, returns
Given tracking_ids not exists or Access denied. - The outer
successindicates whether the status call worked. Each job'sstatusanderror_msgindicate how the job ended. - Results are stored once, so repeated calls return the same result.
- Check text jobs submitted through
PUT /mask/asyncwithPUT /async-status, not the file status endpoint.