> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retry failed API requests

> Choose safe retry behavior for Nixflex API reads and writes. Honor Retry-After, reconcile unknown outcomes and avoid duplicate calls, messages or purchases.

**FIXED · account** Inbound and outbound share the account/API-key concurrency budget. Read max\_concurrent for the effective limit.

**NOT OFFERED → do this instead · number** No per-number concurrency reservation exists. Queue or pace each business within the shared account call budget.

**YOU CAN CHANGE · account** Pace submissions. Accepted work may wait for capacity.

**SCOPE · operation** Check the code and details to distinguish refusal, acceptance and unknown outcome before retrying.

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#limits-errors)

Retry eligible reads with a limit, and reconcile uncertain writes before any deliberate new action.

Guide: **API reference** · Topic: **Retry rules**

**The important part**

* Use bounded retries for eligible reads.
* Never automatically create a new call intent to recover an unknown launch result.

[Business guide](https://docs.nixflex.com/reference/faq.md) · [Developer guide](https://docs.nixflex.com/guides/developer/errors.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

**Never automatically retry a write.** A timeout, broken connection, or server error can arrive after the operation took effect. Repeating it can create another agent, call, message, campaign, invitation, or job.

## Choose the next action

| Result | Read-only GET | Write or action request |
| - | - | - |
| 400 or 422 | Correct the request first | Understand the refusal before a deliberate corrected attempt. |
| 401 or 403 | Fix authentication or permission | Fix access; do not loop. |
| 409 conflict | Refresh relevant state | Read state and resolve the named conflict. |
| 429 throttle | Wait at least `Retry-After`; use a bounded retry | Stop automatic retries. Review the refusal and state before a deliberate later attempt. |
| Timeout, 5xx, disconnected response | Bounded backoff with jitter is reasonable | Treat the outcome as unknown and reconcile it. |
| 202 accepted | Read the documented job or resource | Save its identity and poll; do not submit another job to check progress. |

Only read-only GET requests belong in an automatic read retry loop. The Knowledge draft GET projects legacy repairs without saving; explicit save or accept persists them. GET retries need a limit, overall deadline, and cancellation. Honour `RateLimit-Limit`, `RateLimit-Remaining`, and `Retry-After` when returned. Do not assume a POST is harmless because its name contains “test” or “preview”.

## Check an uncertain result

1. Save the operation, resource ID, request time, safe correlation IDs, and receipt. Keep secrets and customer content out of logs.
2. Read the affected resource or job. Compare the intended change with stored state.
3. If completion is confirmed, continue from that resource. If a refusal is confirmed and no work occurred, decide whether a corrected attempt is appropriate.
4. If still unknown, stop and seek support with safe identifiers. An empty or delayed list does not confirm that a call or message was never sent.

| Operation | Reconciliation |
| - | - |
| Agent create | Use the returned ID; otherwise inspect recent agents. Names are not unique, so a name match alone is insufficient. |
| Agent or number update | Read the same resource and compare the changed fields. |
| Call or SMS | Read the receipt/resource and relevant history. Never redial or resend because a response was lost. |
| Campaign action | Read campaign state and results before another action. |
| Knowledge write | Read its job, revision, source, draft, or session. |
| Key rotation | Test a saved credential with a read. A lost new secret requires recovery. |
| Delete | Read the resource and asynchronous deletion state; absence alone does not confirm background cleanup finished. |

## Idempotency is operation-specific

There is no universal `Idempotency-Key` promise. Sending that header does not make agent creation, call creation, SMS, or other writes safe to replay.

Knowledge mutations and test messages use their documented idempotency identity. Preserve the same key and payload for the same logical operation; a changed payload under a used key can return `409 idempotency_conflict`. Check each operation's required key and revision fields. A replay can return saved work; it still does not authorise an automatic write retry policy.

## Client settings

Disable write retries in the HTTP client, SDK, proxy, job runner, and application. If a client only offers a global retry setting, use zero for the client that performs writes. Confirm CLI and MCP behaviour for the installed version before production use.

Use the [error catalog](https://docs.nixflex.com/api-reference/errors.md). In particular, `outcome_unknown`, `campaign_outcome_unknown`, and `carrier_outcome_unknown` require reconciliation, not repetition.

## Reconcile an outbound request UUID

Save one UUID before the first request for an intended call. Persist it with the request payload so a process restart cannot accidentally create a new intent. Supply it as the JSON field `request_id`, not an Idempotency-Key header.

| Result | What it proves | Next action |
| - | - | - |
| 201 initiated | A call was accepted; completion is still unknown. | Save call\_id and request\_id; read the call. |
| 200 replayed:true | This UUID already has an accepted call. | Use the same call\_id; no second dispatch occurred. |
| 409 outbound\_request\_pending / outbound\_request\_unknown | The existing intent cannot be launched again. | Keep the UUID and read request status. |
| 409 request\_id\_conflict | The same UUID was used with changed input. | Reconcile the original payload; do not automatically replace the UUID. |
| 503 with details.safe\_to\_retry:false | The journal or launch outcome is uncertain. | Keep the UUID and use bounded status reads. |

A 201 can also include `request_status:"unconfirmed"` and `safe_to_retry:false`: the call ID is known even though the final journal acknowledgement was lost. Never redial it. A new UUID is a new explicit call intent. Requests without request\_id retain their existing behaviour and have no launch replay protection.

Read [outbound request status](https://docs.nixflex.com/api-reference/calls/get-outbound-request.md). A 404 or an empty history page does not confirm that an uncertain call was never placed.

## Next steps

* [API overview](https://docs.nixflex.com/api-reference/introduction.md)
* [Errors and recovery](https://docs.nixflex.com/api-reference/errors.md)
* [Authentication](https://docs.nixflex.com/api-reference/authentication.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.