Create a download URL

GET/chat-rooms/:roomId/files/:fileId/url

Files are private, so fetch a short-lived URL each time. disposition=inline is honoured only for allowed types such as PDF; anything else is forced to attachment. The URL carries the file name, so opening it as a link downloads the file.

AuthLogin required

Path parameters

roomIdstringrequired

Chat room ID.

fileIdstringrequired

File ID.

Query parameters

dispositionstring

attachment (default) or inline.

Request
curl https://api.4s.link/chat-rooms/ROOM_ID/files/FILE_ID/url \
-H "Authorization: Bearer 4s_at_..."
Example response
{
"url": "https://.../chat-files/...?X-Amz-Signature=...",
"expiresIn": 300,
"expiresAt": "2026-08-29T00:05:00.000Z",
"fileName": "report.pdf",
"mimeType": "application/pdf",
"size": 1234567,
"disposition": "inline"
}