music nerd

ArtistsAdd an artist

Artists

Add an artist

Adds an artist to the directory from their Spotify or Deezer artist ID, for any signed-in user. result says what happened: the artist was created, already exists with that profile, may be a possible_duplicate of the candidates with the same name (send forceCreate: true to add a separate artist when canCreateSeparate is not false), or is a conflict because the profiles belong to different artists.

POST/api/artist
POST/api/artist

Adds an artist to the directory from their Spotify or Deezer artist ID, for any signed-in user. result says what happened: the artist was created, already exists with that profile, may be a possible_duplicate of the candidates with the same name (send forceCreate: true to add a separate artist when canCreateSeparate is not false), or is a conflict because the profiles belong to different artists.

Authorization

Authorizationstringrequired

The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. Any signed-in user may add an artist. Kept in this tab only.

Body
cURL
curl --request POST \
  --url 'https://musicnerd-api.vercel.app/api/artist' \
  --header 'Content-Type: application/json' \
  --data '{
  "platformId": "4Z8W4fKeB5YxbusRsdQVPb",
  "platform": "spotify"
}'

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. Any signed-in user may add an artist.

Body

application/jsonrequired
platformIdstringrequired

The artist's ID on the platform.

minLength: 1

platformstring · enum

Values: "spotify", "deezer"

Default: "spotify"

forceCreateboolean

Add a separate artist even when one with the same name exists.

Default: false

Response

application/json

What happened. artistId and artistName come back for created and exists; candidates, platform and platformId for possible_duplicate and conflict.

statusstring · enumrequired

Values: "ok"

resultstring · enumrequired

Values: "created", "exists", "possible_duplicate", "conflict"

messagestringrequired

A sentence to show the user.

artistIdstring

format: uuid

artistNamestring
candidatesarray<ArtistCandidate>
Item properties for candidates
idstringrequired

format: uuid

namestring | nullrequired
spotifystring | nullrequired

Their Spotify artist ID.

deezerstring | nullrequired

Their Deezer artist ID.

imageUrlstring

Their profile image, when one was uploaded.

platformstring · enum

Values: "spotify", "deezer"

platformIdstring

The platform's own ID for the submitted artist.

canCreateSeparateboolean

False when the other platform's matching profile already belongs to a candidate, so a separate artist can't be added.