Upload the next media part using its exact Content-Length with PUT /api/v1/media/uploads/{mediaId}/parts/{partNumber}. Requires an API key with the read scope or a signed-in workspace member.
Request
| Parameter | In | Type | Required |
|---|---|---|---|
mediaId |
path | UUID | Yes |
partNumber |
path | string | Yes |
content-length |
header | string | Yes |
workspaceId |
query | UUID | Yes |
Response
- HTTP 200:
MediaPartReceiptwithpartNumber.
The OpenAPI document has each field’s type.
Examples
const asset = await workspace.media.upload(file);The SDK’s media.upload() runs this step itself for a file too large for one request.
part = workspace.media.upload_part(
media_id,
1,
content=open("part-1.bin", "rb").read(),
)curl -X PUT "https://pubnio.com/api/v1/media/uploads/$MEDIA_ID/parts/1?workspaceId=$WORKSPACE_ID" \
-H "Authorization: Bearer $PUBNIO_API_KEY" \
-H "Content-Type: application/octet-stream" \
--data-binary @part-1.binpnio media upload ./launch.mp4Hosted MCP’s execute tool cannot carry this operation’s binary body or response.
Errors
media-upload-conflict: HTTP 409, Media upload conflictupload-too-large: HTTP 413, Content Too Large
It also declares the problems most operations declare.
Idempotency
No key, so a retried PUT is not deduplicated. Read the current state before you retry.
Limits
- It is one step of a resumable upload. Agents usually call
media.upload,media.import, ormedia.uploadInlineinstead.