POSThttps://api.veriko.mx/v1/validations/{id}/purge/execute

Execute the permanent deletion of a validation

Audience
public
Auth
API key
Permission
validations:delete
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. Of normalized_data, only the amount is kept.
  • The derived records with personal data: retry attempts, account probes, stored Idempotency-Key responses, 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 422 with its code (confirmation_token_missing, confirmation_token_malformed, confirmation_token_signature_invalid, or confirmation_token_expired).
  • It belongs to another validation, another account, or another operation: it responds with an HTTP status 422 (with purge_token_mismatch or confirmation_token_operation_mismatch in the body).
  • It was already used: it responds with an HTTP status 409 (with confirmation_token_already_used in 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.

Parameters
ParameterInTypeRequiredDescription
id*pathstring (uuid)required

Validation UUID.

Parameters
ParameterTypeRequiredDescription
confirmation_tokenstringrequired

Token returned by POST /v1/validations/{id}/purge/prepare for this same validation and this same account. It is single-use and expires within the period expires_in indicated.

e.g. eyJhZG1pbl9pZCI6Ii4uLiJ9.q1w2e3r4t5y6u7i8o9p0
Request
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.

Response 200ValidationPurgeExecuteResponse — Validation purged. Returns when it was purged, the state of the file deletion, and what was deleted.
FieldTypeDescription
data*object

JSON:API resource of the deletion. Its id is the validation's.

type*string

Resource type, fixed for this operation. Part of its identity in the JSON:API envelope. Always validation_purge.

e.g. 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: The files no longer exist; pending: A file could not be deleted at this moment and the daily sweep finishes it. The database content is already deleted in both cases and the file is not served.

e.g. complete
deleted*object

What was deleted. The counters count rows touched; the booleans say whether there was something to delete.

imageboolean

true when there was a receipt file.

cep_pdfboolean

true when there was a CEP PDF.

retry_cycle_cancelledboolean

true when the deletion closed a retry cycle that was still open.

retry_attemptsinteger

Retry attempts deleted.

probe_attemptsinteger

Candidate-account probes deleted.

webhook_deliveriesinteger

Webhook deliveries whose sent body and receiver response were removed.

notification_deliveriesinteger

Notification deliveries whose content was emptied.

notificationsinteger

Inbox notifications that were deleted.

idempotency_responsesinteger

Stored Idempotency-Key responses that were deleted.

import_rowsinteger

Bulk-import rows whose content was emptied.

audit_log_rowsinteger

Audit rows whose bodies were removed. Missing when that sweep could not complete.

security_events_rowsinteger

Security events whose context was redacted. Missing when that sweep could not complete.

Response status codesPOST /v1/validations/{id}/purge/execute
StatusClassDescriptionBody
2002xxValidation purged. Returns when it was purged, the state of the file deletion, and what was deleted.ValidationPurgeExecuteResponse
4004xxThe request body arrived empty when the operation requires data (body_empty).ErrorResponse
4014xxAuthentication is required or the provided credentials are invalid.ErrorResponse
4034xxInsufficient permissions.ErrorResponse
4044xxValidation not found, or not owned by the account (not_found).ErrorResponse
4094xxThe 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
4104xxThe validation was purged and this resource no longer exists (validation_purged).ErrorResponse
4134xxThe request body exceeds the maximum accepted size (body_too_large).ErrorResponse
4224xxThe 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
4294xxRate limit exceededErrorResponse
Errors from POST /v1/validations/{id}/purge/execute
StatusCodeExample
400body_empty

The request body is empty.

Envelope
meta.request_id
2b3c4d5e6f7aa7f6e5d4c3b2
401unauthorized

Invalid or missing authentication credentials.

Envelope
meta.request_id
c4d5e6f7a8b99b8a7f6e5d4c
403permission_denied

You do not have permission to access this resource.

Envelope
meta.request_id
d5e6f7a8b9c00c9b8a7f6e5d
410validation_purged

The validation was purged and this resource no longer exists.

Envelope
meta.request_id
1a2b3c4d5e6ff6e5d4c3b2a1
413body_too_large

The request body is too large.

Envelope
meta.request_id
1a2b3c4d5e6ff6e5d4c3b2a1
429rate_limit_exceeded

Rate limit exceeded. Try again in 45 seconds.

Envelope
meta.request_id
f7a8b9c0d1e22e1d0c9b8a7f
Response headers
  • Retry-After: integer — Seconds to wait before retrying. Matches the endpoint's rate-limit window (typically 60s for list endpoints, 1-5s for in-flight idempotent operations).
  • X-RateLimit-Limit: integer — Configured request cap for this bucket. It is emitted on every 429 and, on the authenticated API, also on successful responses, where it is the per-key cap of the account plan.
  • X-RateLimit-Remaining: integer — Requests remaining in the current window. Always 0 at the moment of the 429; on a successful response of the authenticated API it is what is left of the per-key cap.
  • X-RateLimit-Reset: integer — Absolute Unix epoch (seconds) when the window resets. Emitted on every 429, alongside Retry-After, and on successful responses of the authenticated API. Per-endpoint overrides exist (e.g. `rate_limited_login`).