Update the current user

Change the signed-in user's first or last name.

PATCH /users/me

Changes the signed-in user’s own profile. The fields use the same names as GET /users/me, so a client can read a field, change it, and send it back.

Authorization

Authorization: Bearer <access token>: a user token minted by the org whose host you call. A client_credentials token is refused with 401. The subject is the token’s: there is no way to aim at anyone else’s profile.

Body

JSON. The body is the mask: the keys you send are the fields that change.

FieldTypeRequiredDescription
given_namestringNoFirst name.
family_namestringNoLast name.

name is recomputed from the two. email cannot be changed here, and any other key is a 400. For a user who signs in with an identity provider, these fields may be re-synced from the provider on their next sign-in.

Response

200 with the profile, without labels.

{
  "sub": "usr_…",
  "email": "ada@acme.com",
  "given_name": "Ada",
  "family_name": "King",
  "name": "Ada King",
  "picture": "https://…",
  "provider": "google"
}

Errors

StatuserrorWhen
400invalid_requestA key other than given_name or family_name, or a value that is not a string. error_detail names it.
401unauthorizedNo token, or an invalid, expired or ended one. See Authentication.
404user_not_foundThe account was deleted after the token was minted.

Example

curl -X PATCH https://acme.loginwith.dev/users/me \
  -H "Authorization: Bearer eyJ…" \
  -H "Content-Type: application/json" \
  -d '{"family_name": "King"}'