# Provide support conditional writes in Auth0 APIs

**URL:** <https://community.auth0.com/t/provide-support-conditional-writes-in-auth0-apis/204642>\
**Category:** Get Help\
**Tags:** feature-request, management-api\
**Created:** [October 24, 2026, 9:05am UTC](https://community.auth0.com/t/provide-support-conditional-writes-in-auth0-apis/204642 "2026-10-24T09:05:42Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [October 26, 2026, 5:33pm UTC](https://community.auth0.com/t/provide-support-conditional-writes-in-auth0-apis/204642/3 "2026-10-26T17:33:58Z")

</div>

Hi @bill.poole

Welcome to the Auth0 Community!

You are asking whether the Auth0 Management API supports conditional writes, such as `ETag`/`If-Match` headers or version-based updates, so that concurrent updates to a user’s email cannot overwrite a newer change.

**Summary:** The Management API does not expose a documented conditional-write mechanism in the materials reviewed, so the practical protection is to use the API’s built-in uniqueness check and to avoid triggering a second write that resets verification state.

**Root Cause:** A write to `PATCH /api/v2/users/{id}` applies the last request it receives, and the API does not compare a version or timestamp before applying it. A delayed request from an earlier change can therefore arrive after a newer one, which matches the sequence you described.

**Solution:** Use the following controls to reduce the race window, then submit the conditional-write request through official channels.

1. **Rely** on the duplicate-email check built into the API. If the new email already belongs to another user, `PATCH /api/v2/users/{id}` returns `400 Bad Request` with `errorCode: auth0_idp_error` and leaves the original profile unchanged. You do not need a separate read-then-write lookup for that case.
2. **Expect** the same-email case to return `200 OK` without changing `email_verified`, so a retried request with an unchanged value is safe.
3. **Avoid** a second write that flips verification state. The Auth0 Community reported a case where another function updated the same user after the Management API call and reset `email_verified` to `true`. Route all email writes for a user through one service so no other process updates the profile in between.
4. **Serialize** writes per user at the application layer, for example with a per-user lock or a single queue consumer, so only one outbox message for a given user is in flight at a time. This narrows the window but, as you noted, does not remove it without server-side support.
5. **Submit** the conditional-write request to Auth0 through the Auth0 Community feature requests area or your account team, and include your transactional outbox scenario as the use case.

Kind Regards,  
Nik

---

_[View the full topic](https://community.auth0.com/t/provide-support-conditional-writes-in-auth0-apis/204642)._
