music nerd

Users and profileUpload your profile photo

Users and profile

Upload your profile photo

Replaces the caller's profile photo with a JPG, PNG or WebP up to 2 MB, saved as a 512×512 WebP with metadata stripped.

POST/api/user/profile-image
POST/api/user/profile-image

Replaces the caller's profile photo with a JPG, PNG or WebP up to 2 MB, saved as a 512×512 WebP with metadata stripped.

This one can’t run in the browser. Copy the curl and run it from a terminal.

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.

Headers

X-Profile-Accountstring

The user id the page believes is signed in. When sent, it must equal the token's user, or the response is 409.

Body
cURL
curl --request POST \
  --url 'https://musicnerd-api.vercel.app/api/user/profile-image' \
  --header 'X-Profile-Account: 6f1d2e3a-4b5c-4d6e-8f90-a1b2c3d4e5f6' \
  --header 'Content-Type: multipart/form-data' \
  --data '{
  "file": "string"
}'

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.

Header Parameters

X-Profile-Accountstring

The user id the page believes is signed in. When sent, it must equal the token's user, or the response is 409.

Body

multipart/form-datarequired
filestringrequired

A JPG, PNG or WebP image, at most 2 MB.

format: binary

Response

application/json

Stored. Cache-Control: private, no-store.

statusstring · enumrequired

Values: "ok"

successboolean · enumrequired

Values: true