Skip to content

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.

bash
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' 
KindRules
Imagesjpeg/png/gif/webp/bmp/tiff, downscaled to 1280 px on the long side
Videomp4/mov/avi/webm/mkv/… ≤ 500 MB; transcoded to H.264/AAC MP4 with a poster
Audio / voicemp3/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#

GET /storage/{path} #

Download an attachment

Token optional

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
curl 'https://minchatapp.com/storage/media/32/fd/32fd…a1.jpg' \
  -H 'Accept: application/json'

Response

Responds with HTTP 200.

GET /api/files/{path} #

Download an attachment (legacy URL)

Token optional

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
curl 'https://minchatapp.com/api/files/media/32/fd/32fd…a1.jpg' \
  -H 'Accept: application/json'

Response

Responds with HTTP 200.

POST /api/video-downloads #

Download a video by URL

Bearer token Rate limit: 20/min

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

HTTP 422 · bad
{
  "success": false,
  "code": "video.invalid_url",
  "error": "Invalid link",
  "message": "Invalid link"
}
GET /api/video-downloads/{videoDownload} #

Video download status

Bearer token

status: pending, downloading, completed, failed.

Parameters

Name Type Description
videoDownload
required path
integer
Video download id.

Request

curl
curl 'https://minchatapp.com/api/video-downloads/7' \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Accept: application/json'

Response

Responds with HTTP 200.

GET /api/video-downloads/{videoDownload}/stream #

Download the video file

Bearer token

MP4 as attachment, only when completed.

Parameters

Name Type Description
videoDownload
required path
integer
Video download id.

Request

curl
curl 'https://minchatapp.com/api/video-downloads/7/stream' \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Accept: application/json'

Response

Responds with HTTP 200.

DELETE /api/video-downloads/{videoDownload} #

Delete a video download

Bearer token

Parameters

Name Type Description
videoDownload
required path
integer
Video download id.

Request

curl
curl -X DELETE 'https://minchatapp.com/api/video-downloads/7' \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Accept: application/json'

Response

Responds with HTTP 200.

GET /api/videos/{token} #

Stream a downloaded video

No auth Rate limit: 120/min

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
curl 'https://minchatapp.com/api/videos/KRNaDjeuvS2A' \
  -H 'Accept: application/json'

Response

Responds with HTTP 200.