Skip to content
NMC Docs

Retrying requests

Safely retry write requests after a timeout or network failure without creating duplicates.

If a write request times out or drops the connection, NMC may have already applied the change. Each write operation in the customer API is safe to retry without creating duplicate records:

Operation How to retry safely
Update a lead or contact Resend the same PATCH request. Updates assign exact field values, so applying the same values twice leaves the record in the same state.
Submit a form Resend the same POST request with the original submission UUID (id) and input. The UUID cannot be all zeros, and NMC remembers each ID permanently for that business.
Create a webhook endpoint Resend the same POST request. Each business has at most one webhook endpoint per URL, so posting an existing URL returns that webhook endpoint (200 instead of 201) with its current signing_secret, updates its subscribed events, and turns it back on if it was stopped.

Keep these details in mind when retrying:

  • Every retry still requires a valid business API key and active access to the business.
  • A retry response may include newer data than the first attempt would have returned.
  • If someone else updated the same lead or contact between your first attempt and your retry, your retry overwrites those fields with your values again.

Check the business’s currency_code before sending a lead value, then send a PATCH request with LEAD_ID set to the lead’s ID:

Terminal window
curl --fail-with-body --request PATCH \
--header "Authorization: Bearer $NMC_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"stage":"converted","value_cents":125000,"currency_code":"CAD"}' \
"https://api.nomissedconversions.com/v1/leads/$LEAD_ID"

This example sets a value of CAD 1,250 (125000 cents) on a business whose business currency is CAD. Any fields you omit stay unchanged.

Lead status changes follow two rules:

  • A closed lead must be explicitly reopened before you change its stage.
  • A Converted lead must be moved back to an earlier stage before you close it.

See the API reference for which field changes you can combine in one request.

Don’t automatically retry a 409 response. Inspect the error code first, since resending the exact same request won’t resolve a conflict. Common causes include a retried submission whose body changed, a lead status change that isn’t allowed from the lead’s current state, or a Google Ads conversion check.

If you receive google_ads_conversions_confirmation_required, display the conversions returned in the error to the person making the edit. They need to confirm that those conversions cannot be removed before the request can go through.