mediaUuid you can attach to a message or post. Uploads are multipart: you open a session, upload each part to a signed URL, complete the session and poll until the media is ready.
You need an access token with the write:media scope, and a file of up to 1.5 GiB, or 100 MiB for a document. Agencies use the creator-scoped routes, covered in Agency uploads.
Step 1: Create the session
POST /media/uploads creates a media record and opens the session. mediaType is image, video, audio or document. Pass sizeBytes when you know it, so the response includes the exact totalParts.
A
sizeBytes over the platform maximum, or over 100 MiB for a document, returns 400.
Step 2: Sign the parts
GET /media/uploads/{uploadId}/parts/urls?from=1&to=12 returns signed URLs for a contiguous range of part numbers in one request. Part numbers are 1-based.
to higher than maxParts returns 413.
GET /media/uploads/{uploadId}/parts/{partNumber}/url signs one part and returns the bare URL as text/plain. Use it for a single-part retry, and use the range route otherwise, because it costs one request against your rate limit instead of one per part.
Step 3: Upload the bytes
PUT the raw bytes of each part to its signed URL, with no Authorization header. Record the ETag response header for every part, because the completion call needs it.
Step 4: Complete the session
SendPATCH /media/uploads/{uploadId} with every part number and its ETag.
processing, not ready, because transcoding and moderation run after this call. The document size ceiling is enforced here, against the uploaded bytes.
Step 5: Poll until ready
CallGET /media/{uuid} with the mediaUuid from step 1 until status is ready or error.
error, errorReason names the cause; Check processing status lists the values.
Upload a file in parts with TypeScript
This script runs all five steps for one file.With the SDK
createFanvueClient().vault wraps steps 1, 2, 4 and 5 as createUploadSession, getUploadPartUrl, completeUpload and getMedia. pollUntilReady from the media helpers polls getMedia every 1.5 seconds for up to 300 seconds and returns ready, error or timeout. See SDK API client.
Agency uploads
The creator-scoped routes mirror the self-serve ones under/creators/{creatorUserUuid}/media/uploads* and need write:creator and write:media. The creator-scoped single-part URL route has its own limit of 1000 requests per minute; the range route costs one request however many parts it signs.
Limits
audio is a voice note. Upload it the same way, wait for ready, then attach the mediaUuid to a chat message.