https://api.veriko.mx/v1/validations/{id}/purge/executeExecute the permanent deletion of a validation
How-to guide →Permanently deletes the content of one of your own validations, with the token issued by POST /v1/validations/{id}/purge/prepare. It is the second step of a two-step flow: without that token nothing is deleted.
What is deleted:
- The receipt file, image or PDF.
- The CEP, as XML and as PDF.
request_data,ocr_result,banxico_result, and the normalization warnings. Ofnormalized_data, only the amount is kept.- The derived records with personal data: retry attempts, account probes, stored
Idempotency-Keyresponses, and inbox notifications. - The sent body and the receiver response in the webhook deliveries of that validation, and the content of its notifications. The record of each delivery is kept.
- The bodies of the audit rows that name the validation, and the free-form context of its security events.
The validation is left as a tombstone: it keeps id, validation_type, status, banxico_status, the dates, processing_time_ms, error_code, the amount, and purged_at. With that, quota, statistics, finance, and history keep adding up. The deletion does not refund quota.
After the deletion, GET /v1/validations/{id} responds with the tombstone with an HTTP status 200 and purged_at. The image, the CEP, the retries, and the follow-up check respond with an HTTP status 410 (with validation_purged in the body), and webhooks, retries, and sweeps ignore it. An open retry cycle is cancelled.
The token is verified before deleting:
- It is missing, malformed, its signature is not valid, or it expired: it responds with an HTTP status
422with its code (confirmation_token_missing,confirmation_token_malformed,confirmation_token_signature_invalid, orconfirmation_token_expired). - It belongs to another validation, another account, or another operation: it responds with an HTTP status
422(withpurge_token_mismatchorconfirmation_token_operation_mismatchin the body). - It was already used: it responds with an HTTP status
409(withconfirmation_token_already_usedin the body).
If the response does not arrive, GET /v1/validations/{id} says whether the deletion completed: a purged validation carries purged_at. Repeating this step on a purged validation responds with an HTTP status 410.
What is deleted, the tombstone, and the limitations are in the retention of receipts and data.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id* | path | string (uuid) | required | Validation UUID. |
| Parameter | Type | Required | Description |
|---|---|---|---|
confirmation_token | string | required | Token returned by eyJhZG1pbl9pZCI6Ii4uLiJ9.q1w2e3r4t5y6u7i8o9p0 |
curl -X POST 'https://api.veriko.mx/v1/validations/{id}/purge/execute' \
-H 'Authorization: Bearer veriko_••••' \
-H 'Content-Type: application/json' \
-d '{
"confirmation_token": "eyJhZG1pbl9pZCI6Ii4uLiJ9.q1w2e3r4t5y6u7i8o9p0"
}'Python example — coming soon.
JavaScript example — coming soon.
PHP example — coming soon.
| Field | Type | Description |
|---|---|---|
data* | object | JSON:API resource of the deletion. Its |
type* | string | Resource type, fixed for this operation. Part of its identity in the JSON:API envelope. Always validation_purge |
id* | string (uuid) | Identifier of the purged validation. e.g.3fa85f64-5717-4562-b3fc-2c963f66afa6 |
attributes* | object | Result of the deletion. |
purged_at* | string (date-time) | Date and time, in ISO 8601 UTC, when the validation was purged. e.g.2026-10-02T09:30:00Z |
file_removal* | string | State of the file deletion — complete |
deleted* | object | What was deleted. The counters count rows touched; the booleans say whether there was something to delete. |
image | boolean |
|
cep_pdf | boolean |
|
retry_cycle_cancelled | boolean |
|
retry_attempts | integer | Retry attempts deleted. |
probe_attempts | integer | Candidate-account probes deleted. |
webhook_deliveries | integer | Webhook deliveries whose sent body and receiver response were removed. |
notification_deliveries | integer | Notification deliveries whose content was emptied. |
notifications | integer | Inbox notifications that were deleted. |
idempotency_responses | integer | Stored |
import_rows | integer | Bulk-import rows whose content was emptied. |
audit_log_rows | integer | Audit rows whose bodies were removed. Missing when that sweep could not complete. |
security_events_rows | integer | Security events whose context was redacted. Missing when that sweep could not complete. |
| Status | Class | Description | Body |
|---|---|---|---|
| 200 | 2xx | Validation purged. Returns when it was purged, the state of the file deletion, and what was deleted. | ValidationPurgeExecuteResponse |
| 400 | 4xx | The request body arrived empty when the operation requires data (body_empty). | ErrorResponse |
| 401 | 4xx | Authentication is required or the provided credentials are invalid. | ErrorResponse |
| 403 | 4xx | Insufficient permissions. | ErrorResponse |
| 404 | 4xx | Validation not found, or not owned by the account (not_found). | ErrorResponse |
| 409 | 4xx | The token was already used (confirmation_token_already_used), or the validation is still in progress and cannot be purged yet (purge_validation_in_progress, with the status in meta.status). | ErrorResponse |
| 410 | 4xx | The validation was purged and this resource no longer exists (validation_purged). | ErrorResponse |
| 413 | 4xx | The request body exceeds the maximum accepted size (body_too_large). | ErrorResponse |
| 422 | 4xx | The token is not valid. Possible codes: confirmation_token_missing, confirmation_token_malformed, confirmation_token_signature_invalid, confirmation_token_expired, confirmation_token_operation_mismatch, and purge_token_mismatch (the token belongs to another validation or another account). Invalid UUID in path (invalid_uuid). | ErrorResponse |
| 429 | 4xx | Rate limit exceeded | ErrorResponse |
| Status | Code | Example |
|---|---|---|
| 400 | body_empty | The request body is empty. Envelope
|
| 401 | unauthorized | Invalid or missing authentication credentials. Envelope
|
| 403 | permission_denied | You do not have permission to access this resource. Envelope
|
| 410 | validation_purged | The validation was purged and this resource no longer exists. Envelope
|
| 413 | body_too_large | The request body is too large. Envelope
|
| 429 | rate_limit_exceeded | Rate limit exceeded. Try again in 45 seconds. Envelope
Response headers
|