Step one of a file upload to an artist's vault: checks the file's name, type and size, then returns a signed storage URL to PUT the file to and a ticket for Complete an upload that expires after 15 minutes. Files up to 10 MB: PDF, TXT, MD, CSV, JSON, DOC, DOCX, PNG, JPEG, WebP, MP3 and WAV. A file whose type is empty or nonstandard is resolved from its extension, and contentType says which type was settled on.
POST/api/vault/upload/sign
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
namestringrequired
The file's name, with its extension.
maxLength: 255
typestringrequired
The browser-reported MIME type. May be empty.
sizeintegerrequired
The file's size in bytes, at most 10 MB (10,485,760 bytes).
minimum: 1 · maximum: 10485760
Response
application/json
Where to send the file, and the ticket to complete with.
statusstring · enumrequired
Values: "ok"
signedUrlstringrequired
A Supabase Storage signed upload URL. PUT the file to it as multipart/form-data with the file in an unnamed field. Valid for a short time.
format: uri
contentTypestringrequired
The MIME type the upload was resolved to. Send the file with this type.
ticketstringrequired
An opaque signed ticket naming the user, artist, storage path, file name, type and size. Pass it to Complete an upload within 15 minutes.