Skip to main content
PUT
/
api
/
v1
/
putFile
Upload file
curl --request PUT \
  --url https://app.sajn.se/api/v1/putFile \
  --header 'Content-Type: multipart/form-data' \
  --header 'authorization: <authorization>' \
  --form file='@example-file' \
  --form visibility=PRIVATE
{
  "key": "<string>",
  "file": {
    "id": "<string>",
    "filename": "<string>",
    "mimeType": "<string>",
    "size": 123,
    "hash": "<string>"
  }
}

Headers

authorization
string
required

Bearer token for API authentication

Body

multipart/form-data

Multipart form data with file and optional visibility

File upload request

file
file
required

The file to upload. Allowed types: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, MP4, MOV, AVI, WEBM, JPG, PNG, GIF, WEBP, SVG

visibility
enum<string>
default:PRIVATE

File visibility: PRIVATE (requires signed URL) or PUBLIC (direct access)

Available options:
PRIVATE,
PUBLIC

Response

File uploaded successfully

File upload response

key
string
required

Storage key for the uploaded file

file
object
required

File metadata