# Behaviour of PATCH /api/v2/users/:id - updating with exactly the same email

**URL:** <https://community.auth0.com/t/behaviour-of-patch-api-v2-users-id-updating-with-exactly-the-same-email/191330>\
**Category:** Get Help\
**Tags:** emails, management-api\
**Created:** [August 31, 2025, 10:40pm UTC](https://community.auth0.com/t/behaviour-of-patch-api-v2-users-id-updating-with-exactly-the-same-email/191330 "2025-08-31T22:40:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rashnie1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rashnie1/32/72471_2.png) [@rashnie1](https://community.auth0.com/u/rashnie1)\
**Post date:** [August 31, 2025, 10:40pm UTC](https://community.auth0.com/t/behaviour-of-patch-api-v2-users-id-updating-with-exactly-the-same-email/191330/1 "2025-08-31T22:40:16Z")

</div>

Hi,

What is the behaviour of PATCH /api/v2/users/:id

Scenario1: when I try to update with exactly the same email. i.e userA has email as [test@gmail.com](mailto:test@gmail.com) and I send a patch request with [test@gmail.com](mailto:test@gmail.com) (no changes at all, exact same email as earlier). Will the Auth0 update the email and email\_verified flag? or no changes are done in this case? What is the response code received?

Scenario2: what happens when try to update the email with an email in use for another user , what is the error code returned in this case? also impact on email\_verified if any due to this?

---

<div class="post-metadata">

**Author:** ![teodor.andrei](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/teodor.andrei/32/75320_2.png) [@teodor.andrei](https://community.auth0.com/u/teodor.andrei)\
**Post date:** [September 1, 2025, 2:02pm UTC](https://community.auth0.com/t/behaviour-of-patch-api-v2-users-id-updating-with-exactly-the-same-email/191330/3 "2025-09-01T14:02:07Z")

</div>

Hi @rashnie1, and welcome to the Auth0 Community!

For your first question:

The Auth0 Management API is idempotent for the PATCH operation. It recognizes that the value you’re providing for the `email` attribute is identical to the existing value. Because there is no actual change to the data, it does not trigger the process that would normally flip the `email_verified` flag to `false`. The response code will be a 200 OK with the user object in the body.

For your second question:

The update operation will **fail**. Auth0 will return a `400 Bad Request` error, and the original user’s profile, including their `email` and `email_verified` status will remain unchanged.

```auto
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "The specified new email already exists",
  "errorCode": "auth0_idp_error"
}

```

I hope this answers your question!  
Teodor.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [September 15, 2025, 2:02pm UTC](https://community.auth0.com/t/behaviour-of-patch-api-v2-users-id-updating-with-exactly-the-same-email/191330/4 "2025-09-15T14:02:27Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
