music nerd

Vault uploadsSign an upload

Vault uploads

Sign an upload

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
POST/api/vault/upload/sign

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.

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/sign' \
  --header 'Content-Type: application/json' \
  --data '{
  "artistId": "aab92f80-f9e1-4299-aa33-7dd85c8de5d3",
  "name": "press-kit.pdf",
  "type": "application/pdf",
  "size": 482133
}'

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

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.