Add photos and audio
Upload a photo and a recording, and put them on a place on your map.
These calls go to the API’s address and send your session, as in The basics.
Upload a photo
Send the photo as it is, with its own type as the content type. It comes back converted for the web, in the sizes phones and computers need, with a tiny placeholder to show while it loads:
The photo’s file, as it is.
{"sources": [{"url": "https://…","mimeType": "image/webp","width": 1600,"height": 1000},{"url": "https://…","mimeType": "image/webp","width": 1280,"height": 800},{"url": "https://…","mimeType": "image/webp","width": 640,"height": 400}],"placeholder": "data:image/webp;base64,…","sourceHash": "sha256-/vL4CU0xzIJ1pqiuAocHlR6Aj/Fn8hMnq9D/94Tf5ws="}
Add "kind": "IMAGE" to the answer, and it’s a media item, ready to go on a place. The upload is kept for a day, until a save takes it into the mapplication.
Upload a recording
A recording goes up the same way, and comes back converted for the web, with its length in seconds:
The recording’s file, as it is.
{"sources": [{"url": "https://…","mimeType": "audio/webm; codecs=opus"}],"meta": {"duration": 17.816,"bitrate": 116174,"sampleRate": 24000,"channels": 1}}
Its media item is one object: "kind": "AUDIO", its sources, and the fields of its meta.
Bigger files
One call takes a file of up to about 4.5 MB. For a bigger one, ask for an address to upload it to, with its size in bytes: here a photo of 6.8 MB. A photo can be up to 10 MB, and a recording up to 500 MB, whose address comes from /media/{mapplicationId}/audio instead.
{"uploadId": "62df08d9-008a-47d3-9c76-2423c66c938b","presignedUrl": "https://…","expiresIn": 900,…}
Send the file to presignedUrl with a PUT, within expiresIn seconds. That address takes the file alone, exactly as many bytes as you said, and needs no session.
Wait until it’s ready
Once the file is sent, ask about the upload by its uploadId until it’s no longer processing. This photo was ready within three seconds:
{"status": "processing"}
{"status": "complete","sources": [{"url": "https://…","mimeType": "image/webp","width": 1920,"height": 1440},…],"placeholder": "data:image/webp;base64,…","sourceHash": "sha256-BXIiex/w/RJGZoKSjYG+a5PyD2hkFP26fi5UGEStfec=",…}
Its sources, placeholder and sourceHash, with "kind": "IMAGE", make its media item. If the file can’t be used, status is error, and message says why.
Put them on a place
A place is a point on the map, with a title, an icon, its media, and an id of your own: any UUID. Main stage gets the three media items in the order they show, so the first photo is the one at the top of the place.
Add the place to the mapplication’s places, and save, as in Change an app:
{"mapplication": {"id": "d54d8cf0-3fc4-4fd0-a6e6-fdb01b8ab48e","map": {"places": [{"id": "fa85c546-3f19-410e-baf4-1cb72d660d9e","kind": "POINT","title": "Main stage","description": "Music from noon until late.","coordinates": [24.7389,59.4466],"icon": {"url": "https://static.mapifest.com/marker-icons/v4/material/festival.svg","size": 48},"media": [{"kind": "IMAGE",…},{"kind": "AUDIO",…},{"kind": "IMAGE",…}],"timeTable": []}],…},…},"expectedUpdated": "2026-11-25T19:22:09.549Z"}
{"mapplication": {"map": {"places": [{"kind": "POINT","title": "Main stage","media": [{"kind": "IMAGE",…},{"kind": "AUDIO",…},{"kind": "IMAGE",…}],…}],…},…},"updated": "2026-11-25T19:22:47.365Z",…}
Main stage is saved with its photos and its recording, which are now stored with the mapplication. Publish it, and visitors see them.