https://api.veriko.mx/v1/users/me/retry-policySet default retry policy
How-to guide →Sets the authenticated user's default retry policy. From the moment it is saved, it applies to every future validation that does not carry its own in the body.
The check is strict: a value beyond a cap is rejected, not silently trimmed. Any deviation responds with an HTTP 422 status (carrying retry_policy_invalid in the body).
With enabled=false the other fields are ignored and the policy is stored as disabled.
It accepts an optional Idempotency-Key, which prevents storing the same thing twice when the network forces a retry.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | optional | Optional client-generated key (Stripe-style) that guarantees the request is processed exactly once within a 24-hour TTL. The scope is 11111111-2222-3333-4444-555555555555 |
| Parameter | Type | Required | Description |
|---|---|---|---|
retry_policy | object | required | Validation retry policy: activation, limit, interval, and eligible outcomes. |
enabled | boolean | optional |
true |
max_retries | integer (≥ 1) | optional | Maximum number of automatic retries. Once reached, the cycle enters the 3 |
interval_seconds | integer (≥ 300, ≤ 86400) | optional | Seconds to wait between each retry (300–86400, i.e., 5 minutes to 24 hours). e.g.600 |
outcomes | array<string> (items: 1–?, unique items) | optional | Outcomes that trigger a retry. By default, they are ["not_found","cep_unavailable","error"] |
curl -X PUT 'https://api.veriko.mx/v1/users/me/retry-policy' \
-H 'Authorization: Bearer veriko_••••' \
-H 'Content-Type: application/json' \
-d '{
"retry_policy": {
"enabled": false
}
}'Python example — coming soon.
JavaScript example — coming soon.
PHP example — coming soon.
| Field | Type | Description |
|---|---|---|
enabled | boolean |
true |
max_retries | integer | Maximum number of automatic retries. Once reached, the cycle enters the 3 |
interval_seconds | integer | Seconds to wait between each retry (300–86400, i.e., 5 minutes to 24 hours). e.g.600 |
outcomes | array (items: 1–?, unique items) | Outcomes that trigger a retry. By default, they are ["not_found","cep_unavailable","error"] |
| Status | Class | Description | Body |
|---|---|---|---|
| 200 | 2xx | Retry policy updated (echo of the normalized body). | RetryPolicy |
| 400 | 4xx | The request body is empty or is not valid JSON. | ErrorResponse |
| 401 | 4xx | Authentication is required or the provided credentials are invalid. | ErrorResponse |
| 413 | 4xx | The request body exceeds the maximum accepted size (body_too_large). | ErrorResponse |
| 422 | 4xx | Retry policy is invalid (retry_policy_invalid). Causes: enabled missing or not boolean; max_retries outside [1, max_retries_cap]; interval_seconds outside [min_interval_seconds, max_interval_seconds]; outcomes empty when enabled=true; outcome outside the allowlist (eligible_outcomes from the global retry configuration). | ErrorResponse |
| Header | Type | Description |
|---|---|---|
Idempotent-Replayed | string | Only present when the client sent Idempotency-Key. true when the response is a replay from the idempotency cache (24h TTL per user+endpoint+key). |
| Status | Code | Example |
|---|---|---|
| 400 | body_empty | The request body is empty. Envelope
|
| 400 | invalid_json | The body is not valid JSON. Envelope
|
| 401 | unauthorized | Invalid or missing authentication credentials. Envelope
|
| 413 | body_too_large | The request body is too large. Envelope
|
Retry policy
PUT /v1/users/me/retry-policy
Validation retry policy: activation, limit, interval, and eligible outcomes.
- Attempts
- —
- Interval
- 5 min – 1 h × 24
- Eligible outcomes
not_found,cep_unavailable,error
This operation accepts an optional retry policy.