1MSG

Upload media & get mediaId

POST
/uploadMedia

Upload media (HTTPS URL, base64 data URI, or form-data file) and get a WABA mediaId. Use that id with /sendFile, /sendSticker, or as a template header handle. The stored file can later be fetched with /retrieveMedia and deleted with DELETE /media/{mediaId}.

Authorization

JWT token
querytoken<token>

Request Body

  1. body
body*string

HTTP link https://...

Or base64-encoded file with mime data, for example data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...

File in form-data input field

Response Body

Server response example

application/json
  1. response
mediaId?string
curl -X POST 'https://api.1msg.io/123/uploadMedia' \  -H 'Content-Type: application/json' \  -d '{  "body": "https://example.com/image.jpg"}'
{  "mediaId": "ed2c7be7-b779-4ba8-a17c-6722f37be2a7"}