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

Cancel pending retries

Visibility
public
Auth
API key
Permission
validations.retries.manage
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, 429, 408, 401 and 403 responses are not cached (retries with the same key are processed for real); the other 4xx responses (400, 404, 409, 422) are cached and replayed. 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
2002xx
Retry cycle cancelled. retry_state.terminal_state is now cancelled.
CancelValidationRetriesAttributes
4014xx
Authentication is required or the provided credentials are invalid.
ErrorResponse
4034xx
The validations.retries.manage permission is missing (permission_denied). The "Validate" and "Full access" API key presets include it. With "Read only", or with an explicit permission list that leaves it out, this operation responds 403.
ErrorResponse
4044xx
Validation not found or not owned by the account (not_found).
ErrorResponse
4104xx
The validation was purged and this resource no longer exists (validation_purged).
ErrorResponse
4224xx
No active retry cycle to cancel (code retry_not_active). Invalid UUID (invalid_uuid).
ErrorResponse
4294xx
Rate limit exceeded (rate_limit_exceeded: wait a few seconds).
RetryAfterError
Response headers200
HeaderTypeDescription
Idempotent-Replayedstring
Only 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

This request requires authentication.

Envelope
meta.request_id
c4d5e6f7a8b99b8a7f6e5d4c
403permission_denied

You do not have permission to access this resource.

Envelope
meta.request_id
d5e6f7a8b9c00c9b8a7f6e5d
404not_found

We could not find what you requested.

Envelope
meta.request_id
dd4a620065bc
410validation_purged

This validation was permanently deleted.

Envelope
meta.request_id
1a2b3c4d5e6ff6e5d4c3b2a1
422validation_error

Some data needs fixing.

Envelope
meta.request_id
c8a977ba1f14
429rate_limit_exceeded

You exceeded the request limit.

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.