Rename or move a file

PUT/chat-rooms/:roomId/files/:fileId

Rename a file and/or move it to another folder. If the destination already has a file with that name, the name is numbered.

AuthLogin required

Path parameters

roomIdstringrequired

Chat room ID.

fileIdstringrequired

File ID.

Request body

namestring

New file name.

folderIdstring

Destination 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
}