Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.msgflash.com/llms.txt

Use this file to discover all available pages before exploring further.

What this upload is for

In the MsgFlash dashboard, media messages and media campaigns use a temporary upload before final sending. Typical cases:
  • image
  • video
  • document
  • audio
  • voice note
The backend then returns a temporary URL that can be reused for sending.

Endpoint used by the dashboard

POST /api/media/upload
Authentication:
Authorization: Bearer <jwt_console>
This route is not a public x-api-key endpoint.

Useful response

{
  "data": {
    "id": "med_uuid",
    "url": "https://cdn.example.com/tmp/file.jpg",
    "type": "image",
    "mimeType": "image/jpeg",
    "sizeBytes": 248112,
    "originalName": "visuel.jpg",
    "expiresAt": "2026-04-05T12:00:00.000Z",
    "suggestedMessageType": "image"
  }
}
Important fields:
  • url: temporary URL to reuse in mediaUrl
  • expiresAt: expiration timestamp
  • suggestedMessageType: UI hint for the correct media type

Product constraints visible in the dashboard

  • the generated link is temporary
  • the link may be publicly accessible
  • media scheduled after expiresAt may fail to send
The dashboard should therefore warn users when a message or campaign is scheduled after the expiration date.

Product-supported sizes and formats

TypeSupported examples
imageJPEG, PNG, WEBP, GIF
videoMP4, 3GPP
documentPDF, DOC, DOCX, XLS, XLSX
audioMP3, OGG, MP4 audio, AAC, AMR
voice_noteMP3, OGG, WEBM audio, MP4 audio, AAC, AMR
Current product limits:
  • image: 5 MB
  • document: 10 MB
  • video: 16 MB
  • audio: 16 MB
  • voice note: 16 MB

Where this flow is used

  • “New message” page
  • campaign composer v2 in direct message mode
  • voice note recording and upload
For the public API, you can also provide your own mediaUrl directly if you already host the file.