Create a download URL
GET
/chat-rooms/:roomId/files/:fileId/urlFiles 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.
| Auth | Login required |
|---|
Path parameters
roomIdstringrequiredChat room ID.
fileIdstringrequiredFile ID.
Query parameters
dispositionstringattachment (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"}