music nerd

Users and profileSet your user name

Users and profile

Set your user name

Saves a chosen user name for the caller's own account and clears the confirmation flag. Names are unique case-insensitively, so a taken name is 409, and an email or wallet address is refused.

PATCH/api/user/{id}
PATCH/api/user/6f1d2e3a-4b5c-4d6e-8f90-a1b2c3d4e5f6

Saves a chosen user name for the caller's own account and clears the confirmation flag. Names are unique case-insensitively, so a taken name is 409, and an email or wallet address is refused.

Authorization

Authorizationstringrequired

The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. Every route here answers about that user only. Kept in this tab only.

Path

idstringrequired

The caller's user id (a UUID).

Body
cURL
curl --request PATCH \
  --url 'https://musicnerd-api.vercel.app/api/user/6f1d2e3a-4b5c-4d6e-8f90-a1b2c3d4e5f6' \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "Vinyl Otter"
}'

Send the request to see the live response here.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>. The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. Every route here answers about that user only.

Path Parameters

idstringrequired

The caller's user id (a UUID).

Body

application/jsonrequired
usernamestringrequired

The new user name. Trimmed; 1 to 50 characters; no control characters, @, or a 0x wallet address.

maxLength: 50

Response

application/json

Saved.

statusstring · enumrequired

Values: "ok"

messagestringrequired