music nerd

Vault uploadsComplete an upload

Vault uploads

Complete an upload

Step two of a file upload: checks the staged file against its ticket, publishes it to the artist's vault as an approved source, queues a Lore refresh and returns the saved source. Completing the same ticket again returns the saved source. A retryCompletion: true error means the same ticket should be sent again, not a new upload started.

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

Step two of a file upload: checks the staged file against its ticket, publishes it to the artist's vault as an approved source, queues a Lore refresh and returns the saved source. Completing the same ticket again returns the saved source. A retryCompletion: true error means the same ticket should be sent again, not a new upload started.

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/complete' \
  --header 'Content-Type: application/json' \
  --data '{
  "ticket": "eyJ1c2VySWQiOi…fQ.3b2a9c…"
}'

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
ticketstringrequired

The ticket from Sign an upload.

Response

application/json

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

statusstring · enumrequired

Values: "ok"

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.