POSThttps://api.veriko.mx/v1/validations/{id}/cancel-retries

Cancel pending retries

Audience
public
Auth
API key
Permission
validations:read
How-to guide →

Cancels the active automatic retry cycle of a validation and returns terminal_state="cancelled".

If the cycle is no longer active, it responds with an HTTP status 422 (with retry_not_active in the body).

The optional Idempotency-Key header allows repeating the same request without duplicating the cancellation.

Parameters
ParameterInTypeRequiredDescription
id*pathstring (uuid)required

Validation UUID.

Idempotency-Keyheaderstringoptional

Optional client-generated key (Stripe-style) that guarantees the request is processed exactly once within a 24-hour TTL. The scope is (user_id, endpoint, key). Retries with the same key and the same body return the byte-for-byte cached response with the Idempotent-Replayed: true header, without consuming rate-limit quota, without re-firing webhooks, and without creating a new validations row. Same key with a different body → 422 idempotency_key_reused. Same key with an in-flight request → 409 idempotency_key_in_progress. 5xx responses are not cached (retries with the same key are processed for real). Format: 1–255 characters, alphanumeric + _ + -.

e.g. 11111111-2222-3333-4444-555555555555
Request
curl -X POST 'https://api.veriko.mx/v1/validations/{id}/cancel-retries' \
  -H 'Authorization: Bearer veriko_••••' \
  -H 'Content-Type: application/json'

Python example — coming soon.

JavaScript example — coming soon.

PHP example — coming soon.

Response 200CancelValidationRetriesAttributes — Retry cycle cancelled. `retry_state.terminal_state` is now `cancelled`.
FieldTypeDescription
retry_stateobject

Full retry cycle state with configuration, progress, and current status.

enabledboolean

true when the validation has retries configured, even if its cycle has already ended (terminal_state).

e.g. true
max_retriesinteger | nullnullable

Configured maximum number of retries; null when enabled is false.

e.g. 3
interval_secondsinteger | nullnullable

Interval between retries in seconds, from 300 to 86400; null when enabled is false.

e.g. 600
outcomesarray | nullnullable

Outcomes that trigger a retry: not_found, cep_unavailable, and error; null when enabled is false.

e.g. ["not_found","cep_unavailable","error"]
attempts_completedinteger

Number of retries completed so far.

e.g. 1
next_attempt_atTimestampUTC | null

Date of the next retry; null when none is scheduled.

resolved_atTimestampUTC | null

Date when a retry produced valid; null until that occurs.

exhausted_atTimestampUTC | null

Date when attempts were exhausted; null until that occurs.

cancelled_atTimestampUTC | null

Cycle cancellation date; null until that occurs.

terminal_statestring | nullnullable

Cycle state: pending, resolved, exhausted, or cancelled. It is null when the validation has no retry cycle.

e.g. pending
Response status codesPOST /v1/validations/{id}/cancel-retries
StatusClassDescriptionBody
2002xxRetry cycle cancelled. retry_state.terminal_state is now cancelled.CancelValidationRetriesAttributes
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
4104xxThe validation was purged and this resource no longer exists (validation_purged).ErrorResponse
4224xxNo active retry cycle to cancel (code retry_not_active). Invalid UUID (invalid_uuid).ErrorResponse
Response headers200
HeaderTypeDescription
Idempotent-ReplayedstringOnly present when the request included Idempotency-Key. true marks a response reused from the idempotency cache, which remains valid for 24 hours per account, endpoint, and key.
Errors from POST /v1/validations/{id}/cancel-retries
StatusCodeExample
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