Rename or move a file
PUT
/chat-rooms/:roomId/files/:fileIdRename a file and/or move it to another folder. If the destination already has a file with that name, the name is numbered.
| Auth | Login required |
|---|
Path parameters
roomIdstringrequiredChat room ID.
fileIdstringrequiredFile ID.
Request body
namestringNew file name.
folderIdstringDestination folder; null for the root.
Request
curl https://api.4s.link/chat-rooms/ROOM_ID/files/FILE_ID \-X PUT \-H "Authorization: Bearer 4s_at_..." \-H "Content-Type: application/json" \-d '{"name": "report-final.pdf","folderId": "fd1a2b3c-..."}'
Example response
{"type": "file","id": "cf1a2b3c-...","name": "report-final.pdf","folderId": "fd1a2b3c-...","mimeType": "application/pdf","size": 1234567}