Replace File
This API replaces the content of an existing file with a new file. The short link and the file URL stay unchanged. It counts towards your upload quota. CDN caches are purged after the replacement, but browsers may keep serving a locally cached copy for a while. For files larger than 100MB, use the large file upload API with replace_file_id.
multipart/form-data- body
file*fileThe new file. The key should be 'file' (alias 'smfile').
binaryfile_id*integerID of the file to replace (the file_id returned by the upload API).
OK
application/json- response
code?integerResponse status code (200 indicates success)
data?File upload response
message?stringHuman-readable status message
curl -X POST 'https://s.ee/api/v1/file/replace' \ -H 'Authorization: string' \ -F 'file=string' \ -F 'file_id=0'{ "code": 0, "data": { "created_at": 0, "delete": "string", "file_id": 0, "filename": "string", "hash": "string", "height": 0, "mime_type": "string", "page": "string", "path": "string", "size": 0, "storename": "string", "thumb_url": "string", "upload_status": 0, "url": "string", "width": 0 }, "message": "string"}Upload File POST
This API allows you to upload a file and create a short link for it.
Get File Upload History GET
Returns a paginated list of uploaded files for the authenticated user. This API is compatible with sm.ms upload_history endpoint and returns 30 files per page sorted by creation time in descending order.