Download private workspace media with GET /api/v1/media/{mediaId}/content. Requires an API key with the read scope or a signed-in workspace member.
Request
| Parameter | In | Type | Required |
|---|---|---|---|
mediaId |
path | UUID | Yes |
workspaceId |
query | UUID | Yes |
Response
- HTTP 200: the file’s bytes as
application/octet-stream.
The OpenAPI document has each field’s type.
Examples
const blob = await workspace.media.download(mediaId);blob = workspace.media.download(media_id)curl "https://pubnio.com/api/v1/media/$MEDIA_ID/content?workspaceId=$WORKSPACE_ID" \
-H "Authorization: Bearer $PUBNIO_API_KEY" \
-o download.binpnio media download "$MEDIA_ID" --out launch.mp4Hosted MCP’s execute tool cannot carry this operation’s binary body or response.
Errors
It declares no problem of its own.
It declares the problems most operations declare.
Idempotency
None needed: a read is safe to retry.
Limits
- Field lengths and ranges are in the OpenAPI document.