music nerd

Artist imagesChoose a provider photo

Artist images

Choose a provider photo

Sets the artist's profile photo to one of the provider photos from Photo choices. The write is refused when the artist's current photo, the linked provider ID or the provider's photo changed since the choices were loaded. A changed photo clears the saved header position unless it was set for this same image.

PATCH/api/artist/photo-choice
PATCH/api/artist/photo-choice

Sets the artist's profile photo to one of the provider photos from Photo choices. The write is refused when the artist's current photo, the linked provider ID or the provider's photo changed since the choices were loaded. A changed photo clears the saved header position unless it was set for this same image.

Authorization

Authorizationstringrequired

The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. The user must be the artist's approved claimant or a Music Nerd admin. Kept in this tab only.

Body
cURL
curl --request PATCH \
  --url 'https://musicnerd-api.vercel.app/api/artist/photo-choice' \
  --header 'Content-Type: application/json' \
  --data '{
  "artistId": "aab92f80-f9e1-4299-aa33-7dd85c8de5d3",
  "source": "deezer",
  "imageUrl": "https://e-cdns-images.dzcdn.net/images/artist/0a1b2c3d4e5f/1000x1000-000000-80-0-0.jpg",
  "expectedCustomImage": null,
  "providerId": "5590"
}'

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. The user must be the artist's approved claimant or a Music Nerd admin.

Body

application/jsonrequired
artistIdstringrequired

The artist's ID.

format: uuid

sourcestring · enumrequired

Which provider the photo comes from.

Values: "deezer", "spotify"

imageUrlstringrequired

The option's imageUrl as the choices returned it. The server re-resolves the photo and refuses the write if it differs.

format: uri · maxLength: 4096

expectedCustomImagestring | nullrequired

The expectedCustomImage the choices returned.

maxLength: 4096

providerIdstringrequired

The option's providerId.

minLength: 1 · maxLength: 255

Response

application/json

The photo was saved. Cache-Control: no-store.

statusstring · enumrequired

Values: "ok"

successboolean · enumrequired

Values: true

imagePathstringrequired

The artist's new customImage: the provider photo URL as the server resolved it.

positionintegerrequired

The header position's y after the change: kept when it was set for this same image, otherwise 0.

minimum: 0 · maximum: 100