Auth0 Home Blog Docs

Creating an existing user returns status 201

When I send the following body to the https://###.auth0.com/api/v2/users endpoint I receive a 201 created code even when the user already exists. Using the connection: “Username-Password-Authentication” I will receive a 409 if the user exists. Is this expected behavior? It doesn’t make sense to me.

{ "email": "###@gmail.com", "user_metadata": {}, "blocked": false, "email_verified": false, "app_metadata": {}, "given_name": "John", "family_name": "Doe", "name": "John Doe", "nickname": "Johnny", "picture": "https://secure.gravatar.com/avatar/15626c5e0c749cb912f9d1ad48dba440?s=480&r=pg&d=https%3A%2F%2Fssl.gstatic.com%2Fs2%2Fprofiles%2Fimages%2Fsilhouette80.png", "connection": "email", "verify_email": true }