DELETE /v1/batch/snapshot/{snapshot_id}

Batch cancel API: stop a batch job or delete its results

Send a snapshot_id with DELETE. On a running job it stops new rows, lets in-flight rows finish and bill, keeps completed rows downloadable and sets the status to canceled. On a finished job it deletes the stored results now, and the job row stays for the usage ledger.

Price
Free
Batch
No
Failed calls
Not charged

Example request

curl
curl -X DELETE 'https://api.virev.ai/v1/batch/snapshot/s_31a1c44913e1e05f' \
  -H "Authorization: Bearer $VIREV_API_KEY"
python
import os
import requests

response = requests.request(
    "DELETE",
    "https://api.virev.ai/v1/batch/snapshot/s_31a1c44913e1e05f",
    headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
    timeout=60,
)
response.raise_for_status()
print(response.json())

Parameters

NameInTypeDescription
snapshot_id requiredpathstringThe id returned by POST /v1/batch/trigger.

Example response

The example response of the API reference.

json
{
  "data": {
    "snapshot_id": "s_31a1c44913e1e05f",
    "operation": "instagram.web_profile_info",
    "status": "canceled",
    "rows_total": 5,
    "rows_ready": 0,
    "rows_failed": 0,
    "cost": "$0.0000",
    "estimated_cost": "$0.0025",
    "format": "ndjson",
    "include_errors": false,
    "created_at": "2026-11-25T18:52:43.293Z",
    "finished_at": "2026-11-25T18:52:43.544Z",
    "expires_at": "2026-12-09T18:52:43.293Z"
  },
  "meta": {
    "cost": "$0.0000",
    "balance": "$326.8734",
    "request_id": "req_c92540e63ade6491e85364c9a1d7ada1"
  }
}

How it works

On an active job: cancel — the dispatcher stops, in-flight rows finish (and bill), completed rows stay downloadable, status becomes canceled. On a terminal job: delete the stored results now (early retention); the job row remains for the usage ledger.

Errors

StatusWhen
400The request parameters are invalid.
401Missing, malformed, or revoked API key.
402Balance is too low for this request.
404No such snapshot.
429Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged.
502The upstream fetch failed. You are not charged.
503Billing could not be confirmed, so no upstream data was returned.
504The upstream request timed out. You are not charged.

Guides that use this endpoint