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

Cancel pending retries

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

Stops a validation's automatic retry cycle. The first call responds 200 with terminal_state: 'cancelled'; a second one, with no active cycle left, responds 422 retry_not_active. That difference is deliberate: cancelling something that is not running is not a no-op, it is a sign that the state was not what the caller believed. The Idempotency-Key header is optional and keeps a network failure from turning one cancellation into two.

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, included in the individual validation response (GET /v1/validations/{id}). Exposes both state fields and the configured policy details.

enabledboolean

Whether the retry cycle is active for this validation.

e.g. true
max_retriesinteger | nullnullable

Configured maximum number of retries. The upper bound depends on the plan (retry_max_retries) or the global default max_retries_cap (typically 5–10). null if enabled=false.

e.g. 3
interval_secondsinteger | nullnullable

Interval between retries in seconds (300–86400). null if enabled=false.

e.g. 600
outcomesarray | nullnullable

Validation outcomes that trigger a retry (not_found, cep_unavailable, error). null if enabled=false.

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

Number of retries completed so far.

e.g. 1
next_attempt_atTimestampUTC | null

Timestamp of the next scheduled retry. null if the cycle is in a terminal state or if no retries are active.

resolved_atTimestampUTC | null

Timestamp when a retry resolved the validation to valid. null if the cycle has not ended by resolution.

exhausted_atTimestampUTC | null

Timestamp when retries were exhausted without resolution. null if the cycle has not ended by exhaustion.

cancelled_atTimestampUTC | null

Timestamp when the cycle was explicitly cancelled. null if not cancelled.

terminal_statestring | nullnullable

Terminal state of the cycle: pending — active, no final result yet; resolved — a retry obtained valid; exhausted — all attempts used; cancelled — cancelled by the user. null if 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.No body
4014xxAuthentication is required or the provided credentials are invalid.ErrorResponse
4034xxInsufficient permissions.ErrorResponse
4044xxValidation not found or not owned by the user (not_found).ErrorResponse
4224xxNo active retry cycle to cancel (code retry_not_active). Invalid UUID (invalid_uuid).ErrorResponse
Response headers200
HeaderTypeDescription
Idempotent-ReplayedstringOnly present when the client sent Idempotency-Key. true when the response is a replay from the idempotency cache (24h TTL per user+endpoint+key).
Errors from POST /v1/validations/{id}/cancel-retries
StatusCodeExample
401unauthorized

Invalid or missing authentication credentials.

Envelope
meta.request_id
c4d5e6f7a8b9
403forbidden

You do not have permission to access this resource.

Envelope
meta.request_id
d5e6f7a8b9c0