Create multipart upload session

Create a media record and start an S3 multipart upload session.

Use mediaType: "audio" to upload a voice note. A voice note is ordinary audio media — there is no separate voice-note type — so upload it here, then attach the resulting mediaUuid to a chat message. Wait for the media to reach status: "ready" on GET /media/{mediaUuid} before sending it: audio is transcoded asynchronously, and a message sent earlier attaches media the recipient cannot play yet. Duration is measured during transcoding and returned as lengthMs on the media's main variant.

post/media/uploads

Headers

X-Fanvue-API-Versionstring required
Example:2025-06-26

API version to use for the request

Request body

namestring required
filenamestring required
mediaType'image' | 'video' | 'audio' | 'document' required

Use "audio" for a voice note — it has no media type of its own.

sizeBytesinteger

Total size of the file in bytes. When provided, the response includes the exact totalParts to upload.

Response

Upload session created

mediaUuidstring uuid required
uploadIdstring required
partSizeinteger required

Size in bytes of every part except the final one (which may be smaller).

maxPartsinteger required

Maximum number of parts allowed, derived from the maximum supported file size.

totalPartsinteger nullable required

Exact number of parts to upload, computed from sizeBytes. Null when sizeBytes was not provided — compute it client-side as ceil(fileSize / partSize).

Changes