The files API handles file attachments for notes. You upload a file to receive a URL, then include that URL in your note’s Markdown. Files are served through a secure proxy and are never publicly accessible — only authenticated owners can retrieve their files.Documentation Index
Fetch the complete documentation index at: https://docs.spote.cloud/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/upload
Upload a file attachment. The request must usemultipart/form-data encoding.
Request
Content-Type:multipart/form-data
The file to upload. Passed as a form field named
file.Response
201 Created — returns metadata about the uploaded file including the URL to reference in Markdown.The original filename of the uploaded file.
Internal proxy URL of the form
/api/files/{userId}/{uuid}.{ext}. Use this in your note’s Markdown.MIME type of the file, e.g.
"image/png", "application/pdf".File size in bytes.
Using the URL in Markdown
Include the returnedurl directly in your note’s Markdown using standard image or link syntax:
POST /api/notes or PUT /api/notes/:id, include the attachment in the text field. Spote stores the URL in the note’s attachments array automatically.
GET /api/files/:key
Retrieve and stream a file. The server validates that the authenticated user owns the file before serving it.Path parameters
The file key, which is the path segment from the upload response URL after
/api/files/. For example, if the upload URL is /api/files/user_abc123/uuid.png, the key is user_abc123/uuid.png.Response
200 OK — streams the file content with the correctContent-Type header. The response includes Cache-Control: private, max-age=3600.
403 Forbidden — the key does not belong to the authenticated user.
404 Not Found — the file does not exist in storage.