music nerd

Vault uploadsUpload a file directly

Vault uploads

Upload a file directly

Uploads a file to an artist's vault in one request, saves it as an approved source and queues a Lore refresh. Same limits and types as Sign an upload, which with Complete an upload sends the file straight to storage instead of through the API. Not runnable from this page: the body is multipart/form-data.

POST/api/vault/upload
POST/api/vault/upload

Uploads a file to an artist's vault in one request, saves it as an approved source and queues a Lore refresh. Same limits and types as Sign an upload, which with Complete an upload sends the file straight to storage instead of through the API. Not runnable from this page: the body is multipart/form-data.

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

Body
cURL
curl --request POST \
  --url 'https://musicnerd-api.vercel.app/api/vault/upload' \
  --header 'Content-Type: multipart/form-data' \
  --data '{
  "file": "string",
  "artistId": "YOUR_ID"
}'

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

multipart/form-datarequired
filestringrequired

The file, at most 10 MB. Bodies over about 4.5 MB are refused by the platform before reaching the API; use Sign an upload for larger files.

format: binary

artistIdstringrequired

The artist's ID.

format: uuid

Response

application/json

The saved source. warning is set when the Lore refresh could not be queued or a PDF had no readable text.

statusstring · enumrequired

Values: "ok"

successboolean · enumrequired

Always true on 200.

Values: true

sourceobjectrequired

A row of the artist's vault, as stored.

Properties for source
idstringrequired

format: uuid

artistIdstringrequired

format: uuid

originstringrequired

upload for a file the claimant or an admin uploaded.

activityIdstring | null

The activity event that recorded the upload.

format: uuid

urlstringrequired

The file's public URL in storage.

format: uri

titlestring | null

The file's name.

snippetstring | null

The first 300 characters of extracted text, or Uploaded file: <name> when there is none.

typestring | null

image and audio by MIME type, data for CSV and JSON, document otherwise.

Values: "document", "data", "image", "audio", null

statusstring · enumrequired

Always approved for an upload.

Values: "pending", "approved", "rejected"

fileNamestring | null
fileSizeinteger | null

Bytes.

filePathstring | null

The storage key (<artistId>/<name>), not the URL.

contentTypestring | null

The resolved MIME type.

extractedTextstring | null

The file's text, for text files and PDFs with readable text.

ogImagestring | null
podcastEpisodeKeystring | null
podcastShowTitlestring | null
podcastEpisodeTitlestring | null
publishedAtstring | null

format: date

createdAtstringrequired
updatedAtstring | null
warningstring

Advice to show the user. Absent when there is none.