Update the authenticated user
PATCH
/userUpdates the authenticated caller's username and/or email. Both fields are optional but at least one must be supplied; only fields present in the body are changed.
The username goes through the same rules as the web settings page (max 24 characters, alphanumeric and dashes, not a reserved word). The email is lowercased server-side and the gravatar hash recomputed.
Request
Headers
| Name | Type | Scopes |
|---|---|---|
Authorizationrequired | string | user:write |
Body parameters
UpdateUserRequestrequiredapplication/json
| Field | Type | Description |
|---|---|---|
usernameoptional | string | New username (max 24 chars, alphanumeric and dashes, not reserved). |
emailoptional | string | New email; lowercased server-side. |
Responses
| Status | Body | Description |
|---|---|---|
200 | PrivateUser | The updated user. |
401 | Error | Missing or invalid credentials. |
403 | Error | The token lacks the required scope or permission. |
409 | Error | The request conflicts with the current state (e.g. username already taken). |
422 | Error | The request body failed validation. |