REST API
Media & uploads
Attachment upload rules, file URLs and access, server-side video downloads.
There is no separate upload endpoint: files are sent as attachments[] (multipart) with POST /api/conversations/{id}/messages, up to 10 per message.
curl -X POST https://minchatapp.com/api/conversations/12/messages \
-H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' \
-F 'content=Forecast map' \
-F 'attachments[]=@map.png' \
-F 'attachments[]=@notes.pdf'
| Kind | Rules |
|---|---|
| Images | jpeg/png/gif/webp/bmp/tiff, downscaled to 1280 px on the long side |
| Video | mp4/mov/avi/webm/mkv/… ≤ 500 MB; transcoded to H.264/AAC MP4 with a poster |
| Audio / voice | mp3/m4a/wav/ogg/webm/aac/flac; is_voice=1 + optional waveform_data; duration and waveform are extracted |
| Files | ≤ 50 MB; executables, scripts, HTML/SVG/XML are rejected |
Attachment object: id (UUID), type (image, video, audio, file), url, name, size, mime_type, optional width/height, duration, poster, is_voice, waveform. URLs are stable (/storage/media/…) and require the Bearer token (or the web session cookie); members of the chat — or anyone, for public channels — get the file, others get 403.
Endpoints#
Download an attachment
Stable attachment URL as returned in attachments[].url (/storage/media/xx/yy/<sha256>.<ext>). Send Authorization: Bearer (web uses a session / mc_media cookie). Available to members of the chat (or everyone for public channels); otherwise 403.
Parameters
| Name | Type | Description |
|---|---|---|
path
required path
|
string |
File path. |
Request
curl 'https://minchatapp.com/storage/media/32/fd/32fd…a1.jpg' \
-H 'Accept: application/json'
Response
Responds with HTTP 200.
Download an attachment (legacy URL)
Same file access as /storage/{path}; kept for URLs cached by older clients.
Parameters
| Name | Type | Description |
|---|---|---|
path
required path
|
string |
File path. |
Request
curl 'https://minchatapp.com/api/files/media/32/fd/32fd…a1.jpg' \
-H 'Accept: application/json'
Response
Responds with HTTP 200.
Download a video by URL
Server-side download (YouTube and others via yt-dlp). Returns 202 with a status; follow VideoDownloadUpdated or poll. Private/internal URLs are rejected (422).
Parameters
| Name | Type | Description |
|---|---|---|
url
required body
|
string |
Video page URL. URLmax 2048 chars
|
provider
optional body
|
string |
Provider hint (default generic).max 50 chars
|
Request
curl -X POST 'https://minchatapp.com/api/video-downloads' \
-H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
Response
{
"success": false,
"code": "video.invalid_url",
"error": "Invalid link",
"message": "Invalid link"
}
Video download status
status: pending, downloading, completed, failed.
Parameters
| Name | Type | Description |
|---|---|---|
videoDownload
required path
|
integer |
Video download id. |
Request
curl 'https://minchatapp.com/api/video-downloads/7' \
-H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/json'
Response
Responds with HTTP 200.
Download the video file
MP4 as attachment, only when completed.
Parameters
| Name | Type | Description |
|---|---|---|
videoDownload
required path
|
integer |
Video download id. |
Request
curl 'https://minchatapp.com/api/video-downloads/7/stream' \
-H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/json'
Response
Responds with HTTP 200.
Delete a video download
Parameters
| Name | Type | Description |
|---|---|---|
videoDownload
required path
|
integer |
Video download id. |
Request
curl -X DELETE 'https://minchatapp.com/api/video-downloads/7' \
-H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/json'
Response
Responds with HTTP 200.
Stream a downloaded video
Public by unguessable 48-char token, supports HTTP Range. ?dl=1 forces download.
Parameters
| Name | Type | Description |
|---|---|---|
token
required path
|
string |
Token from the link. |
dl
optional query
|
boolean |
Force download. |
Request
curl 'https://minchatapp.com/api/videos/KRNaDjeuvS2A' \
-H 'Accept: application/json'
Response
Responds with HTTP 200.