Async APIsOverview

Async APIs

Submit large masking or unmasking jobs for background processing and poll for results using a tracking ID.

Overview

Protecto's async endpoints are for large payloads or long-running operations where you don't want the request to block or risk timeouts.

The async flow is always:

  1. Submit an async job (mask or unmask) → receive a tracking_id
  2. Poll the Async Status API with tracking_id until the job reaches a terminal state
  3. Read the result from the status response

Async APIs require a paid subscription. They are not available on the trial.

When to use async

ScenarioUse async?
Small, single-value requestsNo — use synchronous APIs
Large batch of valuesYes
Payloads that may exceed request timeoutsYes
Need reliable job tracking for batch workflowsYes

Submit response

All async submit endpoints return a tracking_id and initial status:

{
  "data": [
    {
      "tracking_id": "17079670-e3a1-4643-b821-59f7b3c7824a26092024151238",
      "status": "PENDING"
    }
  ],
  "success": true,
  "error": { "message": "" }
}

Polling guidance

  • Poll the Async Status endpoint every 30–60 seconds
  • Stop polling when status becomes SUCCESS, FAILED, or PURGED
  • Store results on your side when SUCCESS — results may eventually be purged